Tuesday, December 11, 2012

Recurring Error After Adding an ASP.NET 4.0 application to a subdirectory on SharePoint 2010

So a few weeks ago I was proud as a peacock after I got a 4.0 web application hosted as a SharePoint subdirectory, mentioned here: http://www.ericjamesw.com/2012/12/adding-aspnet-40-application-to.html

I'm trying to update the authentication mode of my SharePoint install to use Kerberos, and had to flip some settings on and off in Central Admin in the process.  Low and behold, my sub application broke, and started giving me yellow screen errors.  I found in my Windows Event Logs that the "Target Framework Attribute" was unrecognized, and before I knew what hit me, I was back to square one with hosting my sub application!

What Happened? 

Well, when messing around with the authenticaiton settings, the SharePoint configuration files were updated, wiping out my custom changes in the process.  Fortunately, reverting to our previous changes was simple. 
  1. My sub application switched it's application pool back to the Default - 80 SharePoint pool, rather than my .NET 4.0 framework pool I had created specifically for this application.
  2. With the appropriate framework applied to my application again, I was now receiving "there is a duplicate ... section defined" error again. My SharePoint web.config was reverted (as mentioned above), removing our customizations!

    Thanks to Microsoft, they made our rollback easy, but it's good to know that this stuff can occur. When the config update was made, a previous version was stored in the directory ABOVE our SharePoint implementation, with the date and time appended to the filename. As such, I have the following:

All I had to do here was take my most recent config from this directory and move it into the "80" subdirectory, where my SharePoint intranet is running, and I was back to where I was before I tinkered with Kerberos and other settings. 

No comments:

Post a Comment