【问题标题】:Error index page of website from webconfigWeb 配置中网站的错误索引页面
【发布时间】:2018-11-21 08:37:32
【问题描述】:

我的索引页面有错误,我的托管支持告诉我“网络配置”文件有问题
http://schoolearn.ir/pay
这是我的网站

<?xml version="1.0"?>

<!--
  For more information on how to configure your ASP.NET application, please visit
  http://go.microsoft.com/fwlink/?LinkId=169433
  -->

<configuration>
 <connectionStrings>
    <add name="ApplicationServices"
         connectionString="data source=.\SQLEXPRESS;Integrated Security=SSPI;AttachDBFilename=|DataDirectory|\aspnetdb.mdf;User Instance=true"
         providerName="System.Data.SqlClient" />
  </connectionStrings>

  <system.web>
    <compilation debug="true" strict="false" explicit="true" targetFramework="4.0" />

    <authentication mode="Forms">
      <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>

我没有数据库,我的页面是静态的,但我需要使用 asp.net 来实现我的网站

【问题讨论】:

  • 将此&lt;customErrors mode="Off"/&gt; 添加到system.web 部分。那么错误页面会告诉你更多细节
  • 谢谢,我这样做了,页面显示错误,但我没有在 web.config 文件中找到 allowDefinition 标记

标签: asp.net web config


【解决方案1】:

正如错误所说:此错误可能是由于虚拟目录未配置为 IIS 中的应用程序,因此在 IIS 中您应该将 pay 目录转换为应用程序或移动文件到主机的根目录(而不是pay 目录),然后重试。

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2012-05-20
    • 2010-12-25
    • 2014-08-02
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2022-01-22
    相关资源
    最近更新 更多