Wednesday 15 June 2016

404 error on MVC web-site

Hi,

Today, I was started working on MVC application. I have taken the Template in Visual Studio and checked it from VS and it is working. Then I have published the things and hosted the same on IIS. When I browsed, it started giving 404 error. After some search, came to know that ASP.Net was not registered with IIS.

Follow below steps to register

Windows 7 and earlier
1. Run the Command Prompt (cmd.exe) as an administrator.
2. Navigate to the appropriate .NET Framework location. (e.g. C:\Windows\Microsoft.NET\Framework64\v4.0.30319)
3. Run aspnet_regiis.exe -i


For Windows 8 and above
1. From the start menu, type "Turn windows features on or off" and select the first result.
2. Expand Internet Information Services: World Wide Web Services: Application Development Features and select ASP.NET 4.5/4.6/whatever version you see (or ASP.NET 3.5 if you need to support projects on .NET Framework 2.0-3.5).
3. Click OK.


--
Happy Coding

Gopinath

No comments:

Post a Comment