Solved

Downgrading to asp.net 2.0

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

Enterprise Mobility and BYOD For Dummies

Like “For Dummies” books, you can read this in whatever order you choose and learn about mobility and BYOD; and how to put a competitive mobile infrastructure in place. Developed for SMBs and large enterprises alike, you will find helpful use cases, planning, and implementation.

Question has a verified solution.

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

The ECB site provides FX rates for major currencies since its inception in 1999 in the form of an XML feed. The files have the following format (reducted for brevity) (CODE) There are three files available HERE (http://www.ecb.europa.eu/stats/exch…
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.
This video shows how to quickly and easily add an email signature for all users on Exchange 2016. The resulting signature is applied on a server level by Exchange Online. The email signature template has been downloaded from: www.mail-signatures…

829 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