How To Host Windows Application In Iis
What is IIS?
IIS or Cyberspace Information Server is the server used to host .Net web applications. IIS hosting is ordinarily installed on a Window Server.
For users to access a website, it is required that the website is hosted on some sort of web server. There are different spider web servers available for different technologies. In .Net, the web server available is called Internet Information Services or IIS.
Once the web application is developed, it is then deployed on an IIS Server. This spider web application can then be accessed by the terminate users. At that place are two ways to deploy an application to the server, you will see both over here.
- Using the File Copy method.
- Using the Spider web publish method.
In this IIS tutorial, you will learn-
- How to Download and Install IIS
- How to Deploy Website in IIS via File copy
- How to Publish ASP.Net Website
How to Download and Install IIS
The below diagram shows the process flow for an IIS Server.
- The offset part is the request sent by the user. The request will usually be a web page. An instance could be http://instance.com/Default.aspx .
- Hither 'case.com' is a website hosted on the IIS Server.
- 'Default.aspx' is a web page on the example.com website.
- And then the user will enter the URL http://example.com/Default.aspx in the web browser. The request will so go to the IIS Server, which has the example.com application.
- Once the request comes to the IIS server, it is processed. The IIS Server volition perform all the required operations equally per asking.
- Finally, the IIS Server sends the output back to the user. The output will generally be HTML content sent back to the user. This HTML content will be displayed in the spider web browser.
Let's look how we can install IIS on a Window Server.
- Kickoff, download Windows server from the URL – https://msdn.microsoft.com/en-united states/windowsserver2012r2.aspx and try information technology for 120 days.
- In one case installed, the post-obit steps need to exist carried out for installing IIS.
Footstep 1) Go to Windows Server and Add roles
On Windows Server 2012, the default dashboard is shown equally below.
- The kickoff stride is to click on the 'Add roles and features' on the dashboard.
- This allows 1 to install boosted features on a server.
Footstep 2) Proceed to adjacent step
On the adjacent screen, you need to click the Next button to go on.
Stride 3) Choose the installation method
In the next step, we need to perform two substeps
- The first is to choose the Role-based or characteristic installation. This will let u.s. to perform the IIS Installation.
- Click the 'Side by side' button to keep.
Step iv) Select the server
In the next screen, you will see the name of the server on which the installation is taking identify. Click the Side by side push button to proceed.
Step 5) Choose the web server option
In the next step, we need to perform two substeps
- Choose the Web server option. This volition ensure that IIS gets installed.
- Click the 'Next' button to proceed.
Step half-dozen) Go along further
In the subsequent screen, click the next push button to continue.
Stride 7) Showtime the installation
In the final screen, click the Install button to begin the installation.
Once IIS has been installed, you lot can launch information technology, by going to search in Windows 2012.
- Enter the cord 'inetmgr' which is the control for IIS.
- Then Internet Information Services Manager will come up upward. Click on this.
Later you click on the above link, IIS will open, and you will be presented with the below screen.
In IIS, you will take an initial site gear up called Default Web Site.
If you lot open up up your browser and go to the URL http://localhost. Yous will run into the below output. This URL mainly goes to the Default Web site shown in the previous screen. This is the default page which indicates that the IIS Server is up and running.
How to Deploy Website in IIS via File copy
Afterwards developing a web awarding, the next important step is to deploy the web application. The spider web application needs to exist deployed so that information technology can be accessed by other users. The deployment is done to an IIS Spider web server.
At that place are diverse ways to deploy a web application. Allow'due south look at the first method on how to deploy spider web application on server, which is the File re-create.
Nosotros use the spider web application created in the earlier sections. Let's follow the below-mentioned steps on how to host awarding in IIS.
Step i) Let'southward outset ensure we take our spider web application 'DemoApplication' open in Visual Studio.
Footstep 2) Open the 'Demo.aspx' file and enter the cord "Guru 99 ASP.Net."
<!DOCTYPE html> <html xmlns="http://www.w3.ore/1999/xhtml"> <caput runat="server"> <title></championship> </head> <body> <form id="form1" runat="server"> <div> Guru 99 ASP.Net </div> </grade> </body> </html>
At present but run the awarding in Visual Studio to make sure it works.
Output:-
The text 'Guru 99 ASP.Net' is displayed. You should get the above output in the browser.
Step three) Now it'south time to publish the solution.
- Right-click the 'DemoApplication' in the Solution Explorer
- Cull the 'Publish' Option from the context menu.
It will open up some other screen (run across pace beneath).
Stride 4) In the next footstep, cull the 'New Profile' to create a new Publish profile. The publish profile will have the settings for publishing the web awarding via File copy.
Pace 5) In the next screen we accept to provide the details of the contour.
- Give a proper name for the profile such every bit FileCopy
- Click the OK push to create the profile
Stride 6) In this step, we specifically mention that we are going to Publish website via File copy.
- Choose the Publish method as File Arrangement.
- Enter the target location as C:\inetpub\wwwroot – This is the standard file location for the Default Web site in IIS.
- Click 'Side by side' button to proceed.
Step 7) In the next screen, click the Next button to proceed.
Step 8) Click the 'Publish' button in the final screen
When all of the above steps are executed, you lot will get the following output in Visual Studio
Output:-
From the output, you will run into that the Publish succeeded.
Now just open up the browser and go to the URL – http://localhost/Demo.aspx
You can run across from the output that at present when y'all browse to http://localhost/Demo.aspx , the page appears. It also displays the text 'Guru 99 ASP.Net'.
How to Publish ASP.NET Website
Some other method to deploy the web application is via publishing a website. The key difference in this method on how to host web application in IIS is that
- You have more control over the deployment.
- Yous can specify to which Web site you want to deploy your application to.
- For example, suppose if you had 2 websites WebSiteA and WebSiteB. If you apply the Web publish method, you tin can publish your application to any website. Besides, you don't need to know the physical path of the Web site.
- In the FileCopy method, you have to know the physical path of the website.
Let's utilize the aforementioned Demo Application and see how to deploy ASP.Cyberspace application in IIS step by step using the "website publish method."
Stride 1) In this step,
- Right-click the 'DemoApplication' in the Solution Explorer
- Cull the Publish Selection from the context carte.
Footstep 2) On the side by side screen, select the 'New Profile' choice to create a new Publish contour. The publish profile volition take the settings for publishing the web application via Spider web Deploy.
Step 3) In the next screen we have to provide the details of the profile.
- Give a name for the profile such as 'WebPublish'
- Click the 'OK' button to create the profile
Pace four) In the next screen, you demand to give all the details for the publish process
- Choose the Publish method as Web Deploy
- Select the server as Localhost
- Enter the site name as Default Website – Remember that this is the proper name of the IIS website
- Enter the destination URL as http://localhost
- Finally, click the Next push button to keep
Step 5) Click the 'Side by side' button on the following screen to go along
Step 6) Finally, click the Publish push to publish the Website
When all of the above IIS hosting steps are executed, you will get the post-obit output in Visual Studio.
Output:-
From the output, yous volition come across that the Publish succeeded.
At present just open the browser and go to the URL – http://localhost/Demo.aspx
You can see from the output that now when you browse to http://localhost/Demo.aspx , the folio appears. Information technology besides displays the text Guru 99 ASP.Cyberspace.
Summary
- Later on an ASP.Net application is developed, the next step is that it needs to be deployed.
- In .Net, free IIS hosting is the default web server for ASP.Net cadre hosting applications.
- ASP.Net web applications can exist deployed using File copy method.
- ASP.Net web applications can too be deployed using Web Publish method.
Source: https://www.guru99.com/deploying-website-iis.html
Posted by: eppsuporly.blogspot.com
0 Response to "How To Host Windows Application In Iis"
Post a Comment