如何在 IIS 中将虚拟目录配置为应用程序以避免此类错误?我有一个使用 C# Visual Studio 构建的网页,并将虚拟目录添加到 ISS。运行页面时,我收到错误
It is an error to use a section registered as allowDefinition ='MachineToApplication' beyond application level. This error can be caused by a virtual directory not being configured as an application in IIS.
</compilation>
<authentication mode="Forms">
<forms loginUrl="~/LogOn" timeout="2880" />
所有这些代码目前都在我的主 web.config 中