MVC 4 site publication in IIS is giving error

2

I uploaded my published application to IIS and I can not see it in the browser. Before I was giving Forbidden error (403) and now for Server Error (404). I've never uploaded a site in MVC to IIS. I've always known it's not the conventional way, there are a few things to set up and etc, but I confess I'm lost, me and my colleague running IIS here at the company.

    
asked by anonymous 03.07.2014 / 19:09

3 answers

3

Dude, here's the thing, first of all, install Microsoft's Web Platform. There are all the applications needed to deploy your application in IIS.
Ok, downloading and running Web Plataform, first of all, install IIS Express, which is the free one that is available for download. It's simple, and you've already done it.


Downloaded IIS and configure the application pools for the version of Asp.Net installed (v4.0).

  • Here's a tip, to access IIS go to the start menu > run > type inetmgr, done this will open up IIS, and make sure your application is in it, it is probably returning 404 because your application is not in IIS.

After installing IIS, install Web Deploy as well

What I do for my application to work in IIS and run my application: I deploy VS (and for that you should be running it in Administrator mode.) Right click on the VS shortcut and

Okay, you ran the VS, open your project and right click and go to the "Publish" option. When clicking you should create a profile and choose one of the options available to deploy in IIS and then, VS does everything for you.

You gave the deploy right, go in the browser and type in the address bar "localhost". If IIS is running without problems will appear an image that is an official pro website link from IIS from Microsoft. Ok, the image and such appeared, then type in the address bar "localhost / project_name" and hit enter. Ready your project will run smoothly.

Here I am not passing database server installation steps, because this is not the question ok?

    
03.07.2014 / 19:50
0

Install MVC support on the server:

  

link

    
03.07.2014 / 19:15
0

Hello, my server is Windows Server 2008 R2, I know how to suffer to configure .rsrs

  • The first step is to install via Microsoft Web Platform the recommended settings for IIS, see this tutorial How to do it: Installing and configuring Web Deploy on IIS 7
  • Install the version of .NetFrameWork in your application on the server, to know the configuration, see in your webconfig the value of the targetFramework attribute:
  • <httpRuntime targetFramework="4.5.1" />
    
  • Your application must be pooled with an embedded pipeline

  • I recommend that you initially enable debugging. leave the customErros in off mode and show the errors in detail, for this just add the following configuration in webconfig:

  •    <system.webServer>
        <httpErrors errorMode="Detailed" />
      </system.webServer>
      <system.web>
        <compilation debug="true" targetFramework="4.5.1" />
        <customErrors mode="Off" />
        <httpRuntime targetFramework="4.5.1" />
      </system.web>
    

    The good thing about using detailed errors is that it makes it easy for the server to match your application.

    I hope I have helped ..

        
    10.11.2014 / 17:18