An ASP.NET Blog
I work for Microsoft and help people and businesses make better use of technolgy to realize their full potential. The opinions mentioned herein are solely mine and do not reflect those of my employer.

You may receive the Error Message "Server Error in '/application name' Application" while browsing an asp.net application

Monday, April 25, 2005 7:51 AM
You may receive the following error message while browsing an asp.net application


"Server Error in '/application name' 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 tag within a "web.config" configuration file located in the root directory of the current web application. This tag should then have its "mode" attribute set to "Off". "



This error might occur due to two scenarios.

1. There is an error in the application's logic with the inputformat, Type etc., and you have set the Custom Error Mode in the web.config to "On" and not specified a default redirect error page.

2. The web.config file is not well formed or having invalid characters and the application is not able to pick up the settings from the same.

Solution

1. Set the custom error mode to "Off" to view the error. After rectifying it and before deployment, change it to "On" and specify a default error page, as follows:-

<customErrors defaultRedirect="ErrorPage.aspx" mode="On">

</customErrors>

such that your users will not be able to see the actual error and get your friendly error page where you can politely say "An error has occured! Sorry for the inconvenience ..." .

2. If the above solution is not working (i.e. even after setting the custom error mode to On, the same "Server Error" occurs, then the likely chance is that your web.config file is not well formed and has invalid characters etc.,

To resolve, it copy paste the contents of the file to a notepad, save it as an xml file and try to browse the xml file in the browser. If the xml file is unable to be rendered by the browser and throws error, then you can find the place where the tags are not well formed or invalid character(s) exist and rectify them.

Things worth noting is Web.config is case sensitive and even trailing / leading spaces can cause the above error.

This article applies to .NET - ASP.NET 1.0, 1.1 Versions.

Feedback

# re: You may receive the Error Message "Server Error in '/application name' Application" while browsing an asp.net application

I have made the changes given above but still the problem precedes.

Is any changes of security to be made.because i am use to asp but first time trying aspx pages on site. 9/24/2005 8:13 AM | Rupali Asodekar

# re: You may receive the Error Message "Server Error in '/application name' Application" while browsing an asp.net application

this is not helpful 11/28/2005 11:08 AM | safertr

# re: You may receive the Error Message "Server Error in '/application name' Application" while browsing an asp.net application

copy/pasting into a .xml file worked. thanks for the tip 11/30/2005 11:16 AM | tim

# re: You may receive the Error Message "Server Error in '/application name' Application" while browsing an asp.net application

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".

1/2/2006 1:57 AM | Ravi

# "Web.Config"

"Web.Config"
check if every "<" have its "/>",
in my case that was the problem. 1/11/2006 9:12 PM | Juvenal Q.

# re: You may receive the Error Message "Server Error in '/application name' Application" while browsing an asp.net application

What helped me was to copy the web.config file and then rename it as web.xml.
I had been earlier setting the mode attribute to off but this was not working, but as soon as I loaded this web.xml file in my browser, I saw that the default as created by VS 2005 was to comment this out. I had been looking at the line where the mode attribute was and not at the lines below. Loading web.config as an XML file immediately showed the commenting. 2/8/2006 3:29 AM | ASP Newbie

# re: You may receive the Error Message "Server Error in '/application name' Application" while browsing an asp.net application

I see, but it doesn't helpfull. 2/10/2006 7:38 PM | Yashar

# re: You may receive the Error Message "Server Error in '/application name' Application" while browsing an asp.net application

<div style="visibility:hidden">
<h1>hi</h1></div>
really nice website
2/27/2006 1:04 PM | jim

# re: You may receive the Error Message "Server Error in '/application name' Application" while browsing an asp.net application

I got the same error, and I emailed and asked my host to set the application directory for asp.net and also give full control to asp.net account on my domian folder.. and it worked...

there was nothing wrong in the web.config file and was running perfect locally.
3/30/2006 3:41 PM | Jibran

# re: You may receive the Error Message "Server Error in '/application name' Application" while browsing an asp.net application

Ok it is working (reirect to cutom error page) for me.How can i solve the actual pbm. 4/1/2006 4:47 PM | Raja

# re: You may receive the Error Message "Server Error in '/application name' Application" while browsing an asp.net application

i had the same problem too. but after installed .net framework 2.0, everything starts to work. 8/4/2006 2:41 PM | timothy t nguyen

# re: You may receive the Error Message "Server Error in '/application name' Application" while browsing an asp.net application

Friends at last i ve found out the solution for this error.

This is nothing but u have to Check the enable debugging option in ur Web site's control panel.
Sathya 8/20/2006 4:43 AM | Sathya Narayanan

# re: You may receive the Error Message "Server Error in '/application name' Application" while browsing an asp.net application

Friends at last i ve found out the solution for this error.

This is nothing but u have to Check the enable debugging option in ur Web site's control panel's asp.net option.
Sathya 8/20/2006 4:46 AM | Sathya Narayanan

# re: You may receive the Error Message "Server Error in '/application name' Application" while browsing an asp.net application

not working 4 m3 8/29/2006 8:29 AM | Rathi

# re: You may receive the Error Message "Server Error in '/application name' Application" while browsing an asp.net application

i set the mode opton in customerror tag to false after i got the following error

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 'Microsoft.SharePoint.ApplicationPages.GlobalAdminApplication'.

Source Error:


Line 1: <%@ Application Language="C#" Inherits="Microsoft.SharePoint.ApplicationPages.GlobalAdminApplication" %>



Source File: C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\60\template\admin\1033\global.asax Line: 1
can anyone please help?? 9/6/2006 4:23 AM | rasmita

# re: You may receive the Error Message "Server Error in '/application name' Application" while browsing an asp.net application

even i copied the file content and saved it as web.xml file and browsed it.. but stitl the error persists.. 9/6/2006 4:37 AM | rasmita

# I have tried all above nothing worked . Please suggest something else

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.


My Web.COnfig File COde

<configuration xmlns="http://schemas.microsoft.com/.NetConfiguration/v2.0">
<appSettings/>
<connectionStrings/>
<system.web>
<!--
Set compilation debug="true" to insert debugging
symbols into the compiled page. Because this
affects performance, set this value to true only
during development.

Visual Basic options:
Set strict="true" to disallow all data type conversions
where data loss can occur.
Set explicit="true" to force declaration of all variables.
-->
<pages>
<namespaces>
<clear/>
<add namespace="System"/>
<add namespace="System.Collections"/>
<add namespace="System.Collections.Specialized"/>
<add namespace="System.Configuration"/>
<add namespace="System.Text"/>
<add namespace="System.Text.RegularExpressions"/>
<add namespace="System.Web"/>
<add namespace="System.Web.Caching"/>
<add namespace="System.Web.SessionState"/>
<add namespace="System.Web.Security"/>
<add namespace="System.Web.Profile"/>
<add namespace="System.Web.UI"/>
<add namespace="System.Web.UI.WebControls"/>
<add namespace="System.Web.UI.WebControls.WebParts"/>
<add namespace="System.Web.UI.HtmlControls"/>
</namespaces>
</pages>
<!--
The <authentication> section enables configuration
of the security authentication mode used by
ASP.NET to identify an incoming user.
-->
<authentication mode="Windows"/>
<!--
The <customErrors> section enables configuration
of what to do if/when an unhandled error occurs
during the execution of a request. Specifically,
it enables developers to configure html error pages
to be displayed in place of a error stack trace.
-->
<customErrors mode="RemaoteOnly" defaultRedirect="GenericErrorPage.htm">
<error statusCode="403" redirect="NoAccess.htm" />
<error statusCode="404" redirect="FileNotFound.htm" />
</customErrors>

</system.web>
</configuration>

9/6/2006 10:26 AM | sinyal

# 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 loc

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. 10/30/2006 12:39 PM | ashish

# re: You may receive the Error Message "Server Error in '/application name' Application" while browsing an asp.net application

in localhost OK, in remote http://enigmaweb.testdotnet1.aruba.it/SpazioScuole/scuola1/Default.aspx failure ... WHY? 1/3/2007 10:37 AM | francesco

# re: You may receive the Error Message "Server Error in '/application name' Application" while browsing an asp.net application

I solved this problem. My host had my server switched to .NET 1.1 and had 2.0 and 1.1 Apps in the same APPLICATION POOL 6/18/2007 2:22 PM | Rhys

# re: You may receive the Error Message "Server Error in '/application name' Application" while browsing an asp.net application

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".


8/14/2007 10:07 PM | srinivasan

# re: You may receive the Error Message "Server Error in '/application name' Application" while browsing an asp.net application

I got the same error(Server Error in '/' Application.). I have chekched out through turning off the mode( <customErrors defaultRedirect="ErrorPage.aspx" mode="Off">). and it shows some errors in the code but the same code is running on the LOCALHOST successfully but NOT ON THE WEB SERVER. Can you please reply me? I will be really appreciate for the same. Is there any server setting for the same? 1/3/2008 2:49 AM | Dinesh Patankar

# re: You may receive the Error Message "Server Error in '/application name' Application" while browsing an asp.net application

Hey i found out the solution. this happens only because if we do not CREATE application in IIS. 1/7/2008 6:46 PM | Nilesh

# re: You may receive the Error Message "Server Error in '/application name' Application" while browsing an asp.net application

I am getting the same error even after making above all changes...
PS:Im wrkng in Remote server. 1/15/2008 12:23 AM | Praveen

# re: You may receive the Error Message "Server Error in '/application name' Application" while browsing an asp.net application

Description: An unhandled exception occured during the execution of current web request.
Exception details : System.invalid operation exception
1/24/2008 4:15 PM | rohini

# re: You may receive the Error Message "Server Error in '/application name' Application" while browsing an asp.net application

This is usually caused by the fact that either your web site hasnt been set as an IIs application in the IIs properties box, or a subfolder that must be an application, hasnt been designated as such. The other is the basic read permissions for the ASP.NET or Worker process account hasnt been set on the phyiscal folders in your site, starting at your web root folder on the server. Remember, in ASP.NET, your root of your web site must have basic read access for the ASP user identity, and be and set as application in IIs. This can sometimes get screwed up and chnages are made to various folders in your site.

Lastly you may be trying to run ASP.NET 2.0 code on a server setup for 1.0. Thats also common. These are all IIs issues your host must fix, if you are paying for third party hosting and cannot access IIs to change it.

Try removing then adding back your web site application on the web root, and that should fix most issues. 1/28/2008 7:09 PM | ImageIsland

# re: You may receive the Error Message "Server Error in '/application name' Application" while browsing an asp.net application

I keep getting this error whenever I try to login to a customer account on an internet website. The website owner has not had anyone else complain of this problem and I had a friend try accessing their site to see what happens with their browser.

The occurance only happens when I'm trying to use their login or checkout (of merchandise). Once I hit this page, I can use my back button and return to the page I was last viewing, but if I try to navigate to any other page in the website, I will then only get the same error message for each page I try to view.

If I clear my history, cookies, temp internet pages on my computer, I can then view any of the pages, until once again, I try to login to my customer account or try to check out with an item I've placed in the shopping card.

What is causing this to occur and is it something I can change in settings on my computer, or is it something the website owner needs to change in their website configuration?

Thanks for any help you can offer. 1/31/2008 10:04 AM | Pat Craig

# re: You may receive the Error Message "Server Error in '/application name' Application" while browsing an asp.net application

I got the same error(Server Error in '/' Application.). I have chekched out through turning off the mode( <customErrors defaultRedirect="ErrorPage.aspx" mode="Off">). and it shows some errors in the code but the same code is running on the LOCALHOST successfully but NOT ON THE WEB SERVER. Can you please reply me? I will be really appreciate for the same. Please any one help me to rectify this error soon 1/31/2008 7:54 PM | devi

# re: You may receive the Error Message "Server Error in '/application name' Application" while browsing an asp.net application

I also got this error and checked all the things above, but no answere could fix my problem. Only localhost everything worked perfectly but on remote server this error is shown all the time. Can please anybody help me finding a solution for my problem? I really don't know what I could do afterall. 2/25/2008 3:49 AM | noname

# re: You may receive the Error Message "Server Error in '/application name' Application" while browsing an asp.net application

i deleted my web.config file - that worked lol 3/1/2008 6:17 AM | natty

# Trying to upload .aspx webpages on FTP site getting server error in '/' How to install .net framework on Website's Ftp server

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>


4/11/2008 11:10 PM | Pooja

# re: You may receive the Error Message "Server Error in '/application name' Application" while browsing an asp.net application

plz help me 5/5/2008 8:54 PM | sandeep

# re: You may receive the Error Message "Server Error in '/application name' Application" while browsing an asp.net application

I have same error on remote server and not able to solved it pls help me on this topic
Urgent 5/7/2008 6:05 PM | sanjay kumar

# re: You may receive the Error Message "Server Error in '/application name' Application" while browsing an asp.net application

For me the problem was i had ASP.NET version 1.1 instead of 2.0.
In ISS - Website Properties - ASP.NET tab... select version 5/10/2008 4:45 AM | Sal

# re: You may receive the Error Message "Server Error in '/application name' Application" while browsing an asp.net application

I have the same error, it is possible that there is something wrong with the settings on the host machine, if that is the problem there is nothing you can do unless your host machine is at your place. A solution then is to send a mail to your provider with the comment that something is wrong on the host 5/15/2008 10:21 PM | Els

# re: You may receive the Error Message "Server Error in '/application name' Application" while browsing an asp.net application

Server Error in '/' Application.

Hi,

I am getting this error when I am trying to access by web site on server but if I use the same code on local host everthing works fine. It is only on web server taht I get error. I think it is due to IIS configuration, but exactly what I am not getting it. Pls help I am new to it.

Thanks in advance 7/23/2008 8:36 PM | Rashida

# re: You may receive the Error Message "Server Error in '/application name' Application" while browsing an asp.net application

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>

8/3/2008 11:53 PM | Ashwini

Post a comment





 

Please add 1 and 8 and type the answer here: