Wednesday, April 16, 2008

ReportViewer?

So after tinkering with Visual Studio 2008 Express on a SharePoint development machine, I made the obvious eventual move of uninstalling Express Edition and replacing it with Visual Studio 2008.

Surprisingly, SharePoint stopped working.

Checking the Event Viewer revealed an issue in ASP.net rearing it's head on line 110 of a web.config file.  I first tried to comment out the entire offending block of xml, just to see if I could get something to load at all, and was confronted with a SharePoint custom error page (better than before).

This led me to believe that that was indeed where the problem was, so I uncommented the block in question and investigated the GAC.  Everything looked fine, aside from the version numbers now reading 9.0.0.0 instead of the desired 8.0.0.0.  I went back to the web.config file and modified the assembly reference to point to the new dll, and everything was back up and running.

Below is what the error looked like in the event viewer, so you can see what I did.  I bolded the most useful piece of this error message.

Event code: 3008 
Event message: A configuration error has occurred. 
Event time: 4/16/2008 7:25:43 AM 
Event time (UTC): 4/16/2008 2:25:43 PM 
Event ID: 0779893478a24b24a2ad40d3ec8f7869 
Event sequence: 4 
Event occurrence: 1 
Event detail code: 0 
 
Application information: 
    Application domain: /LM/W3SVC/1427747289/Root-1-128528295098437500 
    Trust level: WSS_Minimal 
    Application Virtual Path: / 
    Application Path: C:\Inetpub\wwwroot\wss\VirtualDirectories\80\ 
    Machine name: SPBASE 
 
Process information: 
    Process ID: 3340 
    Process name: w3wp.exe 
    Account name: SPBASE\Administrator 
 
Exception information: 
    Exception type: ConfigurationErrorsException 
    Exception message: Could not load file or assembly 'Microsoft.ReportViewer.WebForms, Version=8.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. The system cannot find the file specified. (C:\Inetpub\wwwroot\wss\VirtualDirectories\80\web.config line 110) 
 
Request information: 
    Request URL: http://spbase/_layouts/error.aspx 
    Request path: /_layouts/error.aspx 
    User host address: 127.0.0.1 
    User: SPBASE\Administrator 
    Is authenticated: True 
    Authentication Type: NTLM 
    Thread account name: SPBASE\Administrator 
 
Thread information: 
    Thread ID: 8 
    Thread account name: SPBASE\Administrator 
    Is impersonating: True 
    Stack trace:    at System.Web.Configuration.ConfigUtil.GetType(String typeName, String propertyName, ConfigurationElement configElement, XmlNode node, Boolean checkAptcaBit, Boolean ignoreCase)
   at System.Web.Configuration.HttpHandlerAction.InitValidateInternal()
   at System.Web.Configuration.HttpHandlersSection.ValidateHandlers()
   at System.Web.Configuration.HttpHandlersSection.FindMapping(String verb, VirtualPath path)
   at System.Web.HttpApplication.GetHandlerMapping(HttpContext context, String requestType, VirtualPath path)
   at System.Web.HttpApplication.MapHttpHandler(HttpContext context, String requestType, VirtualPath path, String pathTranslated, Boolean useAppConfig)
   at System.Web.HttpApplication.MapHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()
   at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)

Welcome!

We thought it would make sense to share some solutions to random problems that we have thus far run into during the myriad of SharePoint implementations that we have been a part of.

So, here it is, and welcome!  Hopefully there is some overlap between our random solutions and your random issues.