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,460 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

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Question has a verified solution.

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

The article shows the basic steps of integrating an HTML theme template into an ASP.NET MVC project
Preparing an email is something we should all take special care with – especially when the email is for somebody you may not know very well. The pressures of everyday working life stacked with a hectic office environment can make this a real challen…
Established in 1997, Technology Architects has become one of the most reputable technology solutions companies in the country. TA have been providing businesses with cost effective state-of-the-art solutions and unparalleled service that is designed…
Nobody understands Phishing better than an anti-spam company. That’s why we are providing Phishing Awareness Training to our customers. According to a report by Verizon, only 3% of targeted users report malicious emails to management. With compan…

840 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