Estimated Time to Complete: 5 Minutes
Server.MapPath() error ‘ASP 0175 : 80004005′
Disallowed Path Characters
/yourfile.asp, line 3
The ‘..’ characters are not allowed in the Path parameter for the MapPath method.
Why does this Error occur?
This error is occurs because when you try to call an ASP method that needs Parent Path’s to be enabled.
1. Your database is located in folder, say “database/mydb.mdb” and you are trying to connect to database from other folder, say ‘MySite’. So in your Connection file you set the path to: &Server.Mappath(“../database/mydb.mdb”).
#1. Click on Start, click on Administrative Tools and click Internet Information Services or Click on Run and type, “inetmgr”.
#2. Click on your Computer name and then click on Sites.
#3. Expand the Sites list and then click on the Name of the Website you want to configure.
#4. In the Website directory, double-click on ASP.
#5. Under the Behavior Tab, You can see Enable Parent Paths.
#6. Set Enable Parent Paths to True.
#7. You are done!
Update: You can also enable Parent Paths in IIS 7 by the below run command.
Just run these commands with Administrator Privilege.
%systemroot%\system32\inetsrv\appcmd unlock config /section:asp
%systemroot%\system32\inetsrv\APPCMD set config “Default Web Site” -section:system.webServer/asp /enableParentPaths:”true” /commit:apphost