Click here to Skip to main content
15,881,413 members
Articles / Web Development / IIS
Article

Requirements for Developing WebApplications & ASP .NET Problems

Rate me:
Please Sign up or sign in to vote.
3.04/5 (16 votes)
13 Aug 2005CPOL8 min read 126.5K   35   7
Web Applications & ASP .NET

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. <o:p>

To create Web projects, both of the following components must exist:<o:p>

<o:p> 

1)      Internet Information Services (IIS) must be installed<o:p>

2)      FrontPage Server Extensions (FPSE) must be installed and configured

<o:p> 

Note that you can create Web projects on remote machines that have these components installed and configured.
<o:p> 

Note that you must follow the sequence of the steps shown below

 

1) Install Internet Information Services (IIS):<o:p>

<o:p> 

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.

<o:p> 

<o:p> 

2)      Install Front Page Server Extension (FPSE):<o:p>

<o:p> 

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.

<o:p> 

 

<o:p> 

3)      Configure Front Page Server Extension (FPSE):<o:p>

<o:p> 

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. <o:p>

 <o:p>

Note: If the Configure Server Extensions menu command is missing, then FrontPage Server Extensions are already installed and configured.<o:p>

 

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.

 <o:p> 

<o:p> 

Installing the web server & running it<o:p>

<o:p> 

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<o:p>

6)      & also Install ASP.NET into your machine using the command(In Command Prompt)

Aspnet_regiis -r<o:p>

<o:p> 

Note that all of these components must be installed in order to run ASP more properly.<o:p>

<o:p> 

<o:p>

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.

<o:p> 

<o:p> 

1)     Installing the web server & running it<o:p>

    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:

<o:p> 

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<o:p>

e.       & also Install ASP.NET into your machine using the command

Aspnet_regiis –r

 

<o:p> 

2)     Security problem:<o:p>

“Login Failed" Error Message When You Create a Trusted Data Connection from ASP.NET to SQL Server

<o:p> 

Description:<o:p>

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' <o:p>

<o:p> 

<o:p> 

NOTE: You receive this error message specifically when you use integrated security (when you include the integrated security=sspi attribute in a connection string). <o:p>

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.

<o:p> 

        Solution<o:p>

To resolve this problem, use any of the following methods: <o:p>

·        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.

<o:p> 

Simple Solution:<o:p>

            <o:p>

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.<o:p>

<o:p> 

Notes<o:p>

-         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. <o:p>

<o:p> 

-         Install SQL server with only windows authentication<o:p>

<o:p> 

-         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.<o:p>

<o:p> 

Briefly, you should install SQL server after installing the components needed to run web  server.<o:p>

<o:p> 

For more information & more practical solution of this problem browse & see the following MSDN Web site link:<o:p>

http://msdn.microsoft.com/library/default.asp?url=/library/en-s/dnbda/html/authaspdotnet.asp<o:p>

<o:p>

<o:p> 

Note that if you install SQL Server before installing & running of the server you might have the same problem listed for you so in this case you have to reinstall SQL server again with only windows authentication mode to adjust or adapt the configuration to make support of connecting to a web database…

<o:p> 

3)     The damage of a web application during:<o:p>

<o:p> 

1)      Copying the web application to another machine.<o:p>

OR<o:p>

2)      Re-installing IIS in the same machine.<o:p>

<o:p> 

The following error window will be displayed for the developer:

 

  can not be dispayed

 

 

 

 

Solution:<o:p>

The problem is with "The Configuration of Server Extension"

When a web-application is transferred to another machine it must be configured in the new web server so you must do the following steps:

<o:p> 

1)      Copy the web application in C:\Inetpub\wwwroot<o:p>

2)      Open the computer management window from administrative tools in control panel or just by opening run in the start menu & typing the command compmgmt.msc \s<o:p>

3)      Choose Internet Information Services | Websites | Default Web Site

4)      Right-click the web application the has been transferred in the wwwroot , choose Configure Server Extension item from Alltasks menu as shown below in the following figure:

 

 Sample screenshot

 

 

 

5)      a message will be displayed for you to ensure the request of yours, choose Yes

6)      New sub-web Wizard will be displayed for you, click "Next" up to finish the wizard

7)      Up to here you finish configuring the server extension for your new application added to the virtual directory, the following step is to add this new web application to the IIS, this allows the web application to be accessed or in other word to run the web application in the server.

8)      Right-click the newly web application copied in the virtual directory in the server & choose "Properties" the following dialog will be displayed for you, click the "Create" button in the "Application Settings" section & click Ok

<o:p> 

<o:p> 

<o:p>

Here you can continue developing your application where ever you end in another machine after copying your application or continue developing after reinstalling IIS without any problem faced you.

 

<o:p>

 Sample screenshot

4)     Changing the name of web application<o:p>

<o:p> <o:p> 

When changing the name of web application, the web application folder, in the virtual directory C:\inetpub\wwwroot

<o:p> 

I mean here changing the name of web application folder found in the virtual directory & not the name in the development environment "Not in VS .NET"

<o:p> 

An error message is displayed for you like the following one:

 

 

 Image Can not be displayed

 

 

 

Solution:<o:p>

<o:p>

 

1)      First is to change the name of the application inside VS .NET in the   "Solution Explorer"

2)      After that change the name of the folder outside to be the same as the name in the solution explorer in VS .NET

<o:p> 

<o:p> 

<o:p>

You may see the following error when opening the application in .NET:<o:p>

<o:p>

In order to open a Web project, a URL needs to be specified. This error message indicates that no URL was associated with the existing project.

 

 Image Can not be displayed

 

Solution:<o:p>

    To correct this error, use the Open Project or Open Project from Web dialog box (on the File menu, click Open) and manually locate and open the project by specifying the URL to the project file. For example,      

                   http://localhost/webproject1/webproject1.csproj

<o:p> 

                                                           Good Luck & Best Wishes                                                                                                             

 

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


Written By
Technical Lead Ministry of Higher Education
Egypt Egypt
My name is mohamed, & I'm from Egypt,in the faculty of computers.I began with visual c++ for two years ago.when I began with it I found it is very hard toundertand but when continue with it I find
it's very easy .
So,hopes to write to me...

Comments and Discussions

 
GeneralMoved/renamed webapps Pin
The Whiz3-Aug-05 21:01
The Whiz3-Aug-05 21:01 
GeneralMissing requirement Pin
Anonymous3-Aug-05 6:14
Anonymous3-Aug-05 6:14 
GeneralRe: Missing requirement Pin
skooij3-Aug-05 21:43
skooij3-Aug-05 21:43 
GeneralRe: Missing requirement Pin
juanpablobg4-Aug-05 4:13
juanpablobg4-Aug-05 4:13 
GeneralRe: Missing requirement Pin
Vasudevan Deepak Kumar12-Mar-06 17:21
Vasudevan Deepak Kumar12-Mar-06 17:21 
GeneralI wish Pin
AgeKay1-Aug-05 11:40
AgeKay1-Aug-05 11:40 
GeneralUseful information Pin
David Wulff1-Aug-05 9:05
David Wulff1-Aug-05 9:05 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.