Hi, I need to override the root websites error page settings in the web.config and use the settings in my subwebiste. Here are my settings in the subwebsite that i need to use to override the root website <customErrors mode='RemoteOnly' defaultRedirect='~/Errors/Errors.aspx'> <error statusCode='500' redirect='~/Errors/Errors.aspx'/> <error statusCode='404' redirect='~/Errors/Errors.aspx'/> </customErrors> thanks erik http://www.ErikLittle.com http://www.StarterSolutions.com http://www.BidWar.com http://www.constructionsupercenter.com http://www.BuildersStop.com http://www.ContractorsStop.com http://www.ProjectMaterials.com http://www.RehabMaterials.com http://www.RehabCafe.com http://www.SuperCenterPages.com http://www.SuperPagesDirectory.com http://www.TupeloBuilders.com http://www.TupeloContractors.com
Create a web.config for the subapplication and place this code in it. Aristotle DiscountASP.NET www.DiscountASP.NET
i did and this did nothing... This was my first approach before i posted to this form http://www.ErikLittle.com http://www.StarterSolutions.com http://www.BidWar.com http://www.constructionsupercenter.com http://www.BuildersStop.com http://www.ContractorsStop.com http://www.ProjectMaterials.com http://www.RehabMaterials.com http://www.RehabCafe.com http://www.SuperCenterPages.com http://www.SuperPagesDirectory.com http://www.TupeloBuilders.com http://www.TupeloContractors.com
When you say it did nothing, what do you mean? Can you elaborate on the problem further? Is there a URL that can show us the problem? Bruce DiscountASP.NET www.DiscountASP.NET
here is the subsite: http://debraellis.com when in the site just append some fake dir or bad extention and the end of the path and you will get the OOPS.htm page. This page is for the main site. My subsite error page says ERROR with an explantion , and redirects after so long. erik http://www.ErikLittle.com http://www.StarterSolutions.com http://www.BidWar.com http://www.constructionsupercenter.com http://www.BuildersStop.com http://www.ContractorsStop.com http://www.ProjectMaterials.com http://www.RehabMaterials.com http://www.RehabCafe.com http://www.SuperCenterPages.com http://www.SuperPagesDirectory.com http://www.TupeloBuilders.com http://www.TupeloContractors.com
When I inputted and fictitious aspx page the correct error page pulled up. When I inputted a fictitious subdirectory, asp page, html page, it reverted to another error page. This is the by design of IIS. All .aspx page will be handled by the aspnet and everything else will be managed my IIS. So the customerror configuration you incorporated on the web.config file will only work on asp.net web applications. Not really sure an easy way around this. You might want to have a generic error message for non aspnet webapplication with a backpage link so that it will take them back to the last page they were on.
erik. i am lost as to what your application is supposed to do. Can you further explain? Bruce DiscountASP.NET www.DiscountASP.NET
When ever there is an error in the sub site this is the error page that should display http://www.afcc1.com/afccRoot/Debra-Ellis/Errors/Errors.aspx ---however, i get the main sites error page which is oops.htm --In other words how do i over ride the root sites web.config file? thanks for the reply erik http://www.ErikLittle.com http://www.StarterSolutions.com http://www.BidWar.com http://www.constructionsupercenter.com http://www.BuildersStop.com http://www.ContractorsStop.com http://www.ProjectMaterials.com http://www.RehabMaterials.com http://www.RehabCafe.com http://www.SuperCenterPages.com http://www.SuperPagesDirectory.com http://www.TupeloBuilders.com http://www.TupeloContractors.com
Your custom error is working. If you input a non-existing .aspx page, it will redirect to your customerror page that is dictated by your web.config file. All other types of webpages 'asp, html, htm, php' and even fictious subdirectories will be controlled by IIS. Since your custom error for IIS is set to point to oops.htm, it will redirect it back to oops.htm. I have tested IIS and even with wild card mapping enabled, IIS will be used to determine which customer error to display and not your web.config file.
I see.. thanks a lot for the help! clears things up.. erik http://www.ErikLittle.com http://www.StarterSolutions.com http://www.BidWar.com http://www.constructionsupercenter.com http://www.BuildersStop.com http://www.ContractorsStop.com http://www.ProjectMaterials.com http://www.RehabMaterials.com http://www.RehabCafe.com http://www.SuperCenterPages.com http://www.SuperPagesDirectory.com http://www.TupeloBuilders.com http://www.TupeloContractors.com