Web Config Error?

Discussion in 'ASP .Net' started by Sam, Jan 5, 2005.

  1. Sam

    Sam Guest

    Inquiry?
    --------
    I would like to authenticate all subdirectory via asp.net at Windows Server
    2003 and IIS 6.0 but it prompt an error message as shown as below:

    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>


    WEB CONFIG
    ----------------
    Please find my web config file.

    <!-- Web.Config Configuration File -->
    <configuration>
    <appSettings>
    <add key="ConnectionString"
    value="server=SQLSVR;database=ERP;uid=Intranet;pwd=88;" />
    </appSettings>
    <system.web>
    <customErrors mode="Off"/>
    <authorization>
    <deny users="?"/>
    </authorization>
    <authentication mode="Forms">
    <forms name="Intranet"
    loginUrl="http://SQLSVR/Finance/authentication.aspx" protection="All"
    path="/" timeout="20"/>
    </authentication>
    </system.web>
    </configuration>

    Please help and advise.

    Many thanks.
     
    Sam, Jan 5, 2005
    #1
    1. Advertising

  2. The actual error can only be seen if you view the page locally with
    "customErrors mode="RemoteOnly"" or on any client with "customErrors
    mode="Off""

    If you can't fullful either condition, you can only see that page which has
    not much use in terms of debugging.

    "Sam" <> ¦b¶l¥ó
    news: ¤¤¼¶¼g...
    > Inquiry?
    > --------
    > I would like to authenticate all subdirectory via asp.net at Windows

    Server
    > 2003 and IIS 6.0 but it prompt an error message as shown as below:
    >
    > 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>
    >
    >
    > WEB CONFIG
    > ----------------
    > Please find my web config file.
    >
    > <!-- Web.Config Configuration File -->
    > <configuration>
    > <appSettings>
    > <add key="ConnectionString"
    > value="server=SQLSVR;database=ERP;uid=Intranet;pwd=88;" />
    > </appSettings>
    > <system.web>
    > <customErrors mode="Off"/>
    > <authorization>
    > <deny users="?"/>
    > </authorization>
    > <authentication mode="Forms">
    > <forms name="Intranet"
    > loginUrl="http://SQLSVR/Finance/authentication.aspx" protection="All"
    > path="/" timeout="20"/>
    > </authentication>
    > </system.web>
    > </configuration>
    >
    > Please help and advise.
    >
    > Many thanks.
    >
    >
     
    Lau Lei Cheong, Jan 5, 2005
    #2
    1. Advertising

  3. Dear Sam,

    The error you see is a generic error. Please check your web.config file is
    properly formed. It is an xml file, case sensistive and even leading spaces
    can give error.

    If you are getting this error despite your web.config's custom error
    settings set to "off", then the possible chance could be with your
    web.config's tag formation only.

    Try copying the contents of the web.config into a notepad, save as an xml
    file and try to browse the file. If the tags are well formed, the xml will
    be rendered in your browser. Else, it will throw the error in the specific
    line.

    Write back if the error still persists.

    Thanks.


    "Sam" wrote:

    > Inquiry?
    > --------
    > I would like to authenticate all subdirectory via asp.net at Windows Server
    > 2003 and IIS 6.0 but it prompt an error message as shown as below:
    >
    > 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>
    >
    >
    > WEB CONFIG
    > ----------------
    > Please find my web config file.
    >
    > <!-- Web.Config Configuration File -->
    > <configuration>
    > <appSettings>
    > <add key="ConnectionString"
    > value="server=SQLSVR;database=ERP;uid=Intranet;pwd=88;" />
    > </appSettings>
    > <system.web>
    > <customErrors mode="Off"/>
    > <authorization>
    > <deny users="?"/>
    > </authorization>
    > <authentication mode="Forms">
    > <forms name="Intranet"
    > loginUrl="http://SQLSVR/Finance/authentication.aspx" protection="All"
    > path="/" timeout="20"/>
    > </authentication>
    > </system.web>
    > </configuration>
    >
    > Please help and advise.
    >
    > Many thanks.
    >
    >
    >
     
    =?Utf-8?B?cmFuZ2FuaA==?=, Jan 5, 2005
    #3
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. =?Utf-8?B?RGFuaWVs?=

    Machine.config & web.config

    =?Utf-8?B?RGFuaWVs?=, Jan 18, 2004, in forum: ASP .Net
    Replies:
    2
    Views:
    13,474
    Hermit Dave
    Jan 18, 2004
  2. Ivan
    Replies:
    1
    Views:
    3,096
    Natty Gur
    May 21, 2004
  3. Benny Ng
    Replies:
    9
    Views:
    10,234
    Benny Ng
    Oct 13, 2005
  4. CSharpner
    Replies:
    0
    Views:
    1,133
    CSharpner
    Apr 9, 2007
  5. CSharpner
    Replies:
    0
    Views:
    456
    CSharpner
    Apr 19, 2004
Loading...

Share This Page