Friday, December 22, 2006

整理:Current Path of ASP.net Application

ASP.net Application invokes a native dll.
The native dll need a conf file under Current Path. But what is the Current Path?
It is not the directory which the native dll locates.
Well....I found the answer is simple.
Because asp.net app is loaded by w3wp.exe, w3wp.exe is under C:\WINDOWS\system32\inetsrv
So the current path is C:\WINDOWS\system32\inetsrv !

1 comment:

Shawn Ling said...

My solution is using Server.MapPath() instead of CurrentPath().