.net - Get the IIS Web Root Path using dotNet -
.net - Get the IIS Web Root Path using dotNet -
i need determine actual literal path web site root directory. application may loaded on other servers , web root may in different location "e:\projects\development\wwwroot", or "f:\webroot". using getdirectoryfrompath(expandpath("/"))
returns coldfusion web root of c:\coldfusion10\testinstance\wwwroot. need iis7 web root path, c:\inetpub\wwwroot. this, have tried calling .net class httpruntime <cfset httpclass = createobject("dotnet","system.web.httpruntime","c:\windows\microsoft.net\framework\v4.0.30319.system.web.dll")>
in order appdomainapppath property. coldfusion throws error "class system.web.httpruntime not found in specified assembly list. assembly contains class must provided assembly attribute".
according microsoft's msdn library, next true: httpruntime class namespace: system.web assembly: system.web (in system.web.dll)
what have done:
edited class definition "web.httpruntime" , "httpruntime" called , dumped<cfset domainclass = createobject("dotnet","system.appdomain","c:\windows\microsoft.net\framework\v4.0.30319\mscorlib.dll")>
prove environment , methodology environment: server on closed network, no connection net coldfusion 10 update 14/multiple instances windows 2008r2 iis7 microsoft .net framework 4.5.1 installed
am maybe missing assembly 1 depends on? i'm no expert on dotnet, may missing basic, here. advice appreciated.
i tried , got same error in environment. guessing because there 2 versions of system.web.dll on filesystem: microsoft.net\framework\v2.0.50727 , microsoft.net\framework\v4.0.30319\ . changed path point older version , worked fine:
httpclass = createobject("dotnet" , "system.web.httpruntime" , "c:\windows\microsoft.net\framework\v2.0.50727\system.web.dll")
.net iis coldfusion coldfusion-10
Comments
Post a Comment