Publication of MVC 4 site on IIS is giving error

Asked

Viewed 3,089 times

2

I uploaded my published application to IIS and I can’t see in the browser. Before I was giving error of Forbidden(403) and now of Server Error(404). I’ve never uploaded an MVC site to the IIS. I always knew that it is not the conventional way, there are some things to be set and etc, but I confess I am lost, me and my colleague who manages the IIS here in the company.

  • MVC support was installed on this IIS?

  • I’ll ask. I didn’t even know it. Is there a framework for IIS that should be installed? Do you have to download this? I’ll do some research on where to get it, but if anyone knows and can pass me.

3 answers

3

Dude, the thing is, first of all, install the Microsoft Web Platform. There are all the applications needed to deploy your application on IIS.
Okay, by downloading and running the Web Platform, first of all, install IIS Express, which is the free that is available for download. It’s simple, and you’ve done it.


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

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

After installing IIS, install Web Deploy as well

What I do to make my application work on IIS and run: I deploy it on VS(and for that you should be running it in Administrator mode. To do this, right-click the VS shortcut and choose the "Run as Administrator" option. This in normal Pcs, because in Servers VS runs in Administrator mode always).

OK ran the VS, open your project and right click and go on "Publish" option. When you click you must create a profile and choose one of the options available to deploy on IIS and ready, VS does everything for you.

Give the right deploy, go to the browser and type in the address bar "localhost". If IIS is running smoothly an image will appear which is a link to the official Microsoft IIS website. Ok, the image appeared and such, then type in the address bar "localhost/project name_name" and enter. Ready your project will run smoothly.

Here I am not passing steps to install Database Server, as this is not the ok question ?

  • I will test and working or I will not post the result again.

  • Easy man, it’s good this feedback. Test there and see !

0

  • It didn’t work. The server is Windows Server 2008.

0

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

  1. The first step is to install via Microsoft Web Platform the recommended settings for IIS, see in this tutorial how to do it: Installing and Configuring Web Deploy on IIS 7
  2. Install the version of . Netframework of your application, to know what the configuration is, see in your webconfig what is value of the targetFramework attribute:
<httpRuntime targetFramework="4.5.1" />
  1. Your application has pool run with integrated pipeline

  2. recommend that you initially enable debug. leave 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 easier for the server to adapt to your application.

I hope I’ve helped..

Browser other questions tagged

You are not signed in. Login or sign up in order to post.