Page shows only the files in IIS 7 MVC 5 Application

3

I have an Mvc 5 application, for development I used IIS Express, everything works normally on it, but I'm having a problem uploading it to IIS 7. Even on my local machine, I'll later take it to Windows 2008. The problem is that running http://localhost/Aprovacoes/ my page does not open, just open the files as in the image below:

Inetpubfolderaccessconfigurationwheretheprojectpublishislocated,hasalreadybeentestedoniis.

Ihavealreadytestedwithalltheapplicationpools,theIntegrated4.0iscurrentlyset.

Myrouteconfighasnotmadeanychanges,itlookslikethis:

publicstaticclassRouteConfig{publicstaticvoidRegisterRoutes(RouteCollectionroutes){routes.IgnoreRoute("{resource}.axd/{*pathInfo}");
            routes.LowercaseUrls = true;
            routes.MapRoute("Default", "{controller}/{action}/{id}", new
            {
                controller = "Home",
                action = "Index",
                id = UrlParameter.Optional
            }).RouteHandler = new DashRouteHandler();
        }
    }

I've tried adding default index.cshtml document to iis but it did not work either.

When accessing the Home / Index, the action will identify that there is no user logged in by Forms Authentication, and will redirect to the Account / Login, this entire process works on IIS Express.

Could you help me solve this problem?

    
asked by anonymous 03.06.2017 / 17:26

1 answer

3

To solve this, you need to access the Windows folder where the version of your Asp.net is installed. Take the following steps:

Open the command prompt as an administrator

Access:

C:\Windows\Microsoft.Net\Framework\v4.30319

after this execute the command aspnet_regiis.exe -i

will prompt you as follows at the

C:\Windows\Microsoft.NET\Framework\v4.0.30319>
Microsoft (R) ASP.NET RegIIS version 4.0.30319
Administration utility to install and uninstal
Copyright (C) Microsoft Corporation.  All righ
Start installing ASP.NET (4.0.30319.36392).
.........

After this, you will receive the message that it has been terminated, then just refresh the application within IIS and run, check if the correct pool is set.

    
06.06.2017 / 22:53