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,481 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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

Complete VMware vSphere® ESX(i) & Hyper-V Backup

Capture your entire system, including the host, with patented disk imaging integrated with VMware VADP / Microsoft VSS and RCT. RTOs is as low as 15 seconds with Acronis Active Restore™. You can enjoy unlimited P2V/V2V migrations from any source (even from a different hypervisor)

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Convert VB web project to C# 3 65
Data Analysis 7 58
.NET Redemption/Outlook Examples 3 29
.NET XML to Dictionary - XML has repeating node names 8 28
If you are a web developer, you would be aware of the <iframe> tag in HTML. The <iframe> stands for inline frame and is used to embed another document within the current HTML document. The embedded document could be even another website.
Real-time is more about the business, not the technology. In day-to-day life, to make real-time decisions like buying or investing, business needs the latest information(e.g. Gold Rate/Stock Rate). Unlike traditional days, you need not wait for a fe…
How to Install VMware Tools in Red Hat Enterprise Linux 6.4 (RHEL 6.4) Step-by-Step Tutorial

739 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