Hi Eric,
I'm not sure if this is the best way to do this, here is how I'm currently
handling the connection string/which mail server/etc. solution in my apps.
Private Function GetDSN() As String
Dim strtest As String
strtest = Me.Server.MapPath("test.txt").ToLower
If (strtest.LastIndexOf("tempprojectsfolder") <> -1) Then
Return "production connection string"
Else
Return "dev connection string"
End If
End Function
The 'test.txt' file doesn't need to exist. I use the LastIndexOf to check
for a folder in the path that I know only exists in the developers'
environments. If it doesn't find it then I know I'm on the production
server and I return the correct string. You can also expand this to check
for QA or whatever else. Just make sure if you have multiple developers
that they stay uniform as far as their directory structure and you should be
good to go. I also use this to determine other servers like which SMTP
server to use and stuff. Good luck! Ken.
--
Ken Dopierala Jr.
For great ASP.Net web hosting try:
http://www.webhost4life.com/default.asp?refid=Spinlight
If you sign up under me and need help, email me.
"ericvdb" <er******@gmail.com> wrote in message
news:O4**************@tk2msftngp13.phx.gbl...
Hi all,
how are you guys handling the deployment and settings from a test server
to a production server?
In particular, if I have a db connection in my web.config pointing to my
test db server, do i need to modify it manualy on the productionserver
once the site has been deployed?
I have the same question for sql reporting services, but i'll post that in
another forum.
Thanks in advance.
Eric