Wednesday, 24 October 2012

IIS Install & Configure for ASP.NET


In short:


  1. Install IIS 7.0 and webdav server
  2. Using Turn windows features on or off - Install IIS feature
  3. Copy the Website folder to C:\inetpub\wwwroot\
  4. IIS Convert to application
  5. IIS Application pool settings
  6. IIS Authentication to website
  7. Firewall configuration
  8. Website folder permission
  9. Install the SQLExpress 2008 with the Visual Studio even if you have SQL Server R2 professional.


In broad:
1.     Download & Install IIS 7.0
2.     Using Turn windows features on or off - Install IIS feature
3.     Copy the GymReg folder from \DBA home folder\Website to c:\inetpub\wwwroot\
4.     Open IIS & Convert to application

5.     Authentication to website

6.     Application pool settings: Since the copy of ASP.NET version in your website application may be different to your new application host computer


7. Allow windows Firewall à World Wide Web Services HTTP


8.     Website folder permission



Troubleshooting:

Problem: Server error in '/' Application


Solution: Step no- 4, 5 & 6

Problem: Authentication error



Solution: 



To enable integrated Windows authentication:

1.      Log onto the Web server using an administrator account.
2.      On the Start menu, click Administrative Tools Control Panel.
3.      In the Administrative Tools window, double-click Internet Information Services.
4.      In the Internet Information Services window, open the Web server node.
A Web Sites folder opens beneath the server name.
5.      You can configure authentication for all Web sites or for individual Web sites. To configure authentication for all Web sites, right-click the Web Sites folder and click Properties on the shortcut menu. To configure authentication for an individual Web site, open the Web Sites folder, right-click the individual Web site, and on the shortcut menu, click Properties.
6.      In the Properties dialog box, click the Directory Security tab.
7.      In the Anonymous access and authentication control section, click the Edit button.
8.      In the Authentication Methods dialog box, under Authenticated access, select Integrated Windows authentication.
9.      Click OK to close the Authentication Methods dialog box.
10.  Click OK to close the Properties dialog box.
11.  Close the Internet Information Services window.



To enable remote connection on SQL Server 2008 Express, see the step below:
  1. Start SQL Server Browser service if it’s not started yet. SQL Server Browser listens for incoming requests for Microsoft SQL Server resources and provides information about SQL Server instances installed on the computer.
  2. Enable TCP/IP protocol for SQL Server 2008 Express to accept remote connection.
  3. (Optional) Change Server Authentication to SQL Server and Windows Authentication. By default, SQL Server 2008 Express allows only Windows Authentication mode so you can connect to the SQL Server with current user log-on credential. If you want to specify user for connect to the SQL Server, you have to change Server Authentication to SQL Server and Windows Authentication.
Note: In SQL Server 2008 express, there isn’t SQL Server Surface Area Configuration so you have to configure from SQL Server Configuration Manager instead.

Step-by-step

  1. Open SQL Server Configuration Manager. Click Start -> Programs -> Microsoft SQL Server 2008 -> Configuration Tools -> SQL Server Configuration Manager.
  2. On SQL Server Configuration Manager, select SQL Server Services on the left window. If the state on SQL Server Browser is not running, you have to configure and start the service. Otherwise, you can skip to step 6.
  3. Double-click on SQL Server Browser, the Properties window will show up. Set the account for start SQL Server Browser Service. In this example, I set to Local Service account.
  4. On SQL Server Browser Properties, move to Service tab and change Start Mode to Automatic. Therefore, the service will be start automatically when the computer starts. Click OK to apply changes.
  5. Back to SQL Server Configuration Manager, right-click on SQL Server Bowser on the right window and select Start to start the service.
  6. On the left window, expand SQL Server Network Configuration -> Protocols for SQLEXPRESS. You see that TCP/IP protocol status is disabled.
  7. Right-click on TCP/IP and select Enable to enable the protocol.
  8. There is a pop-up shown up that you have to restart the SQL Service to apply changes.
  9. On the left window, select SQL Server Services. Select SQL Server (SQLEXPRESS) on the right window -> click Restart. The SQL Server service will be restarted.
  10. Open Microsoft SQL Server Management Studio and connect to the SQL Server 2008 Express.
  11. Right-click on the SQL Server Instance and select Properties.
  12. On Server Properties, select Security on the left window. Then, select SQL Server and Windows Authentication mode.
  13. Again, there is a pop-up shown up that you have to restart the SQL Service to apply changes.
  14. Right-click on the SQL Server Instance and select Restart.
  15. That’s it. Now you should be able to connect to the SQL Server 2008 Express remotely.

Note: When you will have SQL Express & MSSQLServer both installed in the same computer make sure you have created the database in the right instance. 



No comments:

Post a Comment