简体   繁体   中英

Same ASP.NET virtual directory, different behavior, why?

I use C# to create a virtual directory and the default document in IIS is an .aspx file. I also created an application pool for this virtual directory. The application pool's property is “Integrated” for .NET 4.0.

On virtual machine A, the virtual directory can be visited in browser. On virtual machine B, the virtual directory can't be visited in browser.

I add this node in the web.config on VM B, the virtual directory can be visited too

<system.webServer>
        <validation validateIntegratedModeConfiguration="false"/>
</system.webServer>

But I'm confused that why VM A could be visited without adding the above node? Both VM A and VM B are windows 8 and IIS7.

Can anyone offer me some help? Thanks!

Make sure there is no differences in the web.config files between those machines. Not only web.config of your virtual directory (by the way, since you have app pool assigned it is Application not Virtual Directory ) but also web.config of parent directories. There might be inherited configuration elements which are not compatible with application pool running in the Integrated mode.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM