none
开发的网站在IIS5可以运行 放在IIS7上不能上传文件 RRS feed

  • 常规讨论

  • 做的网站在IIS5上发布没有问题  发布在IIS7上不能进行文件上传

    web.config 配置如下

    <?xml version="1.0" encoding="utf-8"?>
    <!-- 
        注意: 除了手动编辑此文件以外,您还可以使用 
        Web 管理工具来配置应用程序的设置。可以使用 Visual Studio 中的
         “网站”->“Asp.Net 配置”选项。
        设置和注释的完整列表在 
        machine.config.comments 中,该文件通常位于 
        \Windows\Microsoft.Net\Framework\v2.x\Config 中 
    -->
    <configuration>
      <system.webServer>
        <handlers>
          <add name="ChartImageHandler" preCondition="integratedMode" verb="GET,HEAD,POST,PUT" path="ChartImg.axd" type="System.Web.UI.DataVisualization.Charting.ChartHttpHandler, System.Web.DataVisualization, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" />
          <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" />
        </handlers>
      </system.webServer>
      <appSettings>
        <add key="SQLCONNECTIONSTRING" value="data source=xxx.xxx.xxx.xxx;uid=sa;pwd=******;database=IRAMS;pooling=true;connection lifetime=10;min pool size = 10;max pool size=3000" />
        <add key="UPLOADIMAGEPATH" value="http://xxx.xxx.xxx.xxx/web/UploadImage" />
        <add key="FCKeditor:BasePath" value="~/fckeditor/" />
        <add key="FCKeditor:UserFilesPath" value="/web/UploadImage/" />

      </appSettings>
      <connectionStrings>
        <add name="IRAMSConnectionString" connectionString="Data Source=xxx.xxx.xxx.xxx;Initial Catalog=IRAMS;Persist Security Info=True;User ID=sa;Password=****" providerName="System.Data.SqlClient" />
        <add name="IRAMSConnectionString1" connectionString="Data Source=xxx.xxx.xxx.xxx;Initial Catalog=IRAMS;User ID=sa" providerName="System.Data.SqlClient" />
      </connectionStrings>
      <system.web>
        <!-- 
                设置 compilation debug="true" 将调试符号插入
                已编译的页面中。但由于这会 
                影响性能,因此只在开发过程中将此值 
                设置为 true。
            -->
        <pages controlRenderingCompatibilityVersion="3.5" validateRequest="false" clientIDMode="AutoID">
          <controls>
            <add tagPrefix="asp" namespace="System.Web.UI.DataVisualization.Charting" assembly="System.Web.DataVisualization, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" />
          </controls>
        </pages>
        <compilation debug="true" targetFramework="4.0">
          <assemblies>
            <add assembly="System.Design, Version=4.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A" />
            <add assembly="System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089" />
            <add assembly="System.Web.DataVisualization, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" />
            <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> 节可以配置 ASP.NET 使用的 
                安全身份验证模式,
                以标识传入的用户。 
            -->
        <authentication mode="None" />
        <customErrors mode="Off"></customErrors>
        <httpHandlers>
          <remove path="*.asmx" verb="*" />
          <add path="*.asmx" verb="*" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" validate="false" />
          <add path="*_AppService.axd" verb="*" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" validate="false" />
          <add path="ScriptResource.axd" verb="GET,HEAD" type="System.Web.Handlers.ScriptResourceHandler, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" validate="false" />
          <add path="Reserved.ReportViewerWebControl.axd" verb="*" type="Microsoft.Reporting.WebForms.HttpHandler, Microsoft.ReportViewer.WebForms, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" validate="false" />
          <add path="ChartImg.axd" verb="GET,HEAD,POST" type="System.Web.UI.DataVisualization.Charting.ChartHttpHandler, System.Web.DataVisualization, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" validate="false" />
        </httpHandlers>
      </system.web>
      <runtime>
        <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
          <dependentAssembly>
            <assemblyIdentity culture="neutral" />
            <bindingRedirect oldVersion="0.0.0.0-4.5.0.0" newVersion="4.0.8" />
          </dependentAssembly>
          <dependentAssembly>
            <assemblyIdentity name="Ext.Net.Utilities" publicKeyToken="2c34ac34702a3c23" culture="neutral" />
            <bindingRedirect oldVersion="0.0.0.0-2.0.1.26920" newVersion="1.3.0" />
          </dependentAssembly>
        </assemblyBinding>
      </runtime>
    </configuration>

    小弟第一次在IIS7上配服务器,查了好久还没解决 请各位大神帮帮忙

    2012年10月11日 4:46

全部回复