Host .Net Core app on Windows Server 2012
A. Configure IIS
- Click on start option
- Select Server manager from options
- Select Add Role & Features from options
4. Select Role based & feature based installation and click Next.
5. Click Next
6. Check Web Server IIS and Click Next
7. Select .Net Frameworks 3.5 & 4.5 and Click Next
8. Click on Install
9. Go to command prompt and restart IIS using below command
Command:> iisreset
You have completed IIS installation Successfully
B. Host .Net Core App on IIS
- Download & Install .Net Core windows Hosting Bundle from below link
2. Install Windows Platform Installer from below link
3. Copy build or published version of your .net Core project to one folder (any location)
4. Click on start option and Go to IIS Manager.
5. Right click on Sites option and click on Add Website
6. Add Website
- Enter website name
- Next in Content Directory section physical path option browse to location where you have put published version of your .Net Core project
- In Binding section Type = http; IP Address = Your server IP; Port = other than 80(81,5000,5001)
Note: Don’t enter anything in Host Name for now if you don’t have domain yet
7. Go to Application Pool
8. Right Click on your Website (Which has added in STEP 6) and select Basic Setting
9. Select .Net core CLI version as No managed Code and click on OK
C. Configure Firewall
- Click on Start option and Go to Windows Firewall with Advanced Security
- Click on Inbound Rules
3. Under Actions pane, click on New Rule and New Inbound Rule Wizard will be opened. On this window, select the Port radio button and click on Next.
4. On the next screen, select TCP and Specific local ports radio button. Specify a port number (upon which you set binding in IIS) in Specific local ports field and click Next.
5. On the next screen, select Allow the connection and click Next.
6. Select the profile where you want to apply this rule and click Next.
7. Specify Name and Description for the newly created rule & click Finish.
D. Access Your Site
- Goto IIS
2. Right Click on your site
3. Click on Manage Website
4. Click on Browse