Make a website as a sub folder of an existed website in IIS
I have website DOTNETAPI and deploy it into IIS with url http://www.domain.com (in my local: localhost:8080), now I want to make another web app run as http://www.domain.com/Demo
1. Publish new website into a folder Demo (or whatever you want)
2. Copy this folder into subfolder of DONETAPI website
3. In Internet Information Manager (IIS), expand DOTNETAPI, right click on Demo -> Add Application
4. Then Browser this with url http://www.domain.com/Demo
5. You may face with an error
[FileNotFoundException: Could not load file or assembly 'Microsoft.AspNet.TelemetryCorrelation' or one of its dependencies. The system cannot find the file specified.] System.RuntimeTypeHandle.GetTypeByName(String name, Boolean throwOnError, Boolean ignoreCase, Boolean reflectionOnly, StackCrawlMarkHandle stackMark, IntPtr pPrivHostBinder, Boolean loadTypeFromPartialName, ObjectHandleOnStack type) +0 System.RuntimeTypeHandle.GetTypeByName(String name, Boolean throwOnError, Boolean ignoreCase, Boolean reflectionOnly, StackCrawlMark& stackMark, IntPtr pPrivHostBinder, Boolean loadTypeFromPartialName) +95 System.Type.GetType(String typeName, Boolean throwOnError, Boolean ignoreCase) +64 System.Web.Compilation.BuildManager.GetType(String typeName, Boolean throwOnError, Boolean ignoreCase) +60 System.Web.Configuration.ConfigUtil.GetType(String typeName, String propertyName, ConfigurationElement configElement, XmlNode node, Boolean checkAptcaBit, Boolean ignoreCase)
the add these into web.config file of Demo app to fix
<configuration>
<system.webServer>
<modules runAllManagedModulesForAllRequests="false">
<remove name="TelemetryCorrelationHttpModule" />
<remove name="ApplicationInsightsWebTracking" />
</modules>
</system.webServer>
</configuration>
Comments
Post a Comment