Devlico.Us
CodeBetter.Com
RSS 2.0 via Feedburner
           Do you Twitter? Follow us @devlicious

Derik Whittaker

Thoughts on Software Development, .Net, OOP, Design Patterns and all things cool



Trust your tools, but only if you know what they are doing.

Yesterday we were trying to change the session state properties of one of our sharepoint web sites and what resulted was really odd.

After we made the changes, we started getting the following  in our event log error:
Error: Failure in loading assembly: Microsoft.SharePoint.Portal,
Version=11.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c

Here is what we did

  1. opened up IIS
  2. right clicked on the site
  3. choose properties. 
  4. clicked to the ASP.Net tab
  5. clicked edit configuration
  6. clicked to the state management tab
  7. changed the Session State Mode from inProc to StateServer. 
  8. clicked ok, and thought everything was good to go.

But wait, now NOTHING worked.  Sure, we could still surf to the home page of the sharepoint site, but trying to do anything caused errors.  So, we set everything back to the original values thinking this would solve our problem.  NOPE.

After trying a bunch of different things and checking on google we finally found the issue (here).   The problem is we trusted the ASP.net configuration tool would do its job correctly, bad assumption.

Turns out that when you use the configuration tool, it will add an xmlns attribute (xmlns=http://schemas.microsoft.com/.NetConfiguration/v2.0) to the <configuration> node.  For what ever reason, sharepoint does NOT like this node and will not parse the web.config file correctly.

To resolve this issue, we simply removed the xmlns attribute and everything worked fine.

I am not sure why the config editor would add this, if anyone knows please share.  Hope this post can help the next poor sap that has this issue.

Till next time,



Comments

Derik Whittaker said:

@JC

I like your thought of making the file read only.  Although this will not truly stop anyone from making change, but it should at least force them to think about why they are making them when they have to make the file writable.

# December 6, 2007 5:53 AM

Tomas Tintera said:

Dear Derik,

a coleague had simmilar issue, when adding new node by DOM of MS XML parser. So the problem can be deep in this component.

We couldn't find a way to add node without XMLNS.

# December 6, 2007 12:27 PM

Leave a Comment

(required)  
(optional)
(required)  

Enter the numbers above:
Add

About Derik Whittaker

Derik is a .Net Developer/Architect specializing in WinForms working out the northern suburbs of Chicago. He is also believer and advocate for Agile development including SCRUM, TDD, CI, etc.

When Derik is not writing code he can be found spending time with his wife and young son, climbing on his bouldering wall, watching sports (mostly baseball), and generally vegging out. Check out Devlicio.us!

Our Sponsors

Red-Gate!