Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > Deployment in 2.0 - How To Not Overwrite web.config

Reply
Thread Tools

Deployment in 2.0 - How To Not Overwrite web.config

 
 
=?Utf-8?B?Um9iZXJ0?=
Guest
Posts: n/a
 
      11-02-2005
I have what I think should be a pretty common scenario in a corporate
environment. I have a web app and three environments on three servers:
Development, QA and Production.

We develop in development and then deploy the updated application to our QA
server and then once tested to our production server.

The application has a web.config file. The contents of the file
(appsettings part) are different in all three environments because each
enviroment connects to different databases (a dev, qa and the prod database).

what I'm discovering is that the Publish option in VS2005 won't work in this
scenario because it will copy web.config from development to QA or production
and thus result in the incorrect appsettings...i.e. Production all of a
sudden connecting to the development database.

Is there any way around this with the Publish command? Or do i have to
manually use "Copy Web" which is more timeconsuming?

Excluding web.config does't work because the web.config in the destination
is still wiped out. I tried setting web.config to Read ONly in QA and
production but it is still deleted and overwritten by the one from dev.

Seems like someone really didn't think of this common scenario. An "Exclude
web.config" checkbox would have been all that was necessary. Or is this
hidden somewhere?

Thx.
R-
 
Reply With Quote
 
 
 
 
Greg Burns
Guest
Posts: n/a
 
      11-02-2005
Not sure if this applies, but have your looked at using a user.config file?
(I assume this still works in 2.0?)

user.config
<appSettings>
<add key="ConnectionString"
value="server=(local);Trusted_Connection=true;data base=bar;Application
Name=foo" />
</appSettings>

web.config
<appSettings file="user.config">
<add key="ConnectionString"
value="server=PRODSERVER;Trusted_Connection=true;d atabase=bar;Application
Name=foo"/>
</appSettings>

My basic understanding is if the user.config is present it will use it,
otherwise it defaults to the values in web.config. Not sure if Publish,
copies user.config to server or not. Something to look into, hopefully
somebody else has a better solution for you.

Greg



"Robert" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
>I have what I think should be a pretty common scenario in a corporate
> environment. I have a web app and three environments on three servers:
> Development, QA and Production.
>
> We develop in development and then deploy the updated application to our
> QA
> server and then once tested to our production server.
>
> The application has a web.config file. The contents of the file
> (appsettings part) are different in all three environments because each
> enviroment connects to different databases (a dev, qa and the prod
> database).
>
> what I'm discovering is that the Publish option in VS2005 won't work in
> this
> scenario because it will copy web.config from development to QA or
> production
> and thus result in the incorrect appsettings...i.e. Production all of a
> sudden connecting to the development database.
>
> Is there any way around this with the Publish command? Or do i have to
> manually use "Copy Web" which is more timeconsuming?
>
> Excluding web.config does't work because the web.config in the destination
> is still wiped out. I tried setting web.config to Read ONly in QA and
> production but it is still deleted and overwritten by the one from dev.
>
> Seems like someone really didn't think of this common scenario. An
> "Exclude
> web.config" checkbox would have been all that was necessary. Or is this
> hidden somewhere?
>
> Thx.
> R-



 
Reply With Quote
 
 
 
 
Juan T. Llibre
Guest
Posts: n/a
 
      11-02-2005
re:
> An "Exclude web.config" checkbox would have been all that was necessary.


Doesn't selecting web.config in the Solution Explorer, and then going to the
menu "Website", and then clicking on "Exclude from project" work for you ?

What I would do, though, is include *all* connection strings in web.config and,
depending on the website's location, use the appropiate one.

Something like (pseudocode ) :

Dim dnsname As String = Request.Url.Host
If dnsname = domain1 Then
' request connection string 1 here
Elseif dnsname = domain2 Then
' request connection string 2 here
Else
' request connection string 3 here
End If
End If


That should take care of all your problems.




Juan T. Llibre, ASP.NET MVP
ASP.NET FAQ : http://asp.net.do/faq/
Foros de ASP.NET en Español : http://asp.net.do/foros/
======================================
"Robert" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
>I have what I think should be a pretty common scenario in a corporate
> environment. I have a web app and three environments on three servers:
> Development, QA and Production.
>
> We develop in development and then deploy the updated application to our QA
> server and then once tested to our production server.
>
> The application has a web.config file. The contents of the file
> (appsettings part) are different in all three environments because each
> enviroment connects to different databases (a dev, qa and the prod database).
>
> what I'm discovering is that the Publish option in VS2005 won't work in this
> scenario because it will copy web.config from development to QA or production
> and thus result in the incorrect appsettings...i.e. Production all of a
> sudden connecting to the development database.
>
> Is there any way around this with the Publish command? Or do i have to
> manually use "Copy Web" which is more timeconsuming?
>
> Excluding web.config does't work because the web.config in the destination
> is still wiped out. I tried setting web.config to Read ONly in QA and
> production but it is still deleted and overwritten by the one from dev.
>
> Seems like someone really didn't think of this common scenario. An "Exclude
> web.config" checkbox would have been all that was necessary. Or is this
> hidden somewhere?
>
> Thx.
> R-



 
Reply With Quote
 
=?Utf-8?B?Um9iZXJ0?=
Guest
Posts: n/a
 
      11-03-2005
Thanks for your suggestion but it unfortunately is not an option in my case.

I tried using "exclude". When you use this, .net physically renames the
file in the dev site where i am developing to "web.config.exclude" which then
means that the dev site no longer works because there is no web.config.
Furthermore, when using the "publish" command, all of the files in the
destination are deleted first, irregardless of any "exclusion".

Even if I put all of the connection strings in the same web.config so it
could be identical in each environment i would still need to have a way to
know which environment i was actually running in and this would mean
hardcoding the url for example in a compiled file. Additionally in the
corporate environment where I am it is not permissible that I stored the
production credentials on the dev and qa sites although i do encrypt them.
And in some cases, i may not be allowed to know the production database
credentials which precludes them being the web.configs in each environments.

I think there really should have been a setting under options that just said
"exclude web.config" from publishing. And if checked, it 1) didn't delete a
web.config and 2) didn't copy or overwrite it either.

I am able to use the "copy web" to still deploy but it is significantly
slower than using publish and slower than the process under vs 2003.
Although theoretically if i just need to transfer a file or two, that is
faster.

thx.
r-

"Juan T. Llibre" wrote:

> re:
> > An "Exclude web.config" checkbox would have been all that was necessary.

>
> Doesn't selecting web.config in the Solution Explorer, and then going to the
> menu "Website", and then clicking on "Exclude from project" work for you ?
>
> What I would do, though, is include *all* connection strings in web.config and,
> depending on the website's location, use the appropiate one.
>
> Something like (pseudocode ) :
>
> Dim dnsname As String = Request.Url.Host
> If dnsname = domain1 Then
> ' request connection string 1 here
> Elseif dnsname = domain2 Then
> ' request connection string 2 here
> Else
> ' request connection string 3 here
> End If
> End If
>
>
> That should take care of all your problems.
>
>
>
>
> Juan T. Llibre, ASP.NET MVP
> ASP.NET FAQ : http://asp.net.do/faq/
> Foros de ASP.NET en Español : http://asp.net.do/foros/
> ======================================
> "Robert" <(E-Mail Removed)> wrote in message
> news:(E-Mail Removed)...
> >I have what I think should be a pretty common scenario in a corporate
> > environment. I have a web app and three environments on three servers:
> > Development, QA and Production.
> >
> > We develop in development and then deploy the updated application to our QA
> > server and then once tested to our production server.
> >
> > The application has a web.config file. The contents of the file
> > (appsettings part) are different in all three environments because each
> > enviroment connects to different databases (a dev, qa and the prod database).
> >
> > what I'm discovering is that the Publish option in VS2005 won't work in this
> > scenario because it will copy web.config from development to QA or production
> > and thus result in the incorrect appsettings...i.e. Production all of a
> > sudden connecting to the development database.
> >
> > Is there any way around this with the Publish command? Or do i have to
> > manually use "Copy Web" which is more timeconsuming?
> >
> > Excluding web.config does't work because the web.config in the destination
> > is still wiped out. I tried setting web.config to Read ONly in QA and
> > production but it is still deleted and overwritten by the one from dev.
> >
> > Seems like someone really didn't think of this common scenario. An "Exclude
> > web.config" checkbox would have been all that was necessary. Or is this
> > hidden somewhere?
> >
> > Thx.
> > R-

>
>
>

 
Reply With Quote
 
Juan T. Llibre
Guest
Posts: n/a
 
      11-03-2005
re:
> Even if I put all of the connection strings in the same web.config so it
> could be identical in each environment i would still need to have a way to
> know which environment i was actually running in and this would mean
> hardcoding the url for example in a compiled file.


No, no, no !

The pseudocode I outlined would work in all 3 environments,
providing the correct connection string to all of them.

re:
> And in some cases, i may not be allowed to know the production database
> credentials which precludes them being the web.configs in each environments.


You should talk your web admins about the inadvisability of that.

If you are tasked with developing a production site,
it's only natural that you have access to the databases there.

Anything less than that only hobbles you...and not even they want that.


re:
> I am able to use the "copy web" to still deploy but
> it is significantly slower than using publish


I'll take that any day over not being able to do it at all.






Juan T. Llibre, ASP.NET MVP
ASP.NET FAQ : http://asp.net.do/faq/
Foros de ASP.NET en Español : http://asp.net.do/foros/
======================================
"Robert" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> Thanks for your suggestion but it unfortunately is not an option in my case.
>
> I tried using "exclude". When you use this, .net physically renames the
> file in the dev site where i am developing to "web.config.exclude" which then
> means that the dev site no longer works because there is no web.config.
> Furthermore, when using the "publish" command, all of the files in the
> destination are deleted first, irregardless of any "exclusion".
>
> Even if I put all of the connection strings in the same web.config so it
> could be identical in each environment i would still need to have a way to
> know which environment i was actually running in and this would mean
> hardcoding the url for example in a compiled file. Additionally in the
> corporate environment where I am it is not permissible that I stored the
> production credentials on the dev and qa sites although i do encrypt them.
> And in some cases, i may not be allowed to know the production database
> credentials which precludes them being the web.configs in each environments.
>
> I think there really should have been a setting under options that just said
> "exclude web.config" from publishing. And if checked, it 1) didn't delete a
> web.config and 2) didn't copy or overwrite it either.
>
> I am able to use the "copy web" to still deploy but it is significantly
> slower than using publish and slower than the process under vs 2003.
> Although theoretically if i just need to transfer a file or two, that is
> faster.
>
> thx.
> r-
>
> "Juan T. Llibre" wrote:
>
>> re:
>> > An "Exclude web.config" checkbox would have been all that was necessary.

>>
>> Doesn't selecting web.config in the Solution Explorer, and then going to the
>> menu "Website", and then clicking on "Exclude from project" work for you ?
>>
>> What I would do, though, is include *all* connection strings in web.config and,
>> depending on the website's location, use the appropiate one.
>>
>> Something like (pseudocode ) :
>>
>> Dim dnsname As String = Request.Url.Host
>> If dnsname = domain1 Then
>> ' request connection string 1 here
>> Elseif dnsname = domain2 Then
>> ' request connection string 2 here
>> Else
>> ' request connection string 3 here
>> End If
>> End If
>>
>>
>> That should take care of all your problems.
>>
>>
>>
>>
>> Juan T. Llibre, ASP.NET MVP
>> ASP.NET FAQ : http://asp.net.do/faq/
>> Foros de ASP.NET en Español : http://asp.net.do/foros/
>> ======================================
>> "Robert" <(E-Mail Removed)> wrote in message
>> news:(E-Mail Removed)...
>> >I have what I think should be a pretty common scenario in a corporate
>> > environment. I have a web app and three environments on three servers:
>> > Development, QA and Production.
>> >
>> > We develop in development and then deploy the updated application to our QA
>> > server and then once tested to our production server.
>> >
>> > The application has a web.config file. The contents of the file
>> > (appsettings part) are different in all three environments because each
>> > enviroment connects to different databases (a dev, qa and the prod database).
>> >
>> > what I'm discovering is that the Publish option in VS2005 won't work in this
>> > scenario because it will copy web.config from development to QA or production
>> > and thus result in the incorrect appsettings...i.e. Production all of a
>> > sudden connecting to the development database.
>> >
>> > Is there any way around this with the Publish command? Or do i have to
>> > manually use "Copy Web" which is more timeconsuming?
>> >
>> > Excluding web.config does't work because the web.config in the destination
>> > is still wiped out. I tried setting web.config to Read ONly in QA and
>> > production but it is still deleted and overwritten by the one from dev.
>> >
>> > Seems like someone really didn't think of this common scenario. An "Exclude
>> > web.config" checkbox would have been all that was necessary. Or is this
>> > hidden somewhere?
>> >
>> > Thx.
>> > R-

>>
>>
>>



 
Reply With Quote
 
=?Utf-8?B?Um9iZXJ0?=
Guest
Posts: n/a
 
      11-03-2005
Obviously I'll have to stick with Copy Web. I work for a financial
institution (bank) and there are very strict government regulations so
security is currently a very, very big concern.

Thanks for your suggestions!

"Juan T. Llibre" wrote:

> re:
> > Even if I put all of the connection strings in the same web.config so it
> > could be identical in each environment i would still need to have a way to
> > know which environment i was actually running in and this would mean
> > hardcoding the url for example in a compiled file.

>
> No, no, no !
>
> The pseudocode I outlined would work in all 3 environments,
> providing the correct connection string to all of them.
>
> re:
> > And in some cases, i may not be allowed to know the production database
> > credentials which precludes them being the web.configs in each environments.

>
> You should talk your web admins about the inadvisability of that.
>
> If you are tasked with developing a production site,
> it's only natural that you have access to the databases there.
>
> Anything less than that only hobbles you...and not even they want that.
>
>
> re:
> > I am able to use the "copy web" to still deploy but
> > it is significantly slower than using publish

>
> I'll take that any day over not being able to do it at all.
>
>
>
>
>
>
> Juan T. Llibre, ASP.NET MVP
> ASP.NET FAQ : http://asp.net.do/faq/
> Foros de ASP.NET en Español : http://asp.net.do/foros/
> ======================================
> "Robert" <(E-Mail Removed)> wrote in message
> news:(E-Mail Removed)...
> > Thanks for your suggestion but it unfortunately is not an option in my case.
> >
> > I tried using "exclude". When you use this, .net physically renames the
> > file in the dev site where i am developing to "web.config.exclude" which then
> > means that the dev site no longer works because there is no web.config.
> > Furthermore, when using the "publish" command, all of the files in the
> > destination are deleted first, irregardless of any "exclusion".
> >
> > Even if I put all of the connection strings in the same web.config so it
> > could be identical in each environment i would still need to have a way to
> > know which environment i was actually running in and this would mean
> > hardcoding the url for example in a compiled file. Additionally in the
> > corporate environment where I am it is not permissible that I stored the
> > production credentials on the dev and qa sites although i do encrypt them.
> > And in some cases, i may not be allowed to know the production database
> > credentials which precludes them being the web.configs in each environments.
> >
> > I think there really should have been a setting under options that just said
> > "exclude web.config" from publishing. And if checked, it 1) didn't delete a
> > web.config and 2) didn't copy or overwrite it either.
> >
> > I am able to use the "copy web" to still deploy but it is significantly
> > slower than using publish and slower than the process under vs 2003.
> > Although theoretically if i just need to transfer a file or two, that is
> > faster.
> >
> > thx.
> > r-
> >
> > "Juan T. Llibre" wrote:
> >
> >> re:
> >> > An "Exclude web.config" checkbox would have been all that was necessary.
> >>
> >> Doesn't selecting web.config in the Solution Explorer, and then going to the
> >> menu "Website", and then clicking on "Exclude from project" work for you ?
> >>
> >> What I would do, though, is include *all* connection strings in web.config and,
> >> depending on the website's location, use the appropiate one.
> >>
> >> Something like (pseudocode ) :
> >>
> >> Dim dnsname As String = Request.Url.Host
> >> If dnsname = domain1 Then
> >> ' request connection string 1 here
> >> Elseif dnsname = domain2 Then
> >> ' request connection string 2 here
> >> Else
> >> ' request connection string 3 here
> >> End If
> >> End If
> >>
> >>
> >> That should take care of all your problems.
> >>
> >>
> >>
> >>
> >> Juan T. Llibre, ASP.NET MVP
> >> ASP.NET FAQ : http://asp.net.do/faq/
> >> Foros de ASP.NET en Español : http://asp.net.do/foros/
> >> ======================================
> >> "Robert" <(E-Mail Removed)> wrote in message
> >> news:(E-Mail Removed)...
> >> >I have what I think should be a pretty common scenario in a corporate
> >> > environment. I have a web app and three environments on three servers:
> >> > Development, QA and Production.
> >> >
> >> > We develop in development and then deploy the updated application to our QA
> >> > server and then once tested to our production server.
> >> >
> >> > The application has a web.config file. The contents of the file
> >> > (appsettings part) are different in all three environments because each
> >> > enviroment connects to different databases (a dev, qa and the prod database).
> >> >
> >> > what I'm discovering is that the Publish option in VS2005 won't work in this
> >> > scenario because it will copy web.config from development to QA or production
> >> > and thus result in the incorrect appsettings...i.e. Production all of a
> >> > sudden connecting to the development database.
> >> >
> >> > Is there any way around this with the Publish command? Or do i have to
> >> > manually use "Copy Web" which is more timeconsuming?
> >> >
> >> > Excluding web.config does't work because the web.config in the destination
> >> > is still wiped out. I tried setting web.config to Read ONly in QA and
> >> > production but it is still deleted and overwritten by the one from dev.
> >> >
> >> > Seems like someone really didn't think of this common scenario. An "Exclude
> >> > web.config" checkbox would have been all that was necessary. Or is this
> >> > hidden somewhere?
> >> >
> >> > Thx.
> >> > R-
> >>
> >>
> >>

>
>
>

 
Reply With Quote
 
Greg Burns
Guest
Posts: n/a
 
      11-03-2005
http://dvxp.com/discus/messages/1/149.html?1071180598

This is interesting. The recommendation here is to put the user.config file
on the production server and not on the development server. That way you
don't have to worry about it being copied at all.

Does Publish really purge the destination folder first? I can't get it to
do that will my quick test.

Greg


"Greg Burns" <(E-Mail Removed)> wrote in message
news:ubpqYi$(E-Mail Removed)...
> Not sure if this applies, but have your looked at using a user.config
> file? (I assume this still works in 2.0?)
>
> user.config
> <appSettings>
> <add key="ConnectionString"
> value="server=(local);Trusted_Connection=true;data base=bar;Application
> Name=foo" />
> </appSettings>
>
> web.config
> <appSettings file="user.config">
> <add key="ConnectionString"
> value="server=PRODSERVER;Trusted_Connection=true;d atabase=bar;Application
> Name=foo"/>
> </appSettings>
>
> My basic understanding is if the user.config is present it will use it,
> otherwise it defaults to the values in web.config. Not sure if Publish,
> copies user.config to server or not. Something to look into, hopefully
> somebody else has a better solution for you.
>
> Greg
>
>
>
> "Robert" <(E-Mail Removed)> wrote in message
> news:(E-Mail Removed)...
>>I have what I think should be a pretty common scenario in a corporate
>> environment. I have a web app and three environments on three servers:
>> Development, QA and Production.
>>
>> We develop in development and then deploy the updated application to our
>> QA
>> server and then once tested to our production server.
>>
>> The application has a web.config file. The contents of the file
>> (appsettings part) are different in all three environments because each
>> enviroment connects to different databases (a dev, qa and the prod
>> database).
>>
>> what I'm discovering is that the Publish option in VS2005 won't work in
>> this
>> scenario because it will copy web.config from development to QA or
>> production
>> and thus result in the incorrect appsettings...i.e. Production all of a
>> sudden connecting to the development database.
>>
>> Is there any way around this with the Publish command? Or do i have to
>> manually use "Copy Web" which is more timeconsuming?
>>
>> Excluding web.config does't work because the web.config in the
>> destination
>> is still wiped out. I tried setting web.config to Read ONly in QA and
>> production but it is still deleted and overwritten by the one from dev.
>>
>> Seems like someone really didn't think of this common scenario. An
>> "Exclude
>> web.config" checkbox would have been all that was necessary. Or is this
>> hidden somewhere?
>>
>> Thx.
>> R-

>
>



 
Reply With Quote
 
Greg Burns
Guest
Posts: n/a
 
      11-03-2005
I guess my test was a little too quick. I see that it DOES purge first.
bummer

"Greg Burns" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> http://dvxp.com/discus/messages/1/149.html?1071180598
>
> This is interesting. The recommendation here is to put the user.config
> file on the production server and not on the development server. That way
> you don't have to worry about it being copied at all.
>
> Does Publish really purge the destination folder first? I can't get it to
> do that will my quick test.
>
> Greg
>
>
> "Greg Burns" <(E-Mail Removed)> wrote in message
> news:ubpqYi$(E-Mail Removed)...
>> Not sure if this applies, but have your looked at using a user.config
>> file? (I assume this still works in 2.0?)
>>
>> user.config
>> <appSettings>
>> <add key="ConnectionString"
>> value="server=(local);Trusted_Connection=true;data base=bar;Application
>> Name=foo" />
>> </appSettings>
>>
>> web.config
>> <appSettings file="user.config">
>> <add key="ConnectionString"
>> value="server=PRODSERVER;Trusted_Connection=true;d atabase=bar;Application
>> Name=foo"/>
>> </appSettings>
>>
>> My basic understanding is if the user.config is present it will use it,
>> otherwise it defaults to the values in web.config. Not sure if Publish,
>> copies user.config to server or not. Something to look into, hopefully
>> somebody else has a better solution for you.
>>
>> Greg
>>
>>
>>
>> "Robert" <(E-Mail Removed)> wrote in message
>> news:(E-Mail Removed)...
>>>I have what I think should be a pretty common scenario in a corporate
>>> environment. I have a web app and three environments on three servers:
>>> Development, QA and Production.
>>>
>>> We develop in development and then deploy the updated application to our
>>> QA
>>> server and then once tested to our production server.
>>>
>>> The application has a web.config file. The contents of the file
>>> (appsettings part) are different in all three environments because each
>>> enviroment connects to different databases (a dev, qa and the prod
>>> database).
>>>
>>> what I'm discovering is that the Publish option in VS2005 won't work in
>>> this
>>> scenario because it will copy web.config from development to QA or
>>> production
>>> and thus result in the incorrect appsettings...i.e. Production all of a
>>> sudden connecting to the development database.
>>>
>>> Is there any way around this with the Publish command? Or do i have to
>>> manually use "Copy Web" which is more timeconsuming?
>>>
>>> Excluding web.config does't work because the web.config in the
>>> destination
>>> is still wiped out. I tried setting web.config to Read ONly in QA and
>>> production but it is still deleted and overwritten by the one from dev.
>>>
>>> Seems like someone really didn't think of this common scenario. An
>>> "Exclude
>>> web.config" checkbox would have been all that was necessary. Or is this
>>> hidden somewhere?
>>>
>>> Thx.
>>> R-

>>
>>

>
>



 
Reply With Quote
 
Juan T. Llibre
Guest
Posts: n/a
 
      11-03-2005
re:
> Does Publish really purge the destination folder first?


It does...



Juan T. Llibre, ASP.NET MVP
ASP.NET FAQ : http://asp.net.do/faq/
Foros de ASP.NET en Español : http://asp.net.do/foros/
======================================
"Greg Burns" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> http://dvxp.com/discus/messages/1/149.html?1071180598
>
> This is interesting. The recommendation here is to put the user.config file on the
> production server and not on the development server. That way you don't have to worry
> about it being copied at all.
>
> Does Publish really purge the destination folder first? I can't get it to do that will
> my quick test.
>
> Greg
>
>
> "Greg Burns" <(E-Mail Removed)> wrote in message
> news:ubpqYi$(E-Mail Removed)...
>> Not sure if this applies, but have your looked at using a user.config file? (I assume
>> this still works in 2.0?)
>>
>> user.config
>> <appSettings>
>> <add key="ConnectionString"
>> value="server=(local);Trusted_Connection=true;data base=bar;Application Name=foo" />
>> </appSettings>
>>
>> web.config
>> <appSettings file="user.config">
>> <add key="ConnectionString"
>> value="server=PRODSERVER;Trusted_Connection=true;d atabase=bar;Application Name=foo"/>
>> </appSettings>
>>
>> My basic understanding is if the user.config is present it will use it, otherwise it
>> defaults to the values in web.config. Not sure if Publish, copies user.config to
>> server or not. Something to look into, hopefully somebody else has a better solution
>> for you.
>>
>> Greg
>>
>>
>>
>> "Robert" <(E-Mail Removed)> wrote in message
>> news:(E-Mail Removed)...
>>>I have what I think should be a pretty common scenario in a corporate
>>> environment. I have a web app and three environments on three servers:
>>> Development, QA and Production.
>>>
>>> We develop in development and then deploy the updated application to our QA
>>> server and then once tested to our production server.
>>>
>>> The application has a web.config file. The contents of the file
>>> (appsettings part) are different in all three environments because each
>>> enviroment connects to different databases (a dev, qa and the prod database).
>>>
>>> what I'm discovering is that the Publish option in VS2005 won't work in this
>>> scenario because it will copy web.config from development to QA or production
>>> and thus result in the incorrect appsettings...i.e. Production all of a
>>> sudden connecting to the development database.
>>>
>>> Is there any way around this with the Publish command? Or do i have to
>>> manually use "Copy Web" which is more timeconsuming?
>>>
>>> Excluding web.config does't work because the web.config in the destination
>>> is still wiped out. I tried setting web.config to Read ONly in QA and
>>> production but it is still deleted and overwritten by the one from dev.
>>>
>>> Seems like someone really didn't think of this common scenario. An "Exclude
>>> web.config" checkbox would have been all that was necessary. Or is this
>>> hidden somewhere?
>>>
>>> Thx.
>>> R-

>>
>>

>
>



 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Prevent file deletion on deployment: just overwrite pamela fluente ASP .Net 1 09-13-2007 02:24 PM
HTTP_ Custom Headers do not overwrite in setRequestHeader Noel Volin ASP General 0 11-21-2005 10:17 PM
Enterprise Library deployment problem. Why needs to InstallUtil DLLs to the deployment server? If not, Registry Error whould shown. Benny Ng ASP .Net 0 10-03-2005 05:40 AM
Re: JSP form submit does not overwrite request parameter value zalla rouge Java 0 09-02-2003 03:02 PM
Re: JSP form submit does not overwrite request parameter value VisionSet Java 1 09-02-2003 11:27 AM



Advertisments