Change ASP.Net version in Visual Studio 2005

I'm assuming my problem lies with originally choosing to run my web application under ASP.Net 1.1 because when I add this line:

Dim config As Configuration = ConfigurationManager.OpenWebConfiguration(Request.ApplicationPath)

'OpenWebConfiguration' is not a member of 'System.ConfigurationManager'

Which is likely to be due to the fact OpenWebConfiguration was added in .Net 2.0

How would I go about changing the version of a current project?
LVL 10
thefritterfatboyAsked:
Who is Participating?
 
SwapnilSoftware ArchitectCommented:
Hi thefritterfatboy,

Following will help you.

Encrypting the connection string in ASP.NET V2.0
http://weblogs.asp.net/owscott/archive/2005/07/29/421063.aspx

How To: Encrypt Configuration Sections in ASP.NET 2.0 Using RSA
http://channel9.msdn.com/wiki/default.aspx/Channel9.HowToEncryptConfigurationSectionsUsingRsaInAspNet20?diff=y

Regards,
NetSwap
0
 
GavinMannionCommented:
Hi thefritterfatboy,

Yeah OpenWebConfiguration is not a valid syntax in 1.1

What are you trying to do? Get the configuration settings?

- Gavin -
0
 
thefritterfatboyAuthor Commented:
Yeah, I want to grab all the connection strings and encrypt them in the web.config file.

Ideally, I'd like the version to be updated if it is that that is causing the problem.
0
Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

 
GavinMannionCommented:
So you want to read them from the web.config - encrypt them and write them back?

If you do that it will cancel all the current sessions and the app will most probably fall over...

To get config settings from the web.config you would use this syntax in 1.1

ConfigurationSettings.AppSettings["ConnectionStringName"]

I have a feeling you are trying to use 2.0 features in 1.1. In 1.1 there is no setting in the web config for Connection Strings and the web.config should not be edited by the application it supports.
0
 
thefritterfatboyAuthor Commented:
>>If you do that it will cancel all the current sessions and the app will most probably fall over...<<

The app is not currently live.

For some reason the web.config file is in the .Net V2.0 schema (Vis Studio created it like that)
0
 
GavinMannionCommented:
So you have a 1.1 application running off a 2.0 web.config?

Not sure how well that is going to handle... but anyway.

So you are just trying to encrypt the connection string? Why not just do that 'manually' and update the web.config using notepad then?

When I say manually I mean cut the connection string and run it through your encryption algorythmn and then paste the answer back?
0
 
thefritterfatboyAuthor Commented:
ASP.Net has integrated methods of encrypting. I have just found that you can do it using aspnet_regiis.exe so I will look into that.

As for the config file - I have no idea why Visual Studio has created a v2.0 web.config file. I just tried to create a new asp.net application and it never prompted me for asp.net version.
0
 
GavinMannionCommented:
I presume you are using VS 2005. Which will always make version 2.0 applications. Which would explain the web.config

I have never heard of the command aspnet_regiis encrypting web.config's so if it works please post the information here for more users to see. It might be very useful.

Thanks,
Gavin
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.