【问题标题】:app running fine in file system not it iis 6.0应用程序在文件系统中运行良好不是 iis 6.0
【发布时间】:2011-02-17 05:59:56
【问题描述】:

我有一个在文件系统中运行良好的 .NET 2.0 Web 应用程序。当我在 IIS 6.0 中配置相同的内容时,出现配置错误。

Source Error: 


Line 6:     <system.web>
Line 7:         <pages>
Line 8:             <controls>
Line 9:                 <add tagPrefix="asp" namespace="System.Web.UI" assembly="System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>
Line 10:            </controls>

这是整个 web.config 文件:

<?xml version="1.0"?>
<configuration>
<configSections>

</configSections>
<system.web>
    <pages>
        <controls>
            <add tagPrefix="asp" namespace="System.Web.UI" assembly="System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>
        </controls>
        <tagMapping>
            <add tagType="System.Web.UI.WebControls.CompareValidator" mappedTagType="Sample.Web.UI.Compatibility.CompareValidator, Validators, Version=1.0.0.0"/>
            <add tagType="System.Web.UI.WebControls.CustomValidator" mappedTagType="Sample.Web.UI.Compatibility.CustomValidator, Validators, Version=1.0.0.0"/>
            <add tagType="System.Web.UI.WebControls.RangeValidator" mappedTagType="Sample.Web.UI.Compatibility.RangeValidator, Validators, Version=1.0.0.0"/>
            <add tagType="System.Web.UI.WebControls.RegularExpressionValidator" mappedTagType="Sample.Web.UI.Compatibility.RegularExpressionValidator, Validators, Version=1.0.0.0"/>
            <add tagType="System.Web.UI.WebControls.RequiredFieldValidator" mappedTagType="Sample.Web.UI.Compatibility.RequiredFieldValidator, Validators, Version=1.0.0.0"/>
            <add tagType="System.Web.UI.WebControls.ValidationSummary" mappedTagType="Sample.Web.UI.Compatibility.ValidationSummary, Validators, Version=1.0.0.0"/>
        </tagMapping>
    </pages>
    <!--
      Set compilation debug="true" to insert debugging
      symbols into the compiled page. Because this
      affects performance, set this value to true only
      during development.
-->
    <compilation debug="true">
        <assemblies>
            <add assembly="System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>
            <add assembly="System.Transactions, Version=2.0.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"/>
            <add assembly="System.Data, Version=2.0.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"/>
            <add assembly="System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"/>
            <add assembly="System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A"/>
            <add assembly="System.Xml, Version=2.0.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"/></assemblies>
    </compilation>
    <httpHandlers>
        <remove verb="*" path="*.asmx"/>
        <add verb="*" path="*.asmx" validate="false" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>
        <add verb="*" path="*_AppService.axd" validate="false" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>
        <add verb="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>
        <add name="ScriptModule" type="System.Web.Handlers.ScriptModule, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>
    </httpModules>
</system.web>
<!--<system.web.extensions>
    <scripting>
        <webServices>
            --><!-- Uncomment this line to customize maxJsonLength and add a custom converter --><!--
            --><!--
  <jsonSerialization maxJsonLength="500">
    <converters>
      <add name="ConvertMe" type="Acme.SubAcme.ConvertMeTypeConverter"/>
    </converters>
  </jsonSerialization>
  --><!--
            --><!-- Uncomment this line to enable the authentication service. Include requireSSL="true" if appropriate. --><!--
            --><!--
    <authenticationService enabled="true" requireSSL = "true|false"/>
  --><!--
            --><!-- Uncomment these lines to enable the profile service. To allow profile properties to be retrieved
       and modified in ASP.NET AJAX applications, you need to add each property name to the readAccessProperties and
       writeAccessProperties attributes. --><!--
            --><!--
  <profileService enabled="true"
                  readAccessProperties="propertyname1,propertyname2"
                  writeAccessProperties="propertyname1,propertyname2" />
  --><!--
        </webServices>
        --><!--
  <scriptResourceHandler enableCompression="true" enableCaching="true" />
  --><!--
    </scripting>
</system.web.extensions>-->
<!--<system.webServer>
    <validation validateIntegratedModeConfiguration="false"/>
    <modules>
        <add name="ScriptModule" preCondition="integratedMode" type="System.Web.Handlers.ScriptModule, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>
    </modules>
    <handlers>
        <remove name="WebServiceHandlerFactory-Integrated"/>
        <add name="ScriptHandlerFactory" verb="*" path="*.asmx" preCondition="integratedMode" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>
        <add name="ScriptHandlerFactoryAppServices" verb="*" path="*_AppService.axd" preCondition="integratedMode" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>
        <add name="ScriptResource" preCondition="integratedMode" verb="GET,HEAD" path="ScriptResource.axd" type="System.Web.Handlers.ScriptResourceHandler, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>
    </handlers>
</system.webServer>-->

【问题讨论】:

  • @user619:您需要发布您在浏览器中看到的实际配置错误消息,而不仅仅是堆栈跟踪。屏幕截图效果很好。

标签: asp.net ajax iis-6 web-config


【解决方案1】:

需要在远程服务器上安装 System.Web.Extensions, Version=1.0.61025.0 程序集。

您可以在此 URL 上找到安装包: http://www.microsoft.com/downloads/en/details.aspx?FamilyID=ca9d90fa-e8c9-42e3-aa19-08e2c027f5d6&displaylang=en

Gtz,

史蒂芬。

【讨论】:

  • no stephane 我可以在同一系统的文件系统中运行应用程序,但不能从 iis 我什至重新安装了 ajax1.0 dll,但问题仍然存在
  • 你能按照 p.campbell 的要求给我们完整的错误信息吗?
【解决方案2】:

很抱歉,这是 iis 设置的问题,我没有为我正在配置的文件夹使用正确版本的 asp.net,因为我有 vs2005 和 vs2008,它已将默认版本设为 1.14。 x...我已将文件夹版本重置为 2.0.x.... 现在可以正常工作了

【讨论】:

    猜你喜欢
    • 2012-01-18
    • 1970-01-01
    • 1970-01-01
    • 2017-11-16
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2020-03-05
    • 2017-04-09
    相关资源
    最近更新 更多