Re: Database Connection - Development to Production



Thank you very much.

The config files are the way to go for all of my ASP.NET applications. I
agree with that. Unfortunately, all of our applications are still classic
ASP and I will require the connection information to be contained within the
dll at this time. I understand that it will be hard coded. Is using ini
files a method of the past? We have other VB 6 programmers here and they use
ini files to store their connection information.

The dll is a Security Control object that I created. It consists of a few
classes that read data from a database to populate the object properties and
collections.

Soon I will be making a post dedicated to converting classic ASP
applications to ASP.NET applications. I have yet to begin to research this
yet so if anyone has any insight or links to articles you could supply me
with it would be much appreciated. I should start a new post for this topic
though.

Thanks again.

"Steven Cheng[MSFT]" <stcheng@xxxxxxxxxxxxxxxxxxxx> wrote in message
news:BhDQv%23jeGHA.3900@xxxxxxxxxxxxxxxxxxxxxxxx
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: Web Service throws exception during Application_Start
    ... config value from within a web method, ... you want web services to ... >> managing web sites and web page based applications (using a general tone ...
    (microsoft.public.dotnet.framework.aspnet.webservices)
  • Re: [PATCH 2/7] procfs privacy: tasks/processes lookup
    ... > applications as root, ... > these applications run with root rights is a security ... that's why I would say "fall back to the config. ... send the line "unsubscribe linux-kernel" in ...
    (Linux-Kernel)
  • Re: [PATCH 2/7] procfs privacy: tasks/processes lookup
    ... > applications as root, ... > these applications run with root rights is a security ... that's why I would say "fall back to the config. ... send the line "unsubscribe linux-kernel" in ...
    (Linux-Kernel)
  • 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)
  • Re: my.settings website
    ... My.Settings doesn't apply to Web Applications. ... asp.net faq: http://asp.net.do/faq/ ... i am developing a website and want to use the connectionstring of my ... How can i use this connection in my Website? ...
    (microsoft.public.dotnet.framework.aspnet)