Introduction
In this article you wil see the requirements for developing web applications & the more common problems that you may face when developing web applications using ASP .NET
this article is devided in two sessions the first one is specific to the requirments & session two will try to make you more closer to the ASP practical problems.
Session(1)
Requirements for developing Web Applications
If you want to create Web projects on this machine, you must first install additional components.
To create Web projects, both of the following components must exist:
1) Internet Information Services (IIS) must be installed
2) FrontPage Server Extensions (FPSE) must be installed and configured
Note that you can create Web projects on remote machines that have these components installed and configured.
Note that you must follow the sequence of the steps shown below
1) Install Internet Information Services (IIS):
a. From Control Panel, open the Add/Remove Programs
b. Choose Add/Remove Windows Components on the left side of the dialog box.
c. Check Internet Information Services and then choose Next to begin installing IIS.
d. Click Finish when installation is complete.
2) Install Front Page Server Extension (FPSE):
a. From Control Panel, open the Add/Remove Programs
b. In the Add/Remove Programs dialog box, choose Add/Remove Windows Components on the left side of the dialog box.
c. In the Windows Component Wizard, select Internet Information Services.
d. With Internet Information Services (IIS) selected, choose Details.
e. If FrontPage 2000 Server Extensions are not already selected, check the check box & then ok
f. Choose Next to begin installing.
g. After installation completes, click Finish to close the Windows Component Wizard.
3) Configure Front Page Server Extension (FPSE):
a. From Control Panel Select Administrative tools and then open the Computer Management
b. In the Computer Management dialog box, expand Services and Applications.
c. Under Services and Applications, expand Internet Information Services.
d. Under the Internet Information Services, expand Web sites.
Right-click Default Web Site, choose All Tasks, and then choose Configure Server Extensions.
Note: If the Configure Server Extensions menu command is missing, then FrontPage Server Extensions are already installed and configured.
e. Choose Next on the first page of the Server Extensions Configuration Wizard.
f. Choose Yes in the Warning dialog box.
g. Choose No for configuring the mail server settings, and then choose Next.
h. Choose Finish.
Installing the web server & running it
You might have to install the components for your web server as in the following sequence or order:
1) First install IIS & Front Page Server Extension(FPSE)
2) Configure Front Page Server Extension (FPSE)
3) Second install .NET framework
4) Third Install the .NET but make sure you are installing the Web Server Components with .NET (this is from the options of .NET Installed Components)
5) Finally run the web server using the command (In Command Prompt)
Net start w3svc
6) & also Install ASP.NET into your machine using the command(In Command Prompt)
Aspnet_regiis -r
Note that all of these components must be installed in order to run ASP more properly.
Session(2)
Common Asp Problems & their Solutions
In this session we discuss the more common Problems that you may face when running a web server & developing ASP .NET applications, so lets go on.
1) Installing the web server & running it
You might have to install the components for your web server in a sequence or in order to avoid the problems that might face you because of not installing these components in order:
a. First install IIS & FPSE and configure FPSE
b. Second install .NET framework
c. Third Install the web server components
d. Finally run the web server using the command
Net start w3svc
e. & also Install ASP.NET into your machine using the command
Aspnet_regiis �r
2) Security problem:
�Login Failed" Error Message When You Create a Trusted Data Connection from ASP.NET to SQL Server
Description:
When you create a trusted connection from ASP.NET to SQL Server, you may receive the following error message:
Login failed for the user 'MachineName\ASPNET'
NOTE: You receive this error message specifically when you use integrated security (when you include the integrated security=sspi attribute in a connection string).
When you use ASP.NET, the default security context is the aspnet_wp for both aspnet_wp.exe and the request to SQL Server. By default, the aspnet_wp account does not have any permission in SQL Server, and therefore it cannot access the database.
Solution
To resolve this problem, use any of the following methods:
� Programmatically change the security context of the ASP.NET worker process to a user that has the proper SQL Server permissions.
-or-
� Change the default configuration of ASP.NET so that the ASP.NET worker process starts and runs under the context of a user who has the proper permissions in SQL Server.
-or-
� Grant the proper permissions on SQL Server so that the aspnet_wp account has the appropriate access to the needed resources.
Simple Solution:
The most appropriate & simple solution to this problem is to setup or install SQL server with only windows authentication & don�t use a mixed mode of windows & user authentication.
Notes
- When you want to link your ASP pages with a SQL database you must install SQL server for creating and developing your own database that will be linked with your web application, in this case you should install SQL server after the components that I have said before have already been installed.
- Install SQL server with only windows authentication
- If you already installed SQL server with only windows authentication, and this error is still displayed for you, In this case remove SQL server & then reinstall it (windows authentication mode); I think you are surprised of this notice but I tried this & after that ASP runs without any problems.
Briefly, you should install SQL server after installing the components needed to run web server.
For more information & more practical solution of this problem browse & see the following MSDN Web site link:
http://msdn.microsoft.com/library/default.asp?url=/library/en-s/dnbda/html/authaspdotnet.asp