Home » Microsoft SQL Server » 10 - XML Programming in SQL Server 2005
10

Configure Web Site

How to configure a web site

  • You should have IIS installed on your system. Create a folder named 'findAuthor' under C:\inetpub\wwwroot\.
  • Copy the files findAuthor.aspx, , findAuthor.htm, and web.configto this folder.
  • Open the findAuthor.aspx file using any text editor. Search for the string '<YOUR_SQLSERVER_NAME>' and change it to reflect the name of your SQL Server Installation. This is the name you use to login to your default server through management studio.
  • Open Settings -> Control Panel. Double click administrative tools. Double Click Internet Information Services.
  • Expand the main link and the 'Websites' link. You will see the 'FindAuthor' folder. Right click on this folder and click 'properties'.
  • In the properties dialogue, click on the 'Create' button under application settings and click OK.

The findAuthor.htm file contains a simple web form that takes the author's name as input. The findAuthor.aspx ASP file (the action specified upon form submission) opens a connection to the booksdb database, passes the input specified by the user to the findbooksbyauthor stored procedure, retrieves the output and prints it onto the web page using a 'response.write' statement.