Solved

Downgrading to asp.net 2.0

Posted on 2010-09-21
5
398 Views
Last Modified: 2012-05-10
I have build an asp.net website using Visual Studio 2008 and .NET Framework 3.5.
When published on the server (Windows server 2003), it throwing the attached error. (Line 104)
I think its because the server uses .NET Framework 2.0. If changing the .NET framework on the server is not an option, how can I change the Framework on my website ? Are there any changes that can be made on IIS without disturbing the existing websites on it?

In VS 2008, I went to Website -> Start Options -> Build -> selected .NET Framework 2.0 and recompiled the website. I did not see any change in the code or web.config file after that. Are the changed files hidden?
Also, doing this still did not get rid of the error. Any ideas please?
Parser Error Message: Child nodes not allowed.

Source Error:

Line 102:		<compilers>
Line 103:			<compiler language="c#;cs;csharp" extension=".cs" warningLevel="4" type="Microsoft.CSharp.CSharpCodeProvider, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
Line 104:				<providerOption name="CompilerVersion" value="v3.5"/>
Line 105:				<providerOption name="WarnAsError" value="false"/>
Line 106:			</compiler>

Open in new window

0
Comment
Question by:Angel02
  • 2
  • 2
5 Comments
 
LVL 28

Accepted Solution

by:
strickdd earned 350 total points
ID: 33727181
You've done the hard part of downgrading the project itself. Now if you create a web.config for the app it will be a 2.0 web.config and you can port your current settings to the new one. That should fix your problem.
0
 
LVL 21

Expert Comment

by:chapmanjw
ID: 33727563
Is the .NET 3.5 framework installed on the Windows Server 2003 box?
0
 

Author Comment

by:Angel02
ID: 33728484
@chapmanjw
.NET 3.5 is NOT installed on the Windows 2003. Does it matter if the website is not using it anyway ?
0
 
LVL 21

Assisted Solution

by:chapmanjw
chapmanjw earned 150 total points
ID: 33728548
I would either take the compilers section completely out of your web.config or install .NET 3.5 on the server and set your target back to 3.5.  VS doesn't make all the changes necessary on an existing app automatically when you change the target framework.
0
 

Author Comment

by:Angel02
ID: 33728652
Thanks, as you said and as strickdd indicated above, recreating the web.config, after changing the target framework fixed the issue. Now the website is actually using .NET 2.0.
Works perfect when new installations on the server are not feasible. Thank You !
0

Featured Post

Highfive Gives IT Their Time Back

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

Suggested Solutions

IntroductionWhile developing web applications, a single page might contain many regions and each region might contain many number of controls with the capability to perform  postback. Many times you might need to perform some action on an ASP.NET po…
Problem Hi all,    While many today have fast Internet connection, there are many still who do not, or are connecting through devices with a slower connect, so light web pages and fast load times are still popular.    If your ASP.NET page …
This video discusses moving either the default database or any database to a new volume.
This tutorial demonstrates a quick way of adding group price to multiple Magento products.

707 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

15 Experts available now in Live!

Get 1:1 Help Now