I need to determine the actual literal path of the web site root directory. The application can be loaded on other servers and the web can be in a different location, such as "e: \ projects \ development \ wwwroot", or "f: \ webroot". Using getDirectoryFromPath (extension path ("/")
c: \ ColdFusion10 \ testInstance \ wwwroot gives the web root of the ColdFusion I need the IIS7 Web root path, such as c: \ inetpub \ wwwroot get it To do this, I like the .net class httpT timeline as and lt; cfset httpClass = createObject ("dotnet", "System.Web.HttpRuntime", "c: \ windows \ Microsoft.NET \ framework \ v4" Have tried to call. 0.30319.System.Web.dll ")>
AppDomainAppPath attributes to get ColdFusion error" Class System. Web.HttpRuntime specified method The vexation does not get mixed in the list. The assembly in which the class is included must be provided to the assembly attribute ".
According to Microsoft's MSDN Library, the following is true: HTTP.tr class namespace: System.web assembly: system
I have done that:
- The class definition was edited for "WebHTPRutime" and "HTTPRTime".
- Call and dump
& lt; Cfset domainClass = createObject ("dotnet", "system to prove environment and functionality
Servers on the network, no connection to the Internet ColdFusion 10 updates 14 / multiple instances IIS7 Microsoft 2008 with Microsoft Microsoft R2. Net Framework 4.5.1 installedenvironment: .app.domain", "c: \ windows \ Microsoft.NET \ framework \ V4.0.30319 \ mscorlib.dll ") & gt;
Do I probably miss another assembly that it depends on one? I'm not an expert on dot net, so I'm missing some very basic, here, here. Any advice would be greatly appreciated.
I think your web root folder is wwwroot
then you do it Can:
& lt; Cfset rootDir = left (getBaseTemplatePath), lane (getBaseTemplatePath ()) - find (reverse ('wwwroot'), reverse (getBaseTemplatePath)) + 2) & gt;
& lt; Cfdump var = "# rootDir #" />
Comments
Post a Comment