Programming Training | New Way New Style
A Step-by-Step ASP.NET Tutorial for Beginners -
MAHAK: Society to Support Children, Suffering from Cancer
Read Valuable Verse From Cosmic References Quran & Bible

IIS: Internet Information Services

Mahsa Hassankashi | Friday 10 2014 21:38

Install IIS for bieng sure about your site works correctly before publish it

‚ÄčIn general speaking IIS helps to publish files and almost total host support it for your ftp matters, but how you can use it in your local machine to test if your site works properly?

You have created your site. Do not mind the differences between platforms or technologies if it is ASP.NET or in MVC, now it is time to publish it on World Wide Web ( 

How can be sure about everything is all right?
You want to publish your site on your server in your office and allow your coworker use it to test it or etc... , How to do it?
You need to know if all of your dependencies is inside it and they work together ok?
You need to use IIS: Internet Information Services, this service will not install automatically and I will explain later in Step 10 that how to install it.

When you install IIS you have four services:

So Follow these steps please:

Firstly Create Folder in your favorite path and name it: "C:\Publish" 
1. Right Click on Project Name and select Rebuild 

2. Right Click on Project Name and select Publish -> you will see "Publish Web Application" page 

3. "Profile" section: Select New Profile Name: "Insert your name" 

4. "Connection" section: Publish Method: "File System" 
Target Location: "C:\Publish" 

5. "Settings" section: Configuration :"Release" 

6. Click on "Publish" button 

8. Whenever you want to change your code pay attention to this point that you should replace "bin\yourprojectname.dll" to ftp all of your code behinds includes Controller and Models are in this dll. 

9. Whenever you add new references from nuget or etc rebuild solutionand find it from "bin\?" and copy it to ftp 

10.Now check if you have IIS.
Control Pane -> Turn Windows Features on or off

11. Tick all of sub section under IIS and IIS hostable web core , when you click ok it ask you to insert Windows CD (the same CD that you installed current windows)

12. Copy your publish folder into Inetpub > wwwroot

13. paste your folder here

14. Go to : Control panel -> Administrative  -> Tools

15.Select IIS Manager

16. You should see panel like below picture:

17. Right click on MySite or your publication folder name and select "Convert to Application"

18. You will see this page and click ok

19. In the middle section of this page search for Directory Browsing

20. Double click on Directory Browsing and in leftt section of this panel in Actiones part click on Enable

21. Accept and save changes

22.Select "Application Pools" and select DefaultAppPool -> right click on that and select "Advanced Settings"

23. .Net Framework should be = v4.0 (or any version that you build your project)
      Managed Pipeline Mode should be = Inegrated

Integrated mode takes advantage of the integrated pipeline introduced in IIS 7 to process requests.

24. Now it is time to run your site and test it in local or intraner: 
On MySite Right click and --> Manage Application ->Browse

If everything is right here so you can publish it and there is no mistake in your coding.

Finally to configure your site:
Host Panel --> Web Sites --> Choose your website and configure it such as below samples:

Tag: ,, , , , , ,

Rss Feed

Feedback: Feel free to leave any feedback on this article; it is a pleasure to see your comments about this code. If you have any questions, please do not hesitate to ask me here.
Your email address will not be published. All fields are Required