将ASP.NET项目部署到IIS 7-Windows server 2008 R2

将ASP.NET项目部署到IIS 7-Windows server 2008 R2,asp.net,iis-7,webforms,visual-studio-2013,windows-server-2008-r2,Asp.net,Iis 7,Webforms,Visual Studio 2013,Windows Server 2008 R2,我已经阅读了很多文章,这些文章可能会解决我在部署使用Visual Studio 2013构建的ASP.NET webforms应用程序时遇到的问题。 在使用IIS7在server 2008 R2中创建网站后,调用浏览URL会从IE弹出一个下载窗口,其中端口号为下载文件,即使单击“保存”,我也无法下载该文件 以下是我的web.config文件: 诸神啊!请告诉我现在应该做什么?有什么问题吗?你有什么错误吗?只是猜测一下,您的IIS正在Framework 4池中运行,而您的应用程序预期为4.5??是

我已经阅读了很多文章,这些文章可能会解决我在部署使用Visual Studio 2013构建的ASP.NET webforms应用程序时遇到的问题。 在使用IIS7在server 2008 R2中创建网站后,调用浏览URL会从IE弹出一个下载窗口,其中端口号为下载文件,即使单击“保存”,我也无法下载该文件

以下是我的web.config文件:


诸神啊!请告诉我现在应该做什么?

有什么问题吗?你有什么错误吗?只是猜测一下,您的IIS正在Framework 4池中运行,而您的应用程序预期为4.5??是的,我无法在IIS中找到高于4.0的选项。VisualStudio中的我的项目属性将目标框架显示为4.5。但是将我的项目降级到4.0会在项目中给我带来很多错误我根本没有收到任何错误页面。只是一个空白页,有下载提示。下载文件的文件名为“我的端口号”。如果我将绑定配置为localhost:8087,则文件名为8087。我也无法保存该文件。。。。有什么帮助吗?然后先尝试安装.net 4.5。是否确保ASP.net在IIS中处于活动状态?默认情况下,IIS不提供任何动态页面,您必须启用要使用的各种技术ASP.Net、CGI、SSI、ASP等。这样做是为了避免管理员无意中部署具有潜在攻击向量的服务器。在管道模式下,您不会发现高于4.0的版本,因为4.5是构建在上面的。这和你看不到3.0和3.5的原因是一样的,只有2.0。
<?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>
  <!--
    For a description of web.config changes see http://go.microsoft.com/fwlink/?LinkId=235367.

    The following attributes can be set on the <httpRuntime> tag.
      <system.Web>
        <httpRuntime targetFramework="4.5" />
      </system.Web>
  -->
  <system.web>
    <compilation debug="true" strict="false" explicit="true" targetFramework="4.5" />
    <httpRuntime />
    <authentication mode="Windows" />
    <authorization>
      <deny users="?" />
    </authorization>
    <pages controlRenderingCompatibilityVersion="4.0">
      <namespaces>
        <add namespace="System.Web.Optimization" />
      </namespaces>
      <controls>
        <add assembly="Microsoft.AspNet.Web.Optimization.WebForms" namespace="Microsoft.AspNet.Web.Optimization.WebForms" tagPrefix="webopt" />
      </controls>
    </pages>
  </system.web>
  <runtime>
    <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
      <dependentAssembly>
        <assemblyIdentity name="Newtonsoft.Json" culture="neutral" publicKeyToken="30ad4fe6b2a6aeed" />
        <bindingRedirect oldVersion="0.0.0.0-6.0.0.0" newVersion="6.0.0.0" />
      </dependentAssembly>
      <dependentAssembly>
        <assemblyIdentity name="WebGrease" culture="neutral" publicKeyToken="31bf3856ad364e35" />
        <bindingRedirect oldVersion="0.0.0.0-1.5.2.14234" newVersion="1.5.2.14234" />
      </dependentAssembly>
    </assemblyBinding>
  </runtime>
      <system.webServer>
        <defaultDocument>
            <files>
                <clear />
                <add value="default.aspx" />
                <add value="Default.htm" />
                <add value="Default.asp" />
                <add value="index.htm" />
                <add value="index.html" />
            </files>
        </defaultDocument>
    </system.webServer>
</configuration>
c:\windows\microsoft.net framework\v4.(some numbers)\regiis.exe -i