问题描述
<?xmlversion="1.0"?><!--Note:Asanalternativetohandeditingthisfileyoucanusethewebadmintooltoconfiguresettingsforyourapplication.UsetheWebsite->Asp.NetConfigurationoptioninVisualStudio.Afulllistofsettingsandcommentscanbefoundinmachine.config.commentsusuallylocatedinWindowsMicrosoft.NetFrameworkv2.xConfig--><configuration><!--添加--><configSections><sectionGroupname="microsoft.web"type="Microsoft.Web.Configuration.MicrosoftWebSectionGroup,Microsoft.Web.Extensions,Version=1.0.61025.0,Culture=neutral,PublicKeyToken=31bf3856ad364e35"><sectionGroupname="scripting"type="Microsoft.Web.Configuration.ScriptingSectionGroup,Microsoft.Web.Extensions,Version=1.0.61025.0,Culture=neutral,PublicKeyToken=31bf3856ad364e35"><sectionGroupname="webServices"type="Microsoft.Web.Configuration.ScriptingWebServicesSectionGroup,Microsoft.Web.Extensions,Version=1.0.61025.0,Culture=neutral,PublicKeyToken=31bf3856ad364e35"><sectionname="jsonSerialization"type="Microsoft.Web.Configuration.ScriptingJsonSerializationSection,Microsoft.Web.Extensions,Version=1.0.61025.0,Culture=neutral,PublicKeyToken=31bf3856ad364e35"requirePermission="false"/><sectionname="profileService"type="Microsoft.Web.Configuration.ScriptingProfileServiceSection,Microsoft.Web.Extensions,Version=1.0.61025.0,Culture=neutral,PublicKeyToken=31bf3856ad364e35"requirePermission="false"/><sectionname="authenticationService"type="Microsoft.Web.Configuration.ScriptingAuthenticationServiceSection,Microsoft.Web.Extensions,Version=1.0.61025.0,Culture=neutral,PublicKeyToken=31bf3856ad364e35"requirePermission="false"/></sectionGroup></sectionGroup></sectionGroup></configSections><!--添加--><appSettings><addkey="CrystalImageCleaner-AutoStart"value="true"/><addkey="CrystalImageCleaner-Sleep"value="60000"/><addkey="CrystalImageCleaner-Age"value="120000"/></appSettings><connectionStrings><addname="zf2008ConnectionString"connectionString="DataSource=localhostSQLEXPRESS;InitialCatalog=zf2008;UserID=sa;Password=111"providerName="System.Data.SqlClient"/><!--<addname="zf2008ConnectionString"connectionString="DataSource=LIDA-D97D244EE6SQLEXPRESS;InitialCatalog=zf2008;IntegratedSecurity=True"/>--></connectionStrings><system.web><!--添加--><pages><controls><addtagPrefix="asp"namespace="Microsoft.Web.UI"assembly="Microsoft.Web.Extensions,Version=1.0.61025.0,Culture=neutral,PublicKeyToken=31bf3856ad364e35"/><addtagPrefix="asp"namespace="Microsoft.Web.UI.Controls"assembly="Microsoft.Web.Extensions,Version=1.0.61025.0,Culture=neutral,PublicKeyToken=31bf3856ad364e35"/></controls><tagMapping><addtagType="System.Web.UI.WebControls.CompareValidator"mappedTagType="Microsoft.Web.UI.Compatibility.CompareValidator,Microsoft.Web.Extensions,Version=1.0.61025.0,Culture=neutral,PublicKeyToken=31bf3856ad364e35"/><addtagType="System.Web.UI.WebControls.CustomValidator"mappedTagType="Microsoft.Web.UI.Compatibility.CustomValidator,Microsoft.Web.Extensions,Version=1.0.61025.0,Culture=neutral,PublicKeyToken=31bf3856ad364e35"/><addtagType="System.Web.UI.WebControls.RangeValidator"mappedTagType="Microsoft.Web.UI.Compatibility.RangeValidator,Microsoft.Web.Extensions,Version=1.0.61025.0,Culture=neutral,PublicKeyToken=31bf3856ad364e35"/><addtagType="System.Web.UI.WebControls.RegularExpressionValidator"mappedTagType="Microsoft.Web.UI.Compatibility.RegularExpressionValidator,Microsoft.Web.Extensions,Version=1.0.61025.0,Culture=neutral,PublicKeyToken=31bf3856ad364e35"/><addtagType="System.Web.UI.WebControls.RequiredFieldValidator"mappedTagType="Microsoft.Web.UI.Compatibility.RequiredFieldValidator,Microsoft.Web.Extensions,Version=1.0.61025.0,Culture=neutral,PublicKeyToken=31bf3856ad364e35"/><addtagType="System.Web.UI.WebControls.ValidationSummary"mappedTagType="Microsoft.Web.UI.Compatibility.ValidationSummary,Microsoft.Web.Extensions,Version=1.0.61025.0,Culture=neutral,PublicKeyToken=31bf3856ad364e35"/></tagMapping></pages><!--添加--><!--Setcompilationdebug="true"toinsertdebuggingsymbolsintothecompiledpage.Becausethisaffectsperformance,setthisvaluetotrueonlyduringdevelopment.--><httpHandlers><!--添加--><removeverb="*"path="*.asmx"/><addverb="*"path="*.asmx"validate="false"type="Microsoft.Web.Script.Services.ScriptHandlerFactory,Microsoft.Web.Extensions,Version=1.0.61025.0,Culture=neutral,PublicKeyToken=31bf3856ad364e35"/><addverb="GET"path="ScriptResource.axd"type="Microsoft.Web.Handlers.ScriptResourceHandler"validate="false"/><!--添加--><addpath="Reserved.ReportViewerWebControl.axd"verb="*"type="Microsoft.Reporting.WebForms.HttpHandler,Microsoft.ReportViewer.WebForms,Version=8.0.0.0,Culture=neutral,PublicKeyToken=b03f5f7f11d50a3a"validate="false"/><addverb="GET"path="CrystalImageHandler.aspx"type="CrystalDecisions.Web.CrystalImageHandler,CrystalDecisions.Web,Version=10.2.3600.0,Culture=neutral,PublicKeyToken=692fbea5521e1304"/></httpHandlers><!--添加--><httpModules><addname="WebResourceCompression"type="Microsoft.Web.Handlers.WebResourceCompressionModule,Microsoft.Web.Extensions,Version=1.0.61025.0,Culture=neutral,PublicKeyToken=31bf3856ad364e35"/><addname="ScriptModule"type="Microsoft.Web.UI.ScriptModule,Microsoft.Web.Extensions,Version=1.0.61025.0,Culture=neutral,PublicKeyToken=31bf3856ad364e35"/></httpModules><!--添加--><compilationdebug="true"><buildProviders><addextension=".rdlc"type="Microsoft.Reporting.RdlBuildProvider,Microsoft.ReportViewer.Common,Version=8.0.0.0,Culture=neutral,PublicKeyToken=b03f5f7f11d50a3a"/></buildProviders>
解决方案
解决方案二:
<assemblies><addassembly="CrystalDecisions.CrystalReports.Engine,Version=10.2.3600.0,Culture=neutral,PublicKeyToken=692fbea5521e1304"/><addassembly="CrystalDecisions.ReportSource,Version=10.2.3600.0,Culture=neutral,PublicKeyToken=692fbea5521e1304"/><addassembly="CrystalDecisions.Shared,Version=10.2.3600.0,Culture=neutral,PublicKeyToken=692fbea5521e1304"/><addassembly="CrystalDecisions.Web,Version=10.2.3600.0,Culture=neutral,PublicKeyToken=692fbea5521e1304"/><addassembly="CrystalDecisions.ReportAppServer.ClientDoc,Version=10.2.3600.0,Culture=neutral,PublicKeyToken=692fbea5521e1304"/><addassembly="CrystalDecisions.Enterprise.Framework,Version=10.2.3600.0,Culture=neutral,PublicKeyToken=692fbea5521e1304"/><addassembly="CrystalDecisions.Enterprise.InfoStore,Version=10.2.3600.0,Culture=neutral,PublicKeyToken=692fbea5521e1304"/><addassembly="Microsoft.Web.Extensions,Version=1.0.61025.0,Culture=neutral,PublicKeyToken=31bf3856ad364e35"/><addassembly="System.Design,Version=2.0.0.0,Culture=neutral,PublicKeyToken=B03F5F7F11D50A3A"/></assemblies></compilation><!--The<authentication>sectionenablesconfigurationofthesecurityauthenticationmodeusedbyASP.NETtoidentifyanincominguser.--><authenticationmode="Forms"><formsloginUrl="Login.aspx"protection="Validation"timeout="60"></forms></authentication><authorization><denyusers="?"/></authorization><!--The<customErrors>sectionenablesconfigurationofwhattodoif/whenanunhandlederroroccursduringtheexecutionofarequest.Specifically,itenablesdeveloperstoconfigurehtmlerrorpagestobedisplayedinplaceofaerrorstacktrace.<customErrorsmode="RemoteOnly"defaultRedirect="GenericErrorPage.htm"><errorstatusCode="403"redirect="NoAccess.htm"/><errorstatusCode="404"redirect="FileNotFound.htm"/></customErrors>--></system.web><!--添加--><microsoft.web><scripting><webServices><!--UncommentthislinetocustomizemaxJsonLengthandaddacustomconverter--><!--<jsonSerializationmaxJsonLength="500"><converters><addname="ConvertMe"type="Acme.SubAcme.ConvertMeTypeConverter"/></converters></jsonSerialization>--><!--Uncommentthislinetoenabletheauthenticationservice.IncluderequireSSL="true"ifappropriate.--><!--<authenticationServiceenabled="true"requireSSL="true|false"/>--><!--Uncommenttheselinestoenabletheprofileservice.ToallowprofilepropertiestoberetrievedandmodifiedinAtlasapplications,youneedtoaddeachpropertynametothesetPropertiesandgetPropertiesattributes.--><!--<profileServiceenabled="true"readAccessProperties="propertyname1,propertyname2"writeAccessProperties="propertyname1,propertyname2"/>--></webServices></scripting></microsoft.web><system.webServer><validationvalidateIntegratedModeConfiguration="false"/><modules><addname="ScriptModule"preCondition="integratedMode"type="Microsoft.Web.UI.ScriptModule,Microsoft.Web.Extensions,Version=1.0.61025.0,Culture=neutral,PublicKeyToken=31bf3856ad364e35"/></modules><handlers><removename="WebServiceHandlerFactory-ISAPI-2.0"/><addname="ScriptHandlerFactory"verb="*"path="*.asmx"preCondition="integratedMode"type="Microsoft.Web.Script.Services.ScriptHandlerFactory,Microsoft.Web.Extensions,Version=1.0.61025.0,Culture=neutral,PublicKeyToken=31bf3856ad364e35"/><addname="ScriptResource"verb="GET"path="ScriptResource.axd"type="Microsoft.Web.Handlers.ScriptResourceHandler"/></handlers></system.webServer><!--添加--></configuration>
解决方案三:
請在Web.Config中的Systen.Web區段下,加入底下文字:<httpHandlers><removeverb="*"path="*.asmx"/><addverb="*"path="*.asmx"validate="false"type="System.Web.Script.Services.ScriptHandlerFactory,System.Web.Extensions,Version=1.0.61025.0,Culture=neutral,PublicKeyToken=31bf3856ad364e35"/><addverb="GET,HEAD"path="ScriptResource.axd"type="System.Web.Handlers.ScriptResourceHandler,System.Web.Extensions,Version=1.0.61025.0,Culture=neutral,PublicKeyToken=31bf3856ad364e35"validate="false"/></httpHandlers><httpModules><addname="ScriptModule"type="System.Web.Handlers.ScriptModule,System.Web.Extensions,Version=1.0.61025.0,Culture=neutral,PublicKeyToken=31bf3856ad364e35"/></httpModules>
看看你写得跟上面有什么不同。
解决方案四:
试一下用下面代码替换你的config文件中<httpHandlers>…</httpHandlers>之间的代码<httpHandlers><removeverb="*"path="*.asmx"/><addverb="*"path="*.asmx"validate="false"type="System.Web.Script.Services.ScriptHandlerFactory,System.Web.Extensions,Version=1.0.61025.0,Culture=neutral,PublicKeyToken=31bf3856ad364e35"/><addverb="*"path="*_AppService.axd"validate="false"type="System.Web.Script.Services.ScriptHandlerFactory,System.Web.Extensions,Version=1.0.61025.0,Culture=neutral,PublicKeyToken=31bf3856ad364e35"/><addverb="GET,HEAD"path="ScriptResource.axd"type="System.Web.Handlers.ScriptResourceHandler,System.Web.Extensions,Version=1.0.61025.0,Culture=neutral,PublicKeyToken=31bf3856ad364e35"validate="false"/><addpath="Reserved.ReportViewerWebControl.axd"verb="*"type="Microsoft.Reporting.WebForms.HttpHandler,Microsoft.ReportViewer.WebForms,Version=8.0.0.0,Culture=neutral,PublicKeyToken=b03f5f7f11d50a3a"validate="false"/><addverb="GET"path="CrystalImageHandler.aspx"type="CrystalDecisions.Web.CrystalImageHandler,CrystalDecisions.Web,Version=10.2.3600.0,Culture=neutral,PublicKeyToken=692fbea5521e1304"/></httpHandlers>