Server.MapPath does not return the expected path

I was handed alegacy (classic ASP), a red-headed walking child who was beaten, shot and otherwise mutilated by a number of people before my time, statements and for my life, I can’t understand how he actually works on the production (I even received a copy with production if the files were not updated in source control).

I have code that executes the following

tmpDefaultXSLFile="xsl/SomeValue"
...
objXsl.load(Server.MapPath(tmpDefaultXSLFile & ".xsl"))

However, Server.MapPath does not seem to map the file to the expected location (that is, "\ asp_file_directory \ xsl \ SomeValue.xsl", and the required modification to the xsl file.

Is there any way I could trick the system into having a Server.MapPath card somewhere else?

+3
source share
2 answers

, IIS . URL- IIS, .

+1

server.mappath(Path) .

(/) (\), MapPath , .

, MapPath .asp.

0

Source: https://habr.com/ru/post/1793177/


All Articles