Last post Jun 20, 2016 04:37 PM by ASPPROGMGP
Jun 17, 2016 06:45 PM|ASPPROGMGP|LINK
Hi, quick question.
I'm playing around with custom errors. I have a path issue. The app is running as a sub-folder in IIS. My error handling is as follows:
<error statusCode="404" subStatusCode="13" prefixLanguageFilePath="" path="~/AppErrors/30000.aspx" responseMode="Redirect"/>
This yields a URL of "http://myapp.com/aspnetappSubfolder/folder that App was in when 404 happened/~/AppErrors/30000.aspx".
This is obviously not right as the AppErrors folder is off the root of the application. How do I handle this path issue?
Jun 18, 2016 02:21 AM|lextm|LINK
IIS configuration elements under <system.webServer> do not honor ASP.NET syntax, so that you cannot use "~" like you used to in ASP.NET.
You must use an absolute path as described in this page.
Jun 20, 2016 04:37 PM|ASPPROGMGP|LINK
Thank you! Yes after reviewing the article it seems that responsemode dictates path requirements and that the only 'relative' option is relative to the web server not the application.