.NETGURU
Moving from Development to Staging
Messages   Related Types
This message was discovered on microsoft.public.dotnet.distributed_apps.
Responses highlighted in red are from those people who are likely to be able to contribute good, authoratitive information to this discussion. They include Microsoft employees, MVP's and others who IMHO contribute well to these kinds of discussions.
Post a new message to this list...

Robin
When moving an Asp.Net solution that has used the drag and drop method for
some data components. What is the best method of changing them to use the
staging SQL Server connection.

Reply to this message...
 
    
Saurabh Nandu (VIP)
You should Hunt for the "SqlConnection" objects that have been dragged onto
your pages.

In the properties for the SqlConnection object expand the "Dynamic
Properties" in the Properties Window. There you will be able to set the
Connection String variable to be dynamically based.

Once this is setup the connection string will be read from the web.config
file of the application. This will have to be done for each of the
Sqlconnection objects in your project.
Although if all of them are pointing to the same database, then you can keep
reusing the variable created in the web.config file (it will dropdown from
the list of variables when you try to set the dynamic property for the
connection string.

Once this step is compeleted, then when the application gets shifted to the
staging area you just need to change the connection string in the web.config
file and it will automatically take effect for all the pages.

Note: The Connection string is stored in clear text in the web.config file,
so its suggested to use Windows Authentication to authenticate against SQL
Server, or encrypt the connection string.

Regards,
Saurabh Nandu
[ www.AksTech.com ]
[ www.MasterCSharp.com ]

"Robin" wrote:

[Original message clipped]

Reply to this message...
 
 
System.Data.SqlClient.SqlConnection




ExamGuru IT Solutions - .Net Guru is owned and operated by ExamGuru, Inc., the man behind .Net Guru. If you're in the market for bespoke software or software consultancy, why not get him and his highly trained team to help? - www.examguru.net/ITCertification
Ad


Need Dot Net Interview Questions?
Ask ExamGuru, Inc. for advice and help on Passing .Net Interviews
.Net Projects
Best-of-breed application framework for .NET projects, developed by ExamGuru, Inc. and ExamGuru IT
Free .net Help
Commission ExamGuru, Inc. and his team for your next bespoke software project
FogBUGZ
The only bug tracking system carefully crafted with one goal in mind: helping teams create great software.
Awesome Tools
If you don't know about these, you're missing out... IT Certification Questions
IT Interview Questions
Free Oracle 10g Training
MCSE Boortcamp
Cisco Study Guides
Cheap Study Guides
Exact Questions
Dot Net Interview Questions
Oracle OCP
Cheap Travel
Designer Perfumes - Wholesale Prices
Free Programming Tutorials
 
ExamGuru IT Solutions - .Net Guru is owned and operated by ExamGuru, Inc., the man behind .Net Guru. If you're in the market for bespoke software or software consultancy, why not get him and his highly trained team to help? - www.examguru.net/ITCertification
 Copyright © ExamGuru, Inc. 2001-2006
Contact Us - Terms of Use - Privacy Policy - www.dot-net-guru.com - www.examguru.net - www.oraclesource.net - www.itinterviews.net - www.examguru.net/ITCertification