logo
Carmine Castiglia
InfosystemsPro LLC
Random Thoughts on Information Systems & Technology for Plant, Office, and Home
Skip Navigation Links

Navigationally challenged browsers that do not display dynamic sub-menus may use the Sitemap.
"Server Error in '/' Application" When Loading Web Page

While in the midst of deploying a new site on a Windows-based host, I encountered this error page when attempting to load any .aspx page into a browser window:

Server Error in '/' Application.

Runtime Error

Description: An application error occurred on the server. The current custom error settings for this application prevent the details of the application error from being viewed remotely (for security reasons). It could, however, be viewed by browsers running on the local server machine.

Details: To enable the details of this specific error message to be viewable on remote machines, please create a <customErrors> tag within a "web.config" configuration file located in the root directory of the current web application. This <customErrors> tag should then have its "mode" attribute set to "Off".


<!-- Web.Config Configuration File -->

<configuration>
    <system.web>
        <customErrors mode="Off"/>
    </system.web>
</configuration>


Notes: The current error page you are seeing can be replaced by a custom error page by modifying the "defaultRedirect" attribute of the application's <customErrors> configuration tag to point to a custom error page URL.

<!-- Web.Config Configuration File -->

<configuration>
    <system.web>
        <customErrors mode="RemoteOnly" defaultRedirect="mycustompage.htm"/> </system.web> </configuration>
    </system.web>
</configuration> 



I contacted the hosting company's tech support and did the old back-and-forth with them for a couple of days with no resolution in sight.  Frustrated, I decided to take yet another look at it myself to see if there was some way I might fix this on my own, or at least provide more info for the tech support guys.

Okay, seemed like the place to start was "To enable the details of this specific error message to be viewable on remote machines..." However, an examination of  the "web.config" file in the site's root
folder shows that it is already essentially identical to the example given, with the all-important "<customErrors mode="Off"/>" already in place and properly capitalized, as shown below:


<?xml version="1.0" encoding="utf-8"?>
<configuration xmlns="http://schemas.microsoft.com/.NetConfiguration/v2.0">
  <system.web>
    <customErrors mode="Off"/>
  </system.web>
  <appSettings>
  </appSettings>
</configuration>

After wasting a few more hours researching the issue on the web (again) and coming up dry (again), I took a closer look at my web.config file; I knew that any solution to the "Server Error" failures would be predicated upon seeing the actual error message generated and I did not understand why this wasn't working as described.  Clutching at straws, I edited the [xmlns="http://schemas.microsoft.com/.NetConfiguration/v2.0"] out of the <configuration> tag and saved the file:


<?xml version="1.0" encoding="utf-8"?>
<configuration>
  <system.web>
    <customErrors mode="Off"/>
  </system.web>
  <appSettings>
  </appSettings>
</configuration>

Hmmm...  That should not have been necessary, but it did work!

Now I can see the actual error resulting from my attempts to view the site in a browser:

Server Error in '/' Application.

Parser Error

Description: An error occurred during the parsing of a resource required to service this request. Please review the following specific parse error details and modify your source file appropriately.

Parser Error Message: Could not load type System.Web.UI.WebControls.SiteMapDataSource from assembly System.Web, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a.

Details: To enable the details of this specific error message to be viewable on remote machines, please create a <customErrors> tag within a "web.config" configuration file located in the root directory of the current web application. This <customErrors> tag should then have its "mode" attribute set to "Off".


Source Error:

Line 139: <td style="width: 8px; height: 194px;" class="style21"></td>
Line 140: <td style="width: 124px; height: 194px;" class="style11" valign="top">
Line 141: <asp:SiteMapDataSource runat="server" ID="SiteMapDataSource1">
Line 142: </asp:SiteMapDataSource>
Line 143: <asp:Menu runat="server" id="Menu1" DataSourceID="SiteMapDataSource1" StaticDisplayLevels="2" DynamicHorizontalOffset="-4" Width="124px" Font-Names="Arial" Font-Size="Small">

Source File: d:\hosting\member\default.aspx    Line: 141
Version Information: Microsoft .NET Framework Version:1.1.4322.2379; ASP.NET Version:1.1.4322.2379

Interesting stuff, the error messages, but it was the line at the bottom of the window that caught my eye, especially where it said "Version 1.1..."

The hosting company's web site says that they support ASP.NET 2.0 - a decision point when choosing the host since the site was to be created with Microsoft Expression Web and would be making use of ASP controls that require the Microsoft .NET Framework Version 2.0 be loaded on the host.

I double-checked the site's "control panel" and determined that there was no option to view or change the loaded .NET version (as with some other web hosts), so I called tech support one final time and pointed out their error.

Fifteen minutes later, they had installed the correct .NET version and rebooted the server...

... and the "Server Error in '/' Application" problem has been resolved.

AVG Anti-Malware

Access Your PC from Anywhere-Free Trial
 
    Horizontal bar  
Copyright © 2001-2008 InfosystemsPro LLC  All rights reserved
Trademarks and images are the property of their respective owners
A privacy notice is available here.  A general disclaimer is here
Contact the Webmaster for questions or comments
All external links will open in a new browser window.  See my policy concerning links here
Many of this site's features rely on JavaScript technology.