- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
将System.Data.Entity的组装添加到我的Web配置中后,出现以下错误:
使用超出应用程序级别注册为allowDefinition ='MachineToApplication'的节是错误的。此错误可能是由于未在IIS中将虚拟目录配置为应用程序引起的。
我已经删除了obj和bin文件夹,我删除了行authentication =“windows”,尝试重新打开,因为有人说它可以正常工作,我已经检查了主文件夹中只有1个web.config( Entity Framework -文件夹用于表格,模型,DAL和BLL)...
还有什么其他原因会导致这种情况发生?我到处搜索,基本上就是我发现的上述原因...。
如果有所不同,这是我的web.config:
<configuration>
<connectionStrings>
<add name="ApplicationServices"
connectionString="data source=.\SQLEXPRESS;Integrated Security=SSPI;AttachDBFilename=|DataDirectory|\aspnetdb.mdf;User Instance=true"
providerName="System.Data.SqlClient" />
<add name="CStringVKB" connectionString="Data Source=.;Initial Catalog=VKB;Persist Security Info=True;User ID=websiteservice;Password=websiteservice" providerName="System.Data.SqlClient" />
</connectionStrings>
<system.web>
<compilation debug="true" optimizeCompilations="true" targetFramework="4.0" >
<assemblies>
<add assembly="System.Data.Entity, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
</assemblies>
</compilation>
<!--<authentication mode="Windows">
<forms loginUrl="~/Account/Login.aspx" timeout="2880" />
</authentication>-->
<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>
</system.web>
<system.webServer>
<modules runAllManagedModulesForAllRequests="true"/>
</system.webServer>
</configuration>
最佳答案
基本上,该错误意味着您的子文件夹之一中包含一个web.config文件,该文件具有不应包含的配置元素。这是您的根/仅Web配置文件吗?如果没有,您也可以张贴那些吗?
同样,这听起来很愚蠢,但是我会再次检查您是否正在IDE中打开网站本身(并且没有错误地打开父文件夹)。不在正确的目录中。
这是有关如何为ASP设置web.config层次结构的很好的解释,可帮助您直观地了解其工作方式:http://scottonwriting.net/sowblog/archive/2010/02/17/163375.aspx
关于asp.net - 在应用程序级别之外注册为allowDefinition ='MachineToApplication'的部分,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/16187110/
我在创建新文件夹并向其中上传文件时遇到此错误。我有一个已构建的现有站点,但我不想将其添加到该站点,而是让它本身就是一个应用程序。有任何想法吗? 最佳答案 这确实是第一个要检查的场景。但是,发生此错误的
在根目录下,我具有以下结构 .. .. .. web.config Report Folder - Login.aspx - Web.config | |-> ViewReport
在我们的开发环境中运行的 Intranet 应用程序上出现此错误,我不确定该去哪里/寻找解决方案。该应用程序过去运行良好,但它与另一个开发人员团队在共享服务器上运行,我们无法跟踪错误(我的团队没有对应
添加到 web.config 后,从 VS 2013/2012 发布 MVC 项目失败 或 等(部分注册为 allowDefinition='MachineToApplication')。 患者:
我已经下载了 ASP.Net 的在线项目。运行应用程序时出现错误 It is an error to use a section registered as allowDefinition='Mach
关于这个主题有大量的 SO 帖子。到目前为止,解决方案似乎是将 IIS 中的目录配置为应用程序。另一个常见的解决方案是从根目录中的文件夹中删除备份的 web.config 文件。 我的问题有所不同,因
是否可以使用 appcmd 更改 allowDefinition 的值?具体来说,我尝试在应用程序级别启用对 httpCompression 模块的更改。 通过手动更改以下行来修改 applicati
在我的 Asp.Net MVC 4 项目中,我在 .csproj 文件中设置了构建 View true .问题是构建项目时出现错误: It is an error to use a section r
我在 SO 上看到了一些关于在部署网站时出现类似错误的问题,但我似乎在 时随机收到此错误。建筑 Visual Studio 中的 ASP.NET MVC 网站。执行清洁通常可以修复它,但是有什么方法可
我是一名优秀的程序员,十分优秀!