Microsoft IIS
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
 
 
User Name:
Password:
Remember me
Go Back   ASP Free ForumsSystem AdministrationMicrosoft IIS

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread ASP Free Forums Sponsor:
  #1  
Old March 11th, 2005, 11:41 AM
iSpeakGeek iSpeakGeek is offline
Registered User
ASP Free Newbie (0 - 499 posts)
 
Join Date: Aug 2004
Posts: 3 iSpeakGeek User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 27 m 8 sec
Reputation Power: 0
Handling Custom Error 401.2 (Re-visited)

---This is a continuation of a previous thread that's gotten a little stale. ---

Hi Elguaro,

In my original post (http://forums.aspfree.com/showpost.php?p=100206&postcount=5) I gave a technique for overriding the default 401.2 error (one of the few that ASP.NET doesn't allow us to customize via web.config). You asked:

Quote:
Originally Posted by elguaro
This does display the custom error page but I'm also getting a pop-window with an "Enter Network Password" dialog. How can I get rid of this and go straight to my custom error page????? Thanks

You are getting the network password dialog because your error page is using the same security settings that the rest of your application is and, if you're not allowing this person access to the rest of your site, you're not allowing them access to your error page either.

I should have mentioned that in my original post (sorry, but I was a little out of it by then). To override your security settings and allow anyone to view your error page(s) I recommend the following:
  1. Create a folder called "errors" underneath your application's root folder.
  2. Add the following to your web.config file inside the <configuration> tags

    <location path="errors" allowOverride="true">
    <system.web>
    <authorization>
    <allow users="*" />
    </authorization>
    </system.web>
    </location>
  3. Be careful that you don't create any security issues by exposing the pages in this folder (i.e. error pages that might display information that a hacker or malicious user might find useful. If you want to be extra cautious, you can modify the <location> tag above so that it only overrides the security settings for your single error page.
That should do it!

Cheers,

John

Reply With Quote
Reply

Viewing: ASP Free ForumsSystem AdministrationMicrosoft IIS > Handling Custom Error 401.2 (Re-visited)


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 4 hosted by Hostway