This tutorial shows how to create a simple “Hello World” web site and deploy to IIS.
- Launch Microsoft Visual Studio and create a new project
- Select “ASP.NET Empty Web Application”
Note: You may choose other templates such as Web Forms Application or MVC 3/4 Application. - This will create an empty ASP web application project
- Add a new Web Form item and call it default.aspx
Note: for simplicity, use one of the following names as your main file (see list in IIS > Default Documents for your web site), otherwise you would need to add your custom default file in IIS (which is removed each time you deploy):
- Edit file default.aspx and add some simple content
- Visual Studio has a built-it web server and allows you to run your web application, locally, directly from Visual Studio
- Build your project and run the debugger on your favorite web browser to test your web application
HTTP Requests
If your web application has API for HTTP requests, make sure to add the following code in the web.config file:
<validation validateIntegratedModeConfiguration="false" />
<modules runAllManagedModulesForAllRequests="true">
<remove name="WebDAVModule"/>
</modules>
This is to avoid the error 405 - HTTP verb used to access this page is not allowed
on PUT and DELETE verbs:
For the sake of this tutorial, our web application is considered completed. Following these instructions to publish and deploy the demo web application to IIS.
0 Comments Leave a comment
Comments are closed.