I'm using 4.0 .NET Framework coding web application using MVC. IIS 7 is running on the production system. The web application I'm trying to run is on a Windows Server 2008 R2.
In the application the web.config file has the following lines:
<system.web>
<compilation debug="true" targetFramework="4.0"/>
<customErrors mode="Off"/>
<identity impersonate="true"/>
<authentication mode="Windows"/>
<authorization>
<deny users="?"/>
</authorization>
On the server I went into IIS manager to Sites then to Default Web Sites. I right clicked and chose Add Application. Typed in the alias. The application pool was left at DefaultApplPool. The Physical Path I used the drop down box to drill down to my root directory. The path has the drive letter and fully qualified path name. Then I clicked o.k..
Then on the alias name I enabled Widows Authentication. Then I enabled the provided NTLM and made it to the first provider in the list.
I then used VS 2012 and published my web application to a sub-directory of the alias. So the alias is the virtual directory root and within this directory is a sub folder that contains the application code.
Every time I try to call the application I get the error that the allowDefinition=’Machine-To-Application’ beyond the application level. Of course if I change the physical path of the virtual directory to the sub folder it works. This isn’t desirable because I want to use the root directory to house more applications and not have to code specific paths to each one.
The strange part is the structure of virtual root directory with application in a sub folder is working on another server also running Windows Server 2008 R2 with IIS 7. I have been comparing options and I see no differences.
Any ideas? Ideas on what I can look at or options I can check? I believe I need perform further setup activities on the server, but what?
Thanks.