I've opened an existing web application project from Visual Studio 2013 (which runs just fine), in Visual Studio 2015. When I run it from within Visual Studio 2015 I get:
Active Server Pages error 'ASP 0131'
Disallowed Parent Path
/blah/login.asp, line 1
The Include file '../includes/Security.asp' cannot contain '..' to indicate the parent directory.
My IISExpress applicationhost.config file already contains the entry:
<asp appAllowClientDebug="false" appAllowDebugging="false" errorsToNTLog="false" enableParentPaths="true" scriptErrorSentToBrowser="true" bufferingOn="true">
<session allowSessionState="true" />
<cache diskTemplateCacheDirectory="%SystemDrive%\inetpub\temp\ASP Compiled Templates" />
<limits maxRequestEntityAllowed="1073741824" />
</asp>
My web application properties are set to use IISExpress.
What could I be missing?
You can enable or disable parent paths by using IIS Manager. To do so, open IIS Manager and navigate to the site or application where you want to configure parent paths, and then-double click the ASP feature. In the list of ASP features, configure the Enable Parent Paths option.
Log into the IIS Administration Console. Open the Directory Browsing section. Select On or Off to enable or disable the Parent Paths option. Click Set Parent Paths to save your setting.
The 'applicationhost.config' has moved and is now located in the hidden .vs folder. Make sure you're updating the right file.
Here is a much clear explaination although the accepted answer is in the right direction.
Since VS2015, IIS Express has changed where it picks up your applicationHost.config
file. This is presumably to simplify the distribution of projects. It has moved away from the traditional C:\Users\<profile>\Documents\IISExpress\config\applicationhost.config
folder (although this file will still exist on your computer to support older VS installations).
It is now located in the application project's root folder as a hidden file. To save you hunting for it, here is how you open it quickly and easily:
C:\<Path-To-Project>\.vs\config\applicationhost.config
)Hope this helps.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With