使用C#

时间:2018-03-07 09:37:38

标签: c# asp.net 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>
	<connectionStrings>
		<add name="ApplicationServices" connectionString="data source=.\SQLEXPRESS;Integrated Security=SSPI;AttachDBFilename=|DataDirectory|\aspnetdb.mdf;User Instance=true" providerName="System.Data.SqlClient" />
		<add name="ConnectionString" connectionString="Server=MSKUWWEBDB; Database=SchoolVisit; User Id=msrtest; password=qazcxzedc; Connection Timeout=1200; Pooling=true;Min Pool Size=0;Max Pool Size=100" providerName="System.Data.SqlClient" />
	</connectionStrings>
  <appSettings>       
    <add key="RequestEmail" value="WYousef@baroue.com;PBhattacharyya@ms-retail.com;barouekuwait@ms-retail.com" />
  </appSettings>
  
	<system.web>
    <httpHandlers>
       <add name="ReportViewerWebControlHandler" preCondition="integratedMode" verb="*" path="Reserved.ReportViewerWebControl.axd" type="Microsoft.Reporting.WebForms.HttpHandler, Microsoft.ReportViewer.WebForms, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" /> 
    </httpHandlers>
		<compilation debug="true" targetFramework="4.0">
      <assemblies>
        <add assembly="Microsoft.ReportViewer.WebForms, Version=10.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A" />
        <add assembly="Microsoft.ReportViewer.Common, Version=10.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A" />
        <add assembly="Microsoft.Build.Framework, Version=4.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A" />
        <add assembly="System.Management, Version=4.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A" />
      </assemblies>
      <buildProviders>
        <add extension=".rdlc" type="Microsoft.Reporting.RdlBuildProvider, Microsoft.ReportViewer.WebForms, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
      </buildProviders>
    </compilation>
		<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" />
        <defaultDocument>
            <files>
                <add value="Login.aspx" />
            </files>
        </defaultDocument>
	</system.webServer>
<system.webServer>
        <validation validateIntegratedModeConfiguration="false" />
    </system.webServer>
</configuration>

即使在我的webconfig文件的HTTP处理程序部分中添加它,我也会收到以下错误。我有其他Web应用程序使用相同的代码完美运行。只有一个应用程序抛出错误。

错误 - 报告查看器配置错误 报表查看器Web控件HTTP处理程序尚未在应用程序的web.config文件中注册。添加到web.config文件的system.web / httpHandlers部分,或添加到Internet Information Services 7或更高版本的system.webServer / handlers部分。

0 个答案:

没有答案