Solved

Downgrading to asp.net 2.0

Posted on 2010-09-21
5
401 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

Ransomware-A Revenue Bonanza for Service Providers

Ransomware – malware that gets on your customers’ computers, encrypts their data, and extorts a hefty ransom for the decryption keys – is a surging new threat.  The purpose of this eBook is to educate the reader about ransomware attacks.

Question has a verified solution.

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

Parsing a CSV file is a task that we are confronted with regularly, and although there are a vast number of means to do this, as a newbie, the field can be confusing and the tools can seem complex. A simple solution to parsing a customized CSV fi…
A phishing scam that claims a recipient’s credit card details have been “suspended” is the latest trend in spoof emails.
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…
Email security requires an ever evolving service that stays up to date with counter-evolving threats. The Email Laundry perform Research and Development to ensure their email security service evolves faster than cyber criminals. We apply our Threat…

785 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