hello, anyone can pls help on how to solve this issue, which is occurring when trying to load an aspx page (NOTE: The page or site in question was not dev. by me)

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

<configuration>
    <system.web>
        <customErrors mode="Off"/>
    </system.web>
</configuration>
<!-- Web.Config Configuration File -->

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

Recommended Answers

All 6 Replies

Member Avatar for stbuchok

Set customErrors mode to Off in the web config file. There is another error that is happening but is being hidden for security purposes.

I did not see the customErrors param in the code, this is the web.config file:

<?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 
    \Windows\Microsoft.Net\Framework\v2.x\Config 
-->
<configuration xmlns="http://schemas.microsoft.com/.NetConfiguration/v2.0">
	<appSettings>
  <add key="BeachClubEmail" value="beachclub@intnet.mu" />
  <add key="SMTPServer" value="mail.netplus.ch" />
  <add key="SMTPPort" value="25" />
  <add key="SMTPServerSSL" value="false" />
  <add key="SMTPServerNoLogin" value="true" />
  <add key="SMTPUserName" />
  <add key="SMTPUserPwd" />
  <add key="RedirectURLSent" value="./response.html" />
  <add key="RedirectURLFailed" value="./response_bad.html" />
 </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.
        -->
  <compilation debug="true" defaultLanguage="c#" />
		<!--
            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.
 --> 

 </system.web>
</configuration>
Member Avatar for stbuchok

Change it to the following (you have to add it):

<?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 
    \Windows\Microsoft.Net\Framework\v2.x\Config 
-->
<configuration xmlns="http://schemas.microsoft.com/.NetConfiguration/v2.0">
	<appSettings>
  <add key="BeachClubEmail" value="beachclub@intnet.mu" />
  <add key="SMTPServer" value="mail.netplus.ch" />
  <add key="SMTPPort" value="25" />
  <add key="SMTPServerSSL" value="false" />
  <add key="SMTPServerNoLogin" value="true" />
  <add key="SMTPUserName" />
  <add key="SMTPUserPwd" />
  <add key="RedirectURLSent" value="./response.html" />
  <add key="RedirectURLFailed" value="./response_bad.html" />
 </appSettings>
	<connectionStrings/>
	<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.
        -->
  <compilation debug="true" defaultLanguage="c#" />
		<!--
            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.
 --> 
 
 </system.web>
</configuration>

thx added the code, now what is the next step? I've tried open the page again but still same error as in first post

Exactly the same? With custom errors on you would see a basic message telling you that the details are hidden because custom errors is off etc.
With custom errors off you should see a lot more information, specifically in red at the top of the page a detailed error message.
Is the site currently running on your local machine or is it posted on a server at this point?
Maybe you could post up the full content of the error page.

well finally the server admin told me that the IIS server got corrupted, thus the cause for the error to be shown, and moved the site to another machine for hosting, which solved the problem

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.