Angular 4 spa template deployment on iis - asp.net-mvc

I created a angular 4 application using VS 2017 angular spa template and it works fine in my local machine. I'm having issues setting up the project on the server IIS.
I have published the files on the server, I created a site on the IIS and mapped it to the index.cshtml under the \views\home\ directory. When I browse the site I'm getting http Error 404.3 - Not found.
Target framework is net461 and iis version is 8.5
Could you please help to resolve this issue.

I had to install aspnetcoremodule for IIS to resolve this issue.
https://learn.microsoft.com/en-us/aspnet/core/fundamentals/servers/aspnet-core-module?tabs=aspnetcore2x

Related

Running a .NET 4.6 MVC application on IIS 8.5 (Windows Server 2012)

I have an MVC Web API 2 application that I am running quite successfully locally within Visual Studio 2015 RC. I have also successfully published this application to an IIS 8.5 instance running on Windows Server 2012. I have installed .NET Framework 4.6 on this machine also.
The behaviour that I am getting when I try to navigate to the root of the site (http://localhost:81) is that I get a directory listing of the files in the root folder. Clearly I was expecting the routing config of the application to kick in an execute the home controller, but this is not happening.
I am a developer and it has been some time since I configured IIS, but I do remember that I had to do some fiddling with IIS (6?) to get the routing to work.
What am I missing?
Make sure your application pool is running in integrated mode and not classic.

After upgrading to MVC 5, my site returns a 404 error when published to production server

I recently upgraded my application from MVC 4/ EF 5 to MVC 5 / EF 6. I also upgraded to Visual Studio 2013 from VS 2012. Everything runs great on the IIS Express but when I publish to my production server via webDeploy, the site returns a 404 for all pages.
I am running IIS 8. There are no entries in my IIS log from today so this is not logging. I see no event alerts either.
I have done some research and performed the following:
Set the System.Web.MVC, System.Web.Routing and
System.Web.Abstractions to use a local copy when publishing. This
had no effect.
I restarted IIS.
I deleted all the files on the production server and re-published.
Thanks so much for your help!
Turns out that the problem had to do with Amazon eleastic ip - nothing wrong with the site or IIS.

IIS and MVC show folder structure

i have tried to deploy an mvc application in an windows server 2008 with iis7.
i have copied all the content to the inetpub/wwwroot folder
i changed the framework version of the application pool to v4.0
i ran the aspnet_regiis.exe
the project was properly released because i have deploy succesfully to my desktop dev (iis) and one arvixe hosting, but i cant make it work on the server.
but i can only see the folder structure, i tried creating virtual directorys and everything, but nothing works. am i missing something.
thx

MVC4 WebSite 404 Error on IIS7

Set-up
I have a website built in Visual Studio 2012 using MVC 4 and .NET framework 4.5.
It is being hosted on a Windows 2008 and running IIS7.
I am using a VS2012 "Web Deploy Package" to deploy to the server. I manually copy this to the server and run the install using the web deploy cmd script option /T and then /Y. It all installs fine to the Test folder.
On the Test website in IIS the application pool is pointing to the DefaultAppPool which is set for integrated and pointing to the .Net Framework v4.0.30319
I have created a new Web Site in IIS for the application called Test and defaulted the bindings for port 80 and stopped the default web site that is in IIS.
I've created a new foldeer called Test under wwwroot which is where the Web Deploy script is set to point to, when I created the script I add "Test" as the Site/Application
When I have created the web deploy package on my local machine I am manually copying the zip file and other deploy files (cmd,*.xml) to the remote server
I have run %windir%\Microsoft.NET\Framework\v4.0.30319\aspnet_regiis.exe -i on the server and installed .net 4.5 framework and MVC framework components I could see in the Web Platform installer.
Problem
This website was previously being hosted on Windows Azure and have been able to direct publish to Azure and everything runs fine and when I go to any page it displays as expected.But on the new web server I get a 404 when I go to any page.
Everything seems to be installed as far as I can see on the web server. I was able to stop my website and re-start the default web site and add an index.htm file and that displays fine.
It almost seems like something in the MVC pipeline is not initialising. I'm using the standard Home controller with Index action that comes as part of the VS20102 MVC template as a test and that returns me a 404 when I go to /Home.
I've also tried other endpoints (I have WEB api rest endpoints off /API/* and these are returning 404 errors).
I'm just wondering if there is some basic set-up I've missed. It almost seems like some service is not running correctly and picking up the MVC website.

Error with server install of new MVC app and MVC Release Candidate 2

I have developed a small application using MVC RC2.
The application works fine in my development environment, but fails when I push it to my production environment with the following error:
Method not found:
'Void System.Web.Mvc.RouteCollectionExtensions.IgnoreRoute
(System.Web.Routing.RouteCollection, System.String)'.
App pool is running .NET 2.x
Recent install of .NET Framework 3.5 SP1
Recent install of MVC RC2
Has anyone run into this problem? It seems to be missing the necessary method in the set of assemblies available to the application.
Sounds like you are not referring to the same assemblies on both machines.
Check the web.config differences between system.web which is used by iis6 and localhost cassini and system.webServer which is used by IIS7.
Also try dropping MVC dlls in the bin directory of the site to see if it is not getting them from the GAC.
Did you ever have ASP.NET MVC V1 installed? I did and had a similar experience. I then downloaded the documentation located here and checked out the section "Upgrading an ASP.NET MVC 1.0 Project to ASP.NET MVC 2"
Which version of IIS you are using ?
In IIS 6.0 you have to add MVC in Application Extension mapping.
Please check this blog post.
http://haacked.com/archive/2010/12/22/asp-net-mvc-3-extensionless-urls-on-iis-6.aspx

Resources