Re: Database Connection - Development to Production



Hi Matt,

Storing connectionString in dll itself is ok. However, it'll make the
connectionstring hard coded and not possible to modify, if you do not care
about this ,then you can just use this approach.

As for .net framework application, we would suggest store connectionString
in application's config file(app.config or web.confing), this can make the
connectionstring's management very convenient and flexible. Also, .net
framework (especially 2.0) has powerful support on config file's
reading/writing....

#Storing and Retrieving Connection Strings
http://msdn2.microsoft.com/en-us/library/ms254494.aspx

Also, if the connectionString will be used in ASP.NET application, we can
perform encryption on them through DPAPI or RSA key:

#How To: Encrypt Configuration Sections in ASP.NET 2.0 Using RSA
http://msdn.microsoft.com/library/en-us/dnpag2/html/paght000006.asp?frame=tr
ue


Regards,

Steven Cheng
Microsoft Online Community Support


==================================================

When responding to posts, please "Reply to Group" via your newsreader so
that others may learn and benefit from your issue.

==================================================


This posting is provided "AS IS" with no warranties, and confers no rights.



Get Secure! www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)




.



Relevant Pages

  • Re: Database Connection - Development to Production
    ... The config files are the way to go for all of my ASP.NET applications. ... Soon I will be making a post dedicated to converting classic ASP ... Storing connectionString in dll itself is ok. ...
    (microsoft.public.dotnet.general)
  • RE: TableAdapters and web.config
    ... Welcome to ASP.NET newsgroup. ... function is just the one which supply connectionstring and constructing the ... application config file. ... | Thread-Topic: TableAdapters and web.config ...
    (microsoft.public.dotnet.framework.aspnet)
  • TableAdapter
    ... DLL ausgelagert. ... Jetzt soll die Datenbank umziehen und da wollte ich den ConnectionString ... Wie bekomme ich eine Config auch für die DLL im Ausgabeverzeichnis? ...
    (microsoft.public.de.german.entwickler.dotnet.vb)
  • Re: How to enable Analysis Services with IIS on Win 2K
    ... Can you confirm that I am not missiing something from the webcast, ... connectionstring should I use data source='HTTP://MY_IIS ' or data ... solution I played little bit with the data source. ... > This posting is provided "AS IS" with no warranties, and confers no rights. ...
    (microsoft.public.sqlserver.olap)
  • Re: SqlConnection
    ... Da es ich z.B. beim ConnectionString um eine oft wieder verwendete Variable ... lagere ich den Zugriff in eine Config Klasse aus. ... /// Hours ... Next by Date: ...
    (microsoft.public.de.german.entwickler.dotnet.asp)

Loading