Please or Register to create posts and topics.

Local IIS Deployment as Application (not Default Site)

First and foremost, I wanted to share that I'm most impressed with this template.   I'm very new to .Net core and Angular, and this was extremely educational.

The details:

  • using free version template in VS 2017
  • .Net Core 2.2
  • IIS 8.5

So, I'm attempting to move this little project off of my development environment using IISExpress onto a stand alone IIS setup.

What worked:

  • Created an app pool with .Net CLR version of 'No Managed Code'
  • Had to set the owner of the app pool to 'LocalSystem' (otherwise, I get errors that .net couldn't open the listening port)
  • Set the appSettings.json ApplicationURL
  • Deployed the project to the default site (i.e http://defaultwebsite.domain.com)

The problem:

I'd like to run the angular / .net 2.2 application as an IIS application off of the root website, not as the actual root site...

So, as an example. With a base URL of something like:  http://defaultwebsite.domain.com/MyProject

I created an application off of the Default Site, set the application to use the same app pool as above, and published to the application folder.  I changed the appSettings.json ApplicationURL to the experimental base URL above.

When I browse to the application, it cannot seem to find all of the .js files that are found in the <AngularApplication>/dist folder (per browser debug console).  404 errors galore.

I must be missing something as a newbie...  and if so, feel free to give me a friendly shove in the right direction...


Anyone else had success running in IIS as an application, and not the default website?


I might be barking up the wrong tree, but I found an article that mentioned using something like

ng build --extract-css --base-href /<MyProject>/ 

when executing the production build, but I'm not exactly sure where I'd 
add those parameters 

Thoughts? Guidance? Help?

Thanks again for a marvelous template.



I use Visuals Studio 2019 and use it to publish my project on my file system. Copy the generated directory to our web server. If the appsettings.json is set correctly, I can start the web page in IIS without problems. The web.config with .NetCore 3.1 may have to be changed.


regards Ingo

Hi Ingo,

Just a follow up:   Just to be clear,  are you doing this as an IIS application off of your default site?   https://blah.com/MyApp vs https://blah.com?

I have the ability to upgrade to .Net core 3.1 if that'll fix the issue -- can you share how those configs look in your appsettings.json?  Maybe I'm doing something dumb.


Thanks for the response!





we bind the side for exampel:
https://talkip-ag.com or https://brasil.talk-ip.de

Important is that in the appsettings.json the

"ApplicationUrl": "https://talkip-ag.com/" is the same entry.
If you make a ping the this url on the web-server the ping must retrun the internal Server-IP.  For exampel:

External ping brasil.talk-ip.de has the IP
Internal on the web-Server is the IP



Ingo, I'm afraid I wasn't clear ... Please let me try again.

In IIS, I have a Default Site of (for instance) https://www.blah.com.   This default site is running a standard .Net App Pool

I'd like to create an IIS Application  (in IIS manager, right click on Default Site, 'Create Application') to serve QuickApp.

The URL for this would be:   https://www.blah.com/MyQuickApp

So, I've created an IIS Application 'MyQuickApp', set it to use the appropriate 'No Managed Code' app pool.

I set my appSettings.json ApplicationURL to "https://www.blah.com/MyQuickApp", but when I try to access

"https://www.blah.com/MyQuickApp" by my browser,  all sorts of javascript files, css, etc cannot be found (404 errors).

I'm guessing there's something else I need to do to serve QuickApp  in this manner, but am rather stuck.



Hoping this makes a bit more sense..





If you enter ping https://www.blah.com on the web server, the IP of the server must appear !!! The page is then accessed with https://www.blah.com.

You can test whether the server is running properly at all (in relation to web.config) by calling quickapp.dll in the cmd dotnet. If there is no error message, the server is ok.