customErrors doesn't work

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?
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads

Runtime error when customErrors are Off 0
customErrors 1
customerrors tag doesnt works 2
customErrors mode="Off" 2
Config Error!!! 1
<customErrors 3
<system.web> 2
page vs directory security 6

Members online

Forum statistics

Threads
473,770
Messages
2,569,584
Members
45,075
Latest member
MakersCBDBloodSupport

Latest Threads

Top