Hi there!
Thank you for sharing the solution. It will be helpful for many in the community.
To do our part, here's a bit of our logic relevant to the topic. It is a snippet from our logic where AddDomain hosting the app шы getting initialized. As you can see, we rely on
HttpRuntime.AspClientScriptPhysicalPath to determine where "aspnet_client" folder is supposed to be located, but we also expect it is not always there:
Code:
this.lowerCasedClientScriptPathWithTrailingSlash = (HttpRuntime.AspClientScriptVirtualPath + "/").ToLowerInvariant();
this.physicalClientScriptPath = HttpRuntime.AspClientScriptPhysicalPath + "\\";
if (!Directory.Exists(this.physicalClientScriptPath))
{ // 64bit .NET Framework often does not have "ASP.NETClientFiles" folder in "C:\Windows\Microsoft.NET\Framework64\(ClrVersion)".
// We'll serve those files from "C:\Windows\Microsoft.NET\Framework\(ClrVersion)"
this.physicalClientScriptPath = this.physicalClientScriptPath.Replace(@"64\", @"\"); // Replace "Framework64\" with "Framework\"
if (!Directory.Exists(this.physicalClientScriptPath))
{
this.physicalClientScriptPath = HttpRuntime.AspClientScriptPhysicalPath + "\\";
Trace.TraceWarning("Folder \"{0}\" not found. Some applications (mostly relying on Crystal Reports) may not work properly.", this.physicalClientScriptPath);
}
}
Later
lowerCasedClientScriptPathWithTrailingSlash and
physicalClientScriptPath are used when mapping url path to the physical path. You could use MapPath() method in your app to see where "aspnet_client"-based paths are pointing to.
Also, if you are running
UWS Interactive server, you may see the warning produced by the Trace.TraceWarning() shown above in the code snippet, which will tell you if client resource path was configured incorrectly in the .NET Framework.
Best regards,
UltiDev Team.
Please donate at
http://www.ultidev.com/products/Donate.aspx to help us improve our products.