-1

I am trying to set up a web site for my new business, Antech, but I can't seem to get my landing site to point to 'Default.aspx'. Do I have to use IIS and if so does IIS Express work? I am continually coming up with the following error in my Web.config file (to see the actual error you can go to my website here):

Server Error in '/' Application.

Configuration Error

Description: An error occurred during the processing of a configuration file required to service this request. Please review the specific error details below and modify your configuration file appropriately. 

Parser Error Message: Unrecognized attribute 'targetFramework'. Note that attribute names are case-sensitive.

Source Error: 


Line 24:   </connectionStrings>
Line 25:   <system.web>
Line 26:     <compilation debug="true" targetFramework="3.5">
Line 27:       <assemblies>
Line 28:         <add assembly="System.Core, Version=3.5.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"/>

Source File: \\boswinfs07\home\users\web\b341\dom.antechdevelopmen\web.config    Line: 26 

Version Information: Microsoft .NET Framework Version:2.0.50727.3634; ASP.NET Version:2.0.50727.3634

Thanks for your help in advance!

Shadow The GPT Wizard
  • 66,030
  • 26
  • 140
  • 208

2 Answers2

4

It could be because of two reasons:

  • The application pool of your site could be set for .net framework 2.0

  • .Net 4.0 is not installed on your machine.

Try changing your app pool to 4.0.

If app pool doesn't have 4.0 framework listed, you might want to register it. For same follow below link that shows how to do it.

https://stackoverflow.com/a/4890368/309395

Community
  • 1
  • 1
Nilesh Thakkar
  • 2,877
  • 1
  • 24
  • 43
  • Thanks, but how do I open my app pool? –  Jul 25 '13 at 17:12
  • Please go through [this](http://technet.microsoft.com/en-us/library/cc754523(v=ws.10).aspx) link – Nilesh Thakkar Jul 26 '13 at 06:13
  • okay thanks, i changed it to 4.0 now and that error went away but apparently some of my scripts are still not compatible with 4.0. how do I make them compatible? to see the exact error click [here](http://antechdevelopment.com) –  Jul 26 '13 at 14:40
  • pardon me but I'm not sure what's not working, no client side errors in console. – Nilesh Thakkar Jul 29 '13 at 06:06
0

It looks like your application pool is set to .Net framework 2.0. The targetFramework attribute was only introduced in .Net 4.0. You can either manually remove the targetFramework="3.5" from the config file, or change your app pool to .Net framework 4.0

From http://msdn.microsoft.com/en-us/library/bb398791.aspx :

Visual Studio automatically inserts the targetFramework attribute when you upgrade a project to the .NET Framework 4. It removes the attribute when you change a project's target from the .NET Framework 4 to an earlier version.

Riv
  • 1,849
  • 1
  • 16
  • 16