0

I have gone through a lot of posts that might address my problem in deploying an ASP.NET webforms application built using Visual Studio 2013. After creating a website in server 2008 R2 using IIS7, calling(browsing) the URL results in a download window popup from IE with the port number as a file for download (which I am unable to download too even if I click on save).

The following is my web.config file :

<?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>

In IIS Application Pools, I have enabled .NET Framework Version as v4.0 with Manager Pipeline Mode to Integrated mode.

I tried setting The Process Model is set to "LocalSystem" and "ApplicationPoolIdentity" which really didn't help me.

I also tried using the command prompt and installing the .net version using

c:\windows\microsoft.net framework\v4.(some numbers)\regiis.exe -i

Stack Gods! Please let me know what I should be doing now?

Venkat Raman
  • 103
  • 14
  • What is the problem? Do you get an error or something? Just a guess, your IIS is running in a Framework 4 pool and your application is expecting 4.5?? – Steve Oct 20 '14 at 20:05
  • Yes, I am unable to find options above 4.0 in IIS. My project properties in visual studio show target framework as 4.5. But downgrading my project to 4.0 is causing me a lot of errors in the project. :( I don't get any error page at all. Just a blank page, with a download prompt. The download file has the file name of my port number. If I configure the binding to be localhost:8087, then the file name is 8087. I am unable to save the file too.... Any help? – Venkat Raman Oct 20 '14 at 20:06
  • Then try installing `.net 4.5` first – Pierre Oct 21 '14 at 14:08
  • Have you ensured that ASP.Net is active in IIS? IIS doesn't serve any dynamic pages by default and you must turn on the various technologies (ASP.Net, CGI, SSI, ASP, etc.) that you want to use. This was done to avoid admins deploying servers with potential attack vectors unwittingly. – Mark Fitzpatrick Oct 22 '14 at 13:08
  • You won't find higher than 4.0 in the pipeline mode because 4.5 is built on top. It's the same reason you don't see 3.0 and 3.5, only 2.0. – Mark Fitzpatrick Oct 22 '14 at 13:09
  • Mark Fitzpatrick is right. I learnt that from another question in SO. @MarkFitzpatrik, yeah i have all those enabled and the asp.net services are also running – Venkat Raman Oct 22 '14 at 13:12

0 Answers0