This article is important and essential for beginners and intermediate ASP.NET developers. It will help them set their development environment for publishing their applications for testing before deploying, and connecting with SQL Server 2005 and 2008.
When I started programming web applications using ASP.NET in Visual Studio 2010 and SQL Server 2008, I had numerous challenges in configuring the application for deployment. I had to search online for bits of code, and help forums, sometimes successfully and sometimes unsuccessfully. This has therefore motivated me to come up with a tutorial for configuring your IIS 7 Application server for ASP.NET development in your local machine.
Step 1: For those who don’t have IIS 7 installed
Download the Microsoft Web Platform Installer 3.0 from http://go.microsoft.com/fwlink/?inkID=145505 and install it in your computer. The Microsoft Web Platform Installer helps you install most developer tools for Microsoft. Using this tool, install those Microsoft products that you feel will be necessary in your ASP.NET development.
Go to control Panel and Select Administrative Tools. In the resulting window, select Computer Management and Open (or if you think this process is too long, you can open RUN and type compmgmt.msc, and hit ENTER). This Console Window is important in the management of your computer.
In the Console Window, in the Services and Applications drop down, select Internet Information Services (IIS) Manager, and in the Connections list, select Application Pools List.
In the Application Pools List, Right-Click ASP.NET v4.0 and select Advanced Settings. In the resulting window, at Process Models, set Identity to LocalSystem. You may leave the other items in their defaults. Hit OK.
Since you are using IIS 7, you may feel it necessary to set all your application pools to .NET Framework v4.0. To do this, Right-Click each application at a time and select Basic Settings. In the resulting window, set .NET Framework version to .NET Framework v4.0.xxxxx. Hit OK.
When you are through with this process, you will be able to use your SQL Server 2008 in your ASP.NET applications, and upon deployment, your applications will run in any .NET v4.0 Framework.
Problems being solved
- The login failed. Login failed for user 'IIS APPPOOL\ASP.NET v4.0'. Error
- Unrecognized attribute 'targetFramework'. Note
that attribute names are case-sensitive. - This error occurs because the attribute 'targetFramework' is not a valid attribute in .NET Frameworks prior to v4.0.