Server Error in '/log' Application - Runtime Error RRS feed

  • Question

  • User1400712404 posted

    I'm losing it...  I have looked at countless posts here and googling about the dreaded Server Error in Application/Run Time Error.  I had my site working yesterday and something I must have done has created a situation where I can no longer see it through IIS on my intranet.  I can still access it via the development machine though VWD.  Most everything I have read says to change the web.config so it reads customErrors mode="Off" which is exactly what it states in the error message, however this has no effect in letting me see anything different for an error message.  I read one post stating to copy the web.config file and save it as an xml file to verify that there aren't any errors and that looked fine which I accessed from the web directory where my application resides.  I also attempted to use a brand new config file with the bare bones in it, but that didn't seem to work either.  On the server itself there are IISSamples which work, so this leads me to believe I have something that is no longer associated correctly, but I have no clue. 

    I would greatly appreciate someones insight here.  THANKS!

    Thursday, July 19, 2007 11:09 AM

All replies

  • User1251226657 posted


    You can see actuall error by running the application localy on the server using the http://localhost/youappname . Try this and let me know if you are getting the actual error message this time or not. 


    Thursday, July 19, 2007 11:34 AM
  • User1400712404 posted

    This is kind of crazy, but there is a seperate web server set up on the server which has port 80, so if I attempt to use localhost I'm given the Not Found error because it's not on that part of the server.  If I then add the port which IIS is serving from 8080 I'm told "No web site is configured at this address".   But when I use Visual Web Developer to open it with localhost it uses its own port and the site opens and works without a problem from the machine. 

    THANKS, any other thoughts or ideas? 

    Thursday, July 19, 2007 11:58 AM
  • User1251226657 posted

    Ok, it looks like for some reason the application has been removed as application from the IIS. why dont you try publishing your website on IIS once again? Either by copying the application to web root or by selecting the new Virtual directory option for the IIS.

    Thursday, July 19, 2007 12:13 PM
  • User1400712404 posted

    I'm still getting the same error.  I attempted to recreate it two different times one by copying and the other by creating a new virtual directory.

    Thanks...any other thoughts??

    Thursday, July 19, 2007 12:44 PM
  • User1251226657 posted

    Can you please paste your error message and web.config on this forum?

    Thursday, July 19, 2007 1:04 PM
  • User1400712404 posted
    Here they are... I really hope you see something I'm missing.... Thanks!

    Server Error in '/OpLogAp' 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 -->
            <customErrors mode="Off"/>

    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 -->
            <customErrors mode="RemoteOnly" defaultRedirect="mycustompage.htm"/>
    <?xml version="1.0"?><!--

    Note: As an alternative to hand editing this file you can use the

    web admin tool to configure settings for your application. Use

    the Website->Asp.Net Configuration option in Visual Studio.

    A full list of settings and comments can be found in

    machine.config.comments usually located in



    configuration xmlns="http://schemas.microsoft.com/.NetConfiguration/v2.0">


    <system.web><customErrors mode="Off" /><!--

    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.


    <compilation debug="false" strict="false" explicit="true">


    <add assembly="System.Data.OracleClient, Version=, Culture=neutral, PublicKeyToken=B77A5C561934E089"/></assemblies></compilation>




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




    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="Off" defaultRedirect="GenericErrorPage.htm">

    <error statusCode="403" redirect="NoAccess.htm" />

    <error statusCode="404" redirect="FileNotFound.htm" />






    Thursday, July 19, 2007 1:14 PM
  • User1251226657 posted

    Its not showing the actual error message yet, So its diffcult to find the problem. The only solution is somehow get it run with the http://localhost/youapp . Then we can read the actual error message. OR another way is to create a custom error page to redirect your errors in the remote access mode.

    Add a simple custom error page to your project as below:

    Add the following content to myerrorPage.aspx


    Exception objError = Server.GetLastError().GetBaseException();
          string strError = "<b>Error Has Been Redirected to Custom Error Page</b><hr><br>" +
                      "<br><b>Error in: </b>" + Request.Url.ToString() +
                      "<br><b>Error Message: </b>" + objError.Message.ToString()+
                      "<br><b>Stack Trace:</b><br>" +


    Change your web.config as below : 

    <?xml version="1.0"?>
          <customErrors defaultRedirect="myerrorPage.aspx" mode="On"/>
    Try and let me know the actual error.

    Good Luck



    Thursday, July 19, 2007 1:46 PM
  • User1400712404 posted

    I would love to say I have a new error message, however I received the same one.  Is there some other way I might be able to get the runtime error to show??


    Thursday, July 19, 2007 2:30 PM
  • User1400712404 posted

    It's not that particular application, because I created a single page aspx page and I get the same error from that on the intranet but it works fine on the development side.  So, I'm assuming it must have something to do with the way .NET and IIS are configured together. 


    Thursday, July 19, 2007 3:36 PM
  • User1251226657 posted

    What version of windows is the IIS is running on? If it is Windows 2003, then make sure you have enabled the ASP.NET excecution by clicking the 'ALLOW' button under WebServices extentions node in IIS.

    Thursday, July 19, 2007 6:36 PM
  • User1400712404 posted

    It's windows 2000 server with IIS 5.0.  I wish I could get some sort message to help figure it out, it's a bit frustrating...

    Thanks so much for your help! 

    Thursday, July 19, 2007 8:22 PM
  • User1400712404 posted

    Well, out of curiosity, this morning I performed an apsnet_regiis -u and attempted to view my page and it came up without functionality, but I could see it ( a good feeling ).  I then reinstalled with aspnet_regiis.exe -i and received errors --

    Failure  Creating directory: C:\Inetpub\wwwroot\wwwAlarmEventLog\aspnet_client: CreateDirectoryInternal failed with HRESULT 80070003: 'The system cannot find the path specified.  '
    Failure  Creating list of client site scripts dirs: CreateSiteClientScriptDir failed with HRESULT 80070003: 'The system cannot find the path specified.  '
    Failure  Setting up client script files for website:*: Setting up client script files for website: failed with HRESULT 80070003: 'The system cannot find the path specified.  '

    I then did an aspnet_regiis.exe -ga , but I still receive the Server Error/Runtime Error.  Could it have something to do with the error on installing ASP.  Maybe I added some functionality that requires what's supposed to be in that directory???

    Any thoughts on that?  THANKS!!!

    Friday, July 20, 2007 8:03 AM
  • User1400712404 posted

    Interesting event...  I was able to force an error on the localhost/development side and it was the same Server Error message, so I changed the mode to Off and it showed me the error.  I attempted at that point to access it from the Intranet however it was still the generic Server Error telling me to change mode to Off.  Is it possible that even though on the properties box's ASP.NET tab it shows the web.config in that application's directory it's using a different one for requests from the intranet?

    Friday, July 20, 2007 11:53 AM
  • User-900677162 posted

    HI, zewbie:

    What is the exact error messgae you have met after you have set the mode to be false?

    Monday, July 23, 2007 1:59 AM
  • User1400712404 posted

    Thanks so much for all your input... Here's what finally worked...

    I changed the customErrors mode="Off" in the root web.config file and that finally worked.  I thought the child directory config file (the one in the folder of the application) was supposed to inherit, but override the root directory's config file, but it didn't.  So, I changed that and was given the message "Failed to access IIS metabase".  So to fix this I added ASPNET to the WebSite Operators on the Default Website and I'm back in business.  The only event that took place before I lost the ability to access my application via the intranet was the server was rebooted.  I really don't know why that caused these problems though.


    Monday, July 23, 2007 8:32 AM