Solved

Can ASP.net application using framework 4.0 run on IIS 5.1, I get a CompilerVersion attribute error

Posted on 2012-04-03
5
1,442 Views
Last Modified: 2012-06-21
I have developed an ASP.net application debuged with Visual Web Developer 2010 framework 4.0, My operating system is Windows XP. When I publish the website to IIS5.1 and run it I get an error below,

Exception Details: System.Configuration.ConfigurationErrorsException: The value for the 'compilerVersion' attribute in the provider options must be 'v4.0' or later if you are compiling for version 4.0 or later of the .NET Framework. To compile this Web application for version 3.5 or earlier of the .NET Framework, remove the 'targetFramework' attribute from the <compilation> element of the Web.config file.

I have selected framework 4.0.30319 in IIS properties. I deleted targetFramework="4.0"/  from the following web.config line,

<compilation debug="true" strict="false" explicit="true" targetFramework="4.0"/>

The application now runs, but my login controls fail. "login unsuccessful .... when using ASPNETDB.

Appreciate some expert help.
0
Comment
Question by:dearness
  • 3
  • 2
5 Comments
 
LVL 2

Expert Comment

by:shanejh
ID: 37804451
You can use .net 4 with Windows XP
You can use .net 4 with IIS 5.1

You need to make sure that version 4 of the framework is installed and make sure it is select the correct version of under the asp.net tab for you application in IIS.

You may need to use the following:
c:\windows\microsoft.net\framework\v4.0.30319\aspnet_regiis.exe -iru 

Open in new window

(where version is whatever version of asp.net you installed)
0
 

Author Comment

by:dearness
ID: 37807907
Shanejh,
Thanks for your reply but registering aspnet_regiis did not make any difference. I still have IIS5.1 reporting as though I am trying to use an old version. I have selected version 4.0 in IIS as attached picture shows, both default web and my virtual.
I have deleted all temporary files ad re-booted as well.

version
0
 

Author Comment

by:dearness
ID: 37808691
I opened the C:\Inetpub\wwwroot in Visual Web Developer and upgraded it to version 4.0 framework. Now the default web page loads. But now I cant login with a valid username and password, works OK in Visual Web Developer.
Also the navigation menu is not formatted right but is OK in Visual Web Developer.
0
 
LVL 2

Accepted Solution

by:
shanejh earned 500 total points
ID: 37808740
Yeah that looks fine then.

I don't think there is an issue with asp.net here now. If ASP.Net was unhappy any server side control would cause it to break.

Do you get any errors when you try log in? Is the .MDF present? Is it the same file used for debugging?

The menu issue sounds like a CSS/image issue, probably the site looking for files in root when they are in a sub folder.
0
 

Author Comment

by:dearness
ID: 37808762
I fixed the login problem by giving users full permissions to the App_Data folder, as well as ASPNET machine account. The menu I will work on now. Thanks.
0

Featured Post

What Security Threats Are You Missing?

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

Join & Write a Comment

Suggested Solutions

Running classic asp applications under Windows Server 2008 R2 (x64) and IIS 7 is not as easy as one may think. It took me a while to figure it out while getting error 8002801d a few times. After you install the OS you will need to install the fol…
More often than not, we developers are confronted with a need: a need to make some kind of magic happen via code. Whether it is for a client, for the boss, or for our own personal projects, the need must be satisfied. Most of the time, the Framework…
Here's a very brief overview of the methods PRTG Network Monitor (https://www.paessler.com/prtg) offers for monitoring bandwidth, to help you decide which methods you´d like to investigate in more detail.  The methods are covered in more detail in o…
This video explains how to create simple products associated to Magento configurable product and offers fast way of their generation with Store Manager for Magento tool.

758 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

20 Experts available now in Live!

Get 1:1 Help Now