Mac*_*ver 5 asp.net iis-7 web-config virtual-directory windows-server-2008
这可能是许多问题,但我试图在IIS设置或web.config配置中缩小问题的来源.这就是我需要你帮助的地方.我将在下面解释我的设置.通常我在IIS 7中创建网站,而不是虚拟目录,但我的根目录中有一堆共享的JavaScript框架(现在没有通知),我有一堆共享这些文件的应用程序.
我的理论是我没有为网站本身配置.网站的路径是虚拟目录路径上方的文件夹.有些东西告诉我,我需要这个,但我不记得它需要什么.
思考?
请注意,此设置在Windows XP虚拟目录设置中工作正常.但是我在Windows 7和Windows Server 2008上都遇到了这个错误.
这是网站错误:

文本错误(用于搜索):
Server Error in '/' Application.
Configuration Error
Descriptionn: An error occurred during the processing of a configuration file required to service this request. Please review the specific error details below and modify your configuration file appropriately.
Parser Error Message: 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.
Source Error:
<compilation debug=true" targetFramework="4.0" />
Run Code Online (Sandbox Code Playgroud)
网址:
http://localhost/app/index.aspx
Run Code Online (Sandbox Code Playgroud)
在我的应用程序池(虚拟目录所在的站点)中更改了这3个设置:

禁用"匿名身份验证"并启用"Windows身份验证":

虚拟目录文件夹中的web.config文件(网站的子文件夹):
<?xml version="1.0" encoding="UTF-8"?>
<!--
For more information on how to configure your ASP.NET application, please visit
http://go.microsoft.com/fwlink/?LinkId=169433
-->
<configuration>
<configSections>
</configSections>
<connectionStrings>
<!-- Local Machine -->
<add name="DATABASE" connectionString="Data Source=SERVERNAME\SQLEXPRESS;Initial Catalog=DATABASE-DEV;User ID=sa;Password=xxx" providerName="System.Data.SqlClient" />
</connectionStrings>
<!--<dataConfiguration defaultDatabase="DataAccessQuickStart">
<providerMappings>
<add databaseType="Devart.Data.Oracle.EnterpriseLibrary.OracleDatabase,Devart.Data.Oracle.EnterpriseLibrary" name="OracleX" />
</providerMappings>
</dataConfiguration>-->
<!--<location path="." allowOverride="true">
</location>-->
<system.web>
<compilation debug="true" targetFramework="4.0" />
<authentication mode="Windows" />
<authorization>
<deny users = "?" />
</authorization>
<membership>
<providers>
<clear />
<add name="AspNetSqlMembershipProvider" type="System.Web.Security.SqlMembershipProvider" connectionStringName="ApplicationServices" enablePasswordRetrieval="false" enablePasswordReset="true" requiresQuestionAndAnswer="false" requiresUniqueEmail="false" maxInvalidPasswordAttempts="5" minRequiredPasswordLength="6" minRequiredNonalphanumericCharacters="0" passwordAttemptWindow="10" applicationName="/" />
</providers>
</membership>
<profile>
<providers>
<clear />
<add name="AspNetSqlProfileProvider" type="System.Web.Profile.SqlProfileProvider" connectionStringName="ApplicationServices" applicationName="/" />
</providers>
</profile>
<roleManager enabled="false">
<providers>
<clear />
<add name="AspNetSqlRoleProvider" type="System.Web.Security.SqlRoleProvider" connectionStringName="ApplicationServices" applicationName="/" />
<add name="AspNetWindowsTokenRoleProvider" type="System.Web.Security.WindowsTokenRoleProvider" applicationName="/" />
</providers>
</roleManager>
<webServices>
<protocols>
<add name="HttpGet" />
<add name="HttpPost" />
</protocols>
</webServices>
<trace writeToDiagnosticsTrace="true" enabled="true" pageOutput="false" />
</system.web>
<appSettings>
</appSettings>
<!--<identity impersonate="true" />-->
<system.webServer>
<modules runAllManagedModulesForAllRequests="true" />
</system.webServer>
</configuration>
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
8331 次 |
| 最近记录: |