How To Add Website In Iis Windows Server 2012
What is IIS?
IIS or Internet Information Server is the server used to host .Net spider web applications. IIS hosting is normally installed on a Window Server.
For users to access a website, it is required that the website is hosted on some sort of spider web server. In that location are dissimilar spider web servers bachelor for unlike technologies. In .Net, the web server available is chosen Cyberspace Information Services or IIS.
One time the web awarding is developed, it is then deployed on an IIS Server. This spider web application can so exist accessed by the end users. There are two means to deploy an application to the server, you volition see both over here.
- Using the File Copy method.
- Using the Web publish method.
In this IIS tutorial, you will acquire-
- How to Download and Install IIS
- How to Deploy Website in IIS via File re-create
- How to Publish ASP.Net Website
How to Download and Install IIS
The below diagram shows the process menstruum for an IIS Server.
- The first part is the request sent by the user. The asking volition ordinarily exist a web page. An example could exist http://instance.com/Default.aspx .
- Hither 'instance.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 asking will and so go to the IIS Server, which has the instance.com application.
- Once the request comes to the IIS server, it is processed. The IIS Server volition perform all the required operations equally per request.
- 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 web browser.
Let'south await how nosotros tin install IIS on a Window Server.
- First, download Windows server from the URL – https://msdn.microsoft.com/en-us/windowsserver2012r2.aspx and try it for 120 days.
- Once installed, the post-obit steps need to be carried out for installing IIS.
Step 1) Go to Windows Server and Add roles
On Windows Server 2012, the default dashboard is shown every bit below.
- The commencement pace is to click on the 'Add roles and features' on the dashboard.
- This allows one to install boosted features on a server.
Pace 2) Proceed to next stride
On the side by side screen, y'all demand to click the Next button to proceed.
Pace iii) Cull the installation method
In the next step, we need to perform two substeps
- The kickoff is to choose the Role-based or feature installation. This will allow united states of america to perform the IIS Installation.
- Click the 'Next' button to proceed.
Step iv) Select the server
In the next screen, you lot will see the name of the server on which the installation is taking place. Click the Next button to continue.
Stride five) Choose the web server choice
In the next step, we need to perform two substeps
- Cull the Spider web server option. This volition ensure that IIS gets installed.
- Click the 'Next' push button to go on.
Step 6) Proceed further
In the subsequent screen, click the next push button to proceed.
Pace vii) Kickoff the installation
In the final screen, click the Install push to begin the installation.
Once IIS has been installed, you can launch it, by going to search in Windows 2012.
- Enter the cord 'inetmgr' which is the control for IIS.
- Then Internet Information Services Manager volition come up up. Click on this.
After you click on the above link, IIS will open, and you lot volition be presented with the beneath screen.
In IIS, you volition have an initial site set upward called Default Web Site.
If you lot open up your browser and get to the URL http://localhost. Y'all 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
After developing a web application, the next important pace is to deploy the web application. The web application needs to be deployed so that information technology can be accessed by other users. The deployment is done to an IIS Web server.
There are various ways to deploy a web application. Let'southward look at the showtime method on how to deploy web application on server, which is the File copy.
We use the web application created in the earlier sections. Allow'south follow the below-mentioned steps on how to host application in IIS.
Step 1) Let's outset ensure we have our web application 'DemoApplication' open in Visual Studio.
Step ii) Open the 'Demo.aspx' file and enter the string "Guru 99 ASP.Net."
<!DOCTYPE html> <html xmlns="http://world wide web.w3.ore/1999/xhtml"> <head runat="server"> <title></title> </caput> <body> <grade id="form1" runat="server"> <div> Guru 99 ASP.Net </div> </form> </body> </html>
Now only run the application in Visual Studio to make certain information technology works.
Output:-
The text 'Guru 99 ASP.Cyberspace' is displayed. You should get the above output in the browser.
Stride 3) Now it's time to publish the solution.
- Right-click the 'DemoApplication' in the Solution Explorer
- Choose the 'Publish' Option from the context menu.
Information technology will open up some other screen (see step below).
Step four) In the next step, choose the 'New Profile' to create a new Publish profile. The publish contour volition have the settings for publishing the web application via File copy.
Step five) In the next screen we have to provide the details of the profile.
- Give a name for the contour such as FileCopy
- Click the OK push button to create the profile
Step half dozen) In this stride, nosotros specifically mention that we are going to Publish website via File copy.
- Choose the Publish method as File Organization.
- Enter the target location every bit C:\inetpub\wwwroot – This is the standard file location for the Default Spider web site in IIS.
- Click 'Next' push to proceed.
Step seven) In the next screen, click the Next push to continue.
Step viii) Click the 'Publish' button in the last screen
When all of the in a higher place steps are executed, yous will get the post-obit output in Visual Studio
Output:-
From the output, you lot will encounter that the Publish succeeded.
Now just open the browser and go to the URL – http://localhost/Demo.aspx
You can see from the output that now when yous browse to http://localhost/Demo.aspx , the page appears. It also displays the text 'Guru 99 ASP.Internet'.
How to Publish ASP.Cyberspace Website
Another method to deploy the web application is via publishing a website. The key departure in this method on how to host web awarding in IIS is that
- Yous accept more control over the deployment.
- You can specify to which Web site you want to deploy your application to.
- For example, suppose if y'all had two websites WebSiteA and WebSiteB. If you apply the Web publish method, you tin publish your application to any website. Likewise, 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.
Allow'south use the same Demo Awarding and see how to deploy ASP.Net awarding in IIS step by step using the "website publish method."
Stride one) In this step,
- Right-click the 'DemoApplication' in the Solution Explorer
- Choose the Publish Option from the context card.
Stride 2) On the adjacent screen, select the 'New Profile' selection to create a new Publish contour. The publish profile volition have the settings for publishing the web awarding via Web Deploy.
Stride 3) In the next screen nosotros take to provide the details of the contour.
- Give a proper name for the profile such as 'WebPublish'
- Click the 'OK' button to create the profile
Stride 4) In the next screen, you lot need to give all the details for the publish process
- Choose the Publish method as Web Deploy
- Select the server as Localhost
- Enter the site proper name as Default Website – Remember that this is the name of the IIS website
- Enter the destination URL as http://localhost
- Finally, click the Next push button to keep
Stride v) Click the 'Next' push button on the following screen to continue
Step six) Finally, click the Publish push to publish the Website
When all of the above IIS hosting steps are executed, you will get the following output in Visual Studio.
Output:-
From the output, you will see that the Publish succeeded.
Now just open the browser and become to the URL – http://localhost/Demo.aspx
You can meet from the output that now when you browse to http://localhost/Demo.aspx , the page appears. It likewise displays the text Guru 99 ASP.Internet.
Summary
- After an ASP.Net application is developed, the next step is that information technology needs to exist deployed.
- In .Net, gratis IIS hosting is the default spider web server for ASP.Net cadre hosting applications.
- ASP.Net web applications can be deployed using File copy method.
- ASP.Cyberspace spider web applications can also be deployed using Spider web Publish method.
Source: https://www.guru99.com/deploying-website-iis.html
Posted by: cressxviver.blogspot.com
0 Response to "How To Add Website In Iis Windows Server 2012"
Post a Comment