G
Guest
I tried working with the customErrors tag so that when the user tries to
access a page that doesn't exist, it will redirect him to the page not found
page. I discovered that it works when my authentication mode is set to None
and <allow users="*" /> rather than deny user="?".
If I change it to form authentication and deny user = "?", it gives me a
server error ("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."). It tells me to create a
<customErrors> tag within the web.config file. But I've already created it.
And if I change the mode to RemoteOnly, there will be no error but I can't
see the page.
This is how my web.config looks like:
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<system.web>
<compilation defaultLanguage="vb" debug="true" />
<customErrors defaultRedirect="techerror.aspx" mode="On">
<error statusCode="404" redirect="pagenotfound.aspx" />
</customErrors>
<authentication mode="Forms">
<forms name=".SMS" loginUrl="login.aspx" protection="All" timeout="30" />
</authentication>
<authorization>
<deny users="?" />
</authorization>
<trace enabled="false" requestLimit="10" pageOutput="false"
traceMode="SortByTime" localOnly="true" />
<sessionState mode="InProc" stateConnectionString="tcpip=127.0.0.1:42424"
sqlConnectionString="data source=127.0.0.1;Trusted_Connection=yes"
cookieless="false"
timeout="20" />
<globalization requestEncoding="utf-8" responseEncoding="utf-8" />
</system.web>
</configuration>
What should I do?
access a page that doesn't exist, it will redirect him to the page not found
page. I discovered that it works when my authentication mode is set to None
and <allow users="*" /> rather than deny user="?".
If I change it to form authentication and deny user = "?", it gives me a
server error ("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."). It tells me to create a
<customErrors> tag within the web.config file. But I've already created it.
And if I change the mode to RemoteOnly, there will be no error but I can't
see the page.
This is how my web.config looks like:
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<system.web>
<compilation defaultLanguage="vb" debug="true" />
<customErrors defaultRedirect="techerror.aspx" mode="On">
<error statusCode="404" redirect="pagenotfound.aspx" />
</customErrors>
<authentication mode="Forms">
<forms name=".SMS" loginUrl="login.aspx" protection="All" timeout="30" />
</authentication>
<authorization>
<deny users="?" />
</authorization>
<trace enabled="false" requestLimit="10" pageOutput="false"
traceMode="SortByTime" localOnly="true" />
<sessionState mode="InProc" stateConnectionString="tcpip=127.0.0.1:42424"
sqlConnectionString="data source=127.0.0.1;Trusted_Connection=yes"
cookieless="false"
timeout="20" />
<globalization requestEncoding="utf-8" responseEncoding="utf-8" />
</system.web>
</configuration>
What should I do?