[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
?
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
Medium Priority
?
1,531 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 2000 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

How to Use the Help Bell

Need to boost the visibility of your question for solutions? Use the Experts Exchange Help Bell to confirm priority levels and contact subject-matter experts for question attention.  Check out this how-to article for more information.

Question has a verified solution.

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

Lync server 2013 or Skype for business Backup Service Error ID 4049 – After File Share Migration
When it comes to showing a 404 error page to your visitors, you do not want that generic page to show, and you especially do not want your hosting provider’s ad error page to show either. In this article, I will show you how to enable the custom 40…
We’ve all felt that sense of false security before—locking down external access to a database or component and feeling like we’ve done all we need to do to secure company data. But that feeling is fleeting. Attacks these days can happen in many w…
Is your data getting by on basic protection measures? In today’s climate of debilitating malware and ransomware—like WannaCry—that may not be enough. You need to establish more than basics, like a recovery plan that protects both data and endpoints.…
Suggested Courses
Course of the Month18 days, 21 hours left to enroll

834 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