每个配置文件中的部分只能出现一次。请参阅帮助主题 了解异常情况。为什么?

2024-03-14

配置错误 描述:处理服务此请求所需的配置文件期间发生错误。请查看下面的具体错误详细信息并适当修改您的配置文件。

<configuration>

  <system.net>
    <mailSettings>
      <smtp from="[email protected] /cdn-cgi/l/email-protection">
        <network host="smtp.gmail.com" enableSsl="true" defaultCredentials="false" port="587" userName="****" password="****"/>
      </smtp>
    </mailSettings>
  </system.net>

  <connectionStrings>
    <clear/>
<add name="SqlState" connectionString="Data Source=localhost;DataBase=AnyNameOfServerState;Integrated Security=True" providerName="System.Data.SqlClient"/>
<add name="YourGuruDB" connectionString="Data Source=DIMA-00AA1DA557;Initial Catalog=model;Integrated Security=True"/>
<add name="modelConnectionString" connectionString="Data Source=.\SQLEXPRESS;AttachDbFilename='D:\Documents and Settings\Dima\My Documents\Visual Studio 2010\WebSites\WebSite10\App_Data\ASPNETDB.MDF';Integrated Security=True;User Instance=True;Trusted_Connection=Yes;" providerName="System.Data.SqlClient"/>
  </connectionStrings>


  <system.web>

<sessionState mode="SQLServer" sqlConnectionString="SqlState" allowCustomSqlDatabase="true" cookieless="false" timeout="20"/>
<compilation debug="true"/>

<authentication mode="Forms">
  <forms name=".MyCookie" loginUrl="~/Registration.aspx" protection="All" timeout="30" path="/">
    <credentials passwordFormat="MD5">
      <user name="****" password="****"/>
    </credentials>
  </forms>
</authentication>

<authorization>
  <deny users="?"/>
  <allow users="*"/>
</authorization>

<roleManager enabled="true" defaultProvider="MyRoleProvider">
  <providers>
    <clear/>
    <add name="MyRoleProvider" applicationName="/" connectionStringName="modelConnectionString" type="System.Web.Security.SqlRoleProvider"/>
  </providers>
</roleManager>

<membership defaultProvider="MyMembershipProvider">
  <providers>
    <clear/>
    <add name="MyMembershipProvider" type="System.Web.Security.SqlMembershipProvider" connectionStringName="modelConnectionString" minRequiredPasswordLength="1" minRequiredNonalphanumericCharacters="0" enablePasswordReset="true" maxInvalidPasswordAttempts="1000" passwordAttemptWindow="4000" enablePasswordRetrieval="true" requiresUniqueEmail="false" passwordFormat="Encrypted" applicationName="/WebSite10"/>
  </providers>
</membership>

<machineKey validationKey="****" decryptionKey="****" validation="SHA1" decryption="AES"/>
<compilation debug="true" targetFramework="4.0">
  <assemblies>
    <add assembly="System.Design, Version=4.0.0.0, Culture=neutral, PublicKeyToken=****"/>
    <add assembly="System.Web.Extensions.Design, Version=4.0.0.0, Culture=neutral, PublicKeyToken=****"/>
    <add assembly="System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=****"/>
    <add assembly="System.Data.Linq, Version=4.0.0.0, Culture=neutral, PublicKeyToken=****"/>
  </assemblies>
</compilation>

您有两个编译标签

<compilation debug="true"/> 

and

<compilation debug="true" targetFramework="4.0">   
    <assemblies>     
        <add assembly="System.Design, Version=4.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A"/>     
        <add assembly="System.Web.Extensions.Design, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>     
        <add assembly="System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"/>     
        <add assembly="System.Data.Linq, Version=4.0.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"/>   
    </assemblies> 
</compilation> 
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)

每个配置文件中的部分只能出现一次。请参阅帮助主题 了解异常情况。为什么? 的相关文章

  • 如何简化 ASP.NET MVC 中的全状态交错模式对话框

    我需要在多对多模式对话框中保留状态渐进增强 http en wikipedia org wiki Progressive enhancementASP NET MVC 项目中的方式 在我的代码中 当禁用 javascript 时 模式对话框
  • __doPostBack 方法如何被调用?调用方法在哪里?

    我用了一个
  • 将数据集导出到 EXCEL

    我使用以下代码将数据库表中的字段导出到 Excel 中 我想要做的是能够编写一条 SQL 语句从多个表中检索字段并将其导出到 Excel 中 这段代码只允许我导出一张表 另外 如何显示保存提示对话框 示例代码将不胜感激 非常感谢 prote
  • 使用 ASP.Net 和 C# 统计网站的访问者数量

    我想跟踪我网站的访问者数量 我在 Global asax 类中尝试了以下代码
  • App.Config 和 Web.Config 之间的区别?

    当在 wpf 中构建桌面应用程序时 您可以阅读问题文档并在人们的答案引用 web config 时安全地替换 app config 吗 如果是这样 您是否需要注意任何明显的陷阱 tnx 阅读文档 http msdn microsoft co
  • 本地化 ASP.NET 资源的滑动过期

    假设我们有 2 个站点 myDomain AU 和 myDomain RU 具有相同的代码和本地化资源文件 resx 和 ru resx 我们预计大多数英语用户将使用 AU 网站 大多数俄语用户将使用 RU 网站 但是 如果 AU 域的某些
  • asp.net 将值从 JS/jquery 传递到 C# 背后的代码

    我已经尝试了 所有 可能的方法 将 screen width vlaue 从 aspx 页面上的 JS 脚本发送到后面代码中的 c 虽然我可以看到 screen width 被正确分配 但它永远不会分配给我的隐藏字段价值
  • ASP.NET Core URL 重写

    我正在尝试将我的网站从 www 重定向到非 www 规则以及 http 到 https https example com https example com 在中间件中 我曾经在 web config 中进行这些重定向更改 例如
  • ASP.NET Core 与现有的 IoC 容器和环境?

    我想运行ASP NET 核心网络堆栈以及MVC在已托管现有应用程序的 Windows 服务环境中 以便为其提供前端 该应用程序使用 Autofac 来处理 DI 问题 这很好 因为它已经有一个扩展Microsoft Extensions D
  • 将字符串转换为正确的 URI 格式?

    有没有简单的方法可以将电子邮件地址字符串转换为正确的 URI 格式 Input http mywebsite com validate email 3DE4ED727750215D957F8A1E4B117C38E7250C33 email
  • 在 IIS URL 重写模块中自定义 HTTP 标头

    我被一个简单的出站规则困住了 我想修改HTTP内容类型 to 应用程序 原子 xml 如果 URL 完全匹配http wayneye com Feeds Atom http wayneye com Feeds Atom 我的规则 XML
  • 将 jQuery 验证器规则添加到 ASP 中动态创建的元素

    我在 MVC3 项目的页面上有一些动态插入的表单字段 通常我们会在服务器端添加 jQuery 验证 但在这种情况下我们不能 UI 中的多个字段生成一个隐藏字段的值 这就是提交的内容 我们无法针对隐藏字段进行验证 因此我们必须为用户可以看到的
  • 自定义行为的配置错误

    我创建了一个与 WCF 服务一起使用的自定义行为 以将所有错误记录到应用程序日志中 我做了一个BehaviorExtensionElement对于行为 public ErrorLoggingBehaviorExtensionElement
  • 共享 Global.asax 和 Error.aspx 文件

    我的解决方案中有多个 ASP NET 网站以及一个常见的 C 代码项目 事情如下 Website1 Website2 网站 n Common 首先 我想使用 Global asax 文件来记录所有未处理的异常 我可以为每个网站拥有一个 Gl
  • 使用 HtmlAgilityPack 解析 dl

    这是我尝试使用 ASP Net C 中的 Html Agility Pack 解析的示例 HTML div class content div dl dt b a href 1 html title 1 1 a b dt dd First
  • 更改中继器中链接按钮的文本

    我有一个中继器 可以显示与帖子相关的评论 我想添加一些功能 当用户单击它来自的链接时 举报此帖子 to 帖子已被标记 如何访问特定的lnkBut ton 显然 在 ItemDataBound 中 这很容易完成 但在 click 方法中 我不
  • 在正常运行时间较长后,服务器端 SignalR 连接失败

    我在 StackOverflow 上搜索了许多与 SignalR 连接相关的其他问题 但似乎都不适用于我的具体情况 我有一个使用 SignalR 集线器的应用程序 客户端可以使用两种方法连接到集线器 通过使用底层客户端连接到集线器的 NET
  • 使用 Enumerable.OfType() 或 LINQ 查找特定类型的所有子控件

    Existed MyControl1 Controls OfType
  • 如何配置 IIS 以接受 POST 请求?

    我知道默认情况下 IIS 不接受发布请求 如何更改此设置 有人可以引导我改变这个 一步一步 吗 如果您使用的是 IIS 6 及更低版本 在 IIS 管理屏幕中右键单击您的网站或虚拟目录 去Properties然后去Home Director
  • 动态生成的控件 ID 返回为 NULL

    我可以在 Page PreInit 函数中创建动态控件 如何检索控件及其 ID 我的 C 代码用于创建动态控件之一 var btn new WebForms Button btn Text btn ID Addmore btn Click

随机推荐