Unlike traditional window-based applications, web applications are dependent on servers and resources that are not directly within the control of the application or the user. Web applications are often hybrid combinations of client, server, and network resources.
The areas you need to check include ASP.NET installation, IIS installation and configuration, and security. All three of these areas are extensive and complex. The following procedures provide solutions to some of the most common problems.
Note: The following suggestions apply only to IIS 5.1.
To troubleshoot your ASP.NET application
- Install or reinstall ASP.NET.
- Create or check your ASP.NET user account.
- Install or reinstall IIS.
- Start or restart IIS.
- Configure IIS to recognize your application.
- Add document types to IIS.
- Set anonymous authentication.
- Check your database connection, if applicable.
To install or reinstall ASP.NET
- Choose StartRun to display the Run dialog box.
- Type cmd /e in the Open drop down list box.
- Click OK.
- Change directories to c:\Windows\Microsoft.NET\Framework\v1.1.4322.
- Enter the command aspnet_regiis.exe -i.
- Press Enter.
Note: If you want to know the various command flags for the aspnet_regiis.exe
utility, follow the basic command with a ? character instead of the -i flag.
To create or check your ASP.NET user account
- Choose StartControl PanelUser Accounts to display the list of user accounts on your system.
- If you do not have an ASPNET user account, create one.
- Restart your machine.
Warning: Do not give your ASPNET user administrator privileges. This opens up a security hole in your system and makes deployed ASP.NET applications vulnerable to hacking. Instead, create an impersonated user.
To install or reinstall IIS
- Choose StartControl PanelAdd or Remove Programs. This displays the Add or Remove Programs dialog box.
- Click Add/Remove Windows Components. This displays the Windows Components Wizard.
- Check the Internet Information Services (IIS) check box.
- Click Next.
- Click Finish.
- Start IIS.
To restart IIS
- Choose StartControl PanelAdministrative ToolsInternet Information Services.
- Select the local computer node.
- Right-click and select Restart IIS.... This displays the Stop/Start/Reboot dialog.
- Choose the task you want to accomplish from the drop down list box.
- Click OK.
To configure IIS to recognize your application
- In the IIS console, locate the folder or virtual directory containing your web application. If there is not a folder or virtual directory, you will need to create a virtual directory.
- Select the folder.
- Right-click and select Properties.
- Click the Virtual Directory tab.
- Under the Application Settings area, click the Create button. If the Remove button is displayed instead, you can remove, then create the virtual directory again, if necessary.
To add document types to IIS
- Choose StartControl PanelAdministrative ToolsInternet Information Services.
- Select Default Web Site.
- Right-click and select Properties.
- Click the Documents tab.
- Click Add. This displays the Add Default Document dialog box.
- Add WebForm1.aspx in the Default Document Name textbox.
- Click OK twice.
To set anonymous authentication
- In the IIS console, locate the folder or virtual directory containing your web application. If there is not a folder or virtual directory, you will need to create a virtual directory.
- Select the folder.
- Right-click and select Properties.
- Click the Directory Security tab.
- Click Edit.
- Select the Anonymous Access check box.
- In the User name: field, enter the name of the ASPNET user you created.
- Check the Integrated Windows authentication check box or add your own password.
- Click OK twice.
To check your database connection
- Click the Data Explorer tab to display your database connections.
- Expand the provider list to display a valid database connection.
- Right-click and choose Modify Connection. This displays the Connections Editor.
- If the Database connection string does not contain the localhost specifier, prepend it to the connection string, as in the following example:
localhost:C:\Program Files\Common Files\Borland Shared\Data\EMPLOYEE.GDB
- Make sure all of your other connection options are set property.
- Click Test to make sure the connection is alive.