472,811 Members | 1,435 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,811 software developers and data experts.

Publish ASP.NET 2.0 site

I have what is hopefully a quick question. I want to have a quick and
easy method for deploying my website to our test environment. I need
something to do nearly the same thing as the "Publish Web Site" option
under the build menu, except I don't want it to copy over the
web.config file. There are a few settings that need to be different,
so I want the publish process to leave the web.config file alone. What
is the easiest way to do this?

Thanks,
Eric

Nov 17 '06 #1
6 4317
Hi,

Eric wrote:
I have what is hopefully a quick question. I want to have a quick and
easy method for deploying my website to our test environment. I need
something to do nearly the same thing as the "Publish Web Site" option
under the build menu, except I don't want it to copy over the
web.config file. There are a few settings that need to be different,
so I want the publish process to leave the web.config file alone. What
is the easiest way to do this?

Thanks,
Eric
You could publish to a local filesystem folder, and then FTP everything
to your site except the web.config.

HTH,
Laurent
--
Laurent Bugnion, GalaSoft
Software engineering: http://www.galasoft-LB.ch
PhotoAlbum: http://www.galasoft-LB.ch/pictures
Support children in Calcutta: http://www.calcutta-espoir.ch
Nov 17 '06 #2
If you store your settings in the <appSettingssection, you can use the
<appSettings file="xxxx"
directive to keep those settings in a separate file, which can be different
for both production and development.
Peter

--
Co-founder, Eggheadcafe.com developer portal:
http://www.eggheadcafe.com
UnBlog:
http://petesbloggerama.blogspot.com


"Eric" wrote:
I have what is hopefully a quick question. I want to have a quick and
easy method for deploying my website to our test environment. I need
something to do nearly the same thing as the "Publish Web Site" option
under the build menu, except I don't want it to copy over the
web.config file. There are a few settings that need to be different,
so I want the publish process to leave the web.config file alone. What
is the easiest way to do this?

Thanks,
Eric

Nov 17 '06 #3
That is basically what I am doing now. For convenience sake I am
wondering if there is a way to remove the second step.

Laurent Bugnion wrote:
Hi,

Eric wrote:
I have what is hopefully a quick question. I want to have a quick and
easy method for deploying my website to our test environment. I need
something to do nearly the same thing as the "Publish Web Site" option
under the build menu, except I don't want it to copy over the
web.config file. There are a few settings that need to be different,
so I want the publish process to leave the web.config file alone. What
is the easiest way to do this?

Thanks,
Eric

You could publish to a local filesystem folder, and then FTP everything
to your site except the web.config.

HTH,
Laurent
--
Laurent Bugnion, GalaSoft
Software engineering: http://www.galasoft-LB.ch
PhotoAlbum: http://www.galasoft-LB.ch/pictures
Support children in Calcutta: http://www.calcutta-espoir.ch
Nov 20 '06 #4
I need to change 1 appSetting and 2 connection strings. I'm wondering
now if there is a way to detect a release build. Since publish builds
for release, I could have it use different settings in the web.config
based on that.

Peter wrote:
If you store your settings in the <appSettingssection, you can use the
<appSettings file="xxxx"
directive to keep those settings in a separate file, which can be different
for both production and development.
Peter

--
Co-founder, Eggheadcafe.com developer portal:
http://www.eggheadcafe.com
UnBlog:
http://petesbloggerama.blogspot.com


"Eric" wrote:
I have what is hopefully a quick question. I want to have a quick and
easy method for deploying my website to our test environment. I need
something to do nearly the same thing as the "Publish Web Site" option
under the build menu, except I don't want it to copy over the
web.config file. There are a few settings that need to be different,
so I want the publish process to leave the web.config file alone. What
is the easiest way to do this?

Thanks,
Eric
Nov 20 '06 #5
Hi,

Eric wrote:
I need to change 1 appSetting and 2 connection strings. I'm wondering
now if there is a way to detect a release build. Since publish builds
for release, I could have it use different settings in the web.config
based on that.
I think it's a possibility.

The compiler variable DEBUG is only defined for Debug build, and is not
defined for release. Additionally, you can use the Configuration manager
in Visual Studio to define more variables if needed.

#if DEBUG
// Use Debug setting
#else
// Use release setting
#endif

You could also test if the Request path is for "localhost" or for
something else, in which case it would be the production server.

HTH,
Laurent

>
Peter wrote:
>If you store your settings in the <appSettingssection, you can use the
<appSettings file="xxxx"
directive to keep those settings in a separate file, which can be different
for both production and development.
Peter

--
Co-founder, Eggheadcafe.com developer portal:
http://www.eggheadcafe.com
UnBlog:
http://petesbloggerama.blogspot.com


"Eric" wrote:
>>I have what is hopefully a quick question. I want to have a quick and
easy method for deploying my website to our test environment. I need
something to do nearly the same thing as the "Publish Web Site" option
under the build menu, except I don't want it to copy over the
web.config file. There are a few settings that need to be different,
so I want the publish process to leave the web.config file alone. What
is the easiest way to do this?

Thanks,
Eric


--
Laurent Bugnion, GalaSoft
Software engineering: http://www.galasoft-LB.ch
PhotoAlbum: http://www.galasoft-LB.ch/pictures
Support children in Calcutta: http://www.calcutta-espoir.ch
Nov 20 '06 #6
Thanks a bunch, I think that will work.

Laurent Bugnion wrote:
Hi,

Eric wrote:
I need to change 1 appSetting and 2 connection strings. I'm wondering
now if there is a way to detect a release build. Since publish builds
for release, I could have it use different settings in the web.config
based on that.

I think it's a possibility.

The compiler variable DEBUG is only defined for Debug build, and is not
defined for release. Additionally, you can use the Configuration manager
in Visual Studio to define more variables if needed.

#if DEBUG
// Use Debug setting
#else
// Use release setting
#endif

You could also test if the Request path is for "localhost" or for
something else, in which case it would be the production server.

HTH,
Laurent


Peter wrote:
If you store your settings in the <appSettingssection, you can use the
<appSettings file="xxxx"
directive to keep those settings in a separate file, which can be different
for both production and development.
Peter

--
Co-founder, Eggheadcafe.com developer portal:
http://www.eggheadcafe.com
UnBlog:
http://petesbloggerama.blogspot.com


"Eric" wrote:

I have what is hopefully a quick question. I want to have a quick and
easy method for deploying my website to our test environment. I need
something to do nearly the same thing as the "Publish Web Site" option
under the build menu, except I don't want it to copy over the
web.config file. There are a few settings that need to be different,
so I want the publish process to leave the web.config file alone. What
is the easiest way to do this?

Thanks,
Eric



--
Laurent Bugnion, GalaSoft
Software engineering: http://www.galasoft-LB.ch
PhotoAlbum: http://www.galasoft-LB.ch/pictures
Support children in Calcutta: http://www.calcutta-espoir.ch
Nov 20 '06 #7

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

8
by: Graham | last post by:
I noticed a similar post awhile ago and in terms of my problem it wasnt a suitable answer so I will ask again. I have VS2005 running a on development machine in my office where I do all my...
6
by: ewolfman | last post by:
Hi, I've read many posts in several news groups, but can't figure out how to publish my website. The specific error I'm getting (on the "successfully published website") is "Could not load the...
9
by: Alex Greenberg | last post by:
I don't know, but I find the Publish Web Site feature very lacking and weak. I mean, why does the damn thing have to delete unrelated directories like /images /documents etc. This is so...
10
by: WT | last post by:
Hello, I have been publishing my web site many times to the remote where resides my final web site. Everything was ok, but to-day, without any configuration change, vs doesn't copy final files...
3
by: Stan | last post by:
What exactly is required in order to use Publish Web Site dialog in VS.NET 2005? Permissions, Front Page extenstion, etc? I keep getting different erros all the time - login boxes, server...
3
by: Tom | last post by:
I did a Build --Publish web site last night on my web app, It publish correctly but it created 12 DLL's for it. Is there a way to only get 1 dll for the entire web project like in 03 or a is there...
2
by: genc_ymeri | last post by:
Hi over there, I suddenly started to get the below error when I try to publish my websites, in any of them ! I tried to google it but not much info. Any help very much appreciated, thanks...
3
by: jfarrell | last post by:
Hi there, Im attempting to publish my site to local then copy files to the web server. The only option there seems to be in VWDE is to build/copy the site...where is the Publish website option...
9
by: Jason | last post by:
Hi all, I am no longer able to publish a web site project using Visual Studio 2005 Professional. I am publishing it to an FTP url, and this used to work just fine. I enter the username and...
2
by: moondaddy | last post by:
I have a asp.net 2.0 project (vs 2005) and am trying to publish it to a folder on the same machine (the dev machine). the project (and solution) builds fine, but when I publish it, it publishes...
2
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 2 August 2023 starting at 18:00 UK time (6PM UTC+1) and finishing at about 19:15 (7.15PM) The start time is equivalent to 19:00 (7PM) in Central...
0
linyimin
by: linyimin | last post by:
Spring Startup Analyzer generates an interactive Spring application startup report that lets you understand what contributes to the application startup time and helps to optimize it. Support for...
0
by: erikbower65 | last post by:
Here's a concise step-by-step guide for manually installing IntelliJ IDEA: 1. Download: Visit the official JetBrains website and download the IntelliJ IDEA Community or Ultimate edition based on...
0
by: Taofi | last post by:
I try to insert a new record but the error message says the number of query names and destination fields are not the same This are my field names ID, Budgeted, Actual, Status and Differences ...
0
by: Rina0 | last post by:
I am looking for a Python code to find the longest common subsequence of two strings. I found this blog post that describes the length of longest common subsequence problem and provides a solution in...
5
by: DJRhino | last post by:
Private Sub CboDrawingID_BeforeUpdate(Cancel As Integer) If = 310029923 Or 310030138 Or 310030152 Or 310030346 Or 310030348 Or _ 310030356 Or 310030359 Or 310030362 Or...
0
by: lllomh | last post by:
Define the method first this.state = { buttonBackgroundColor: 'green', isBlinking: false, // A new status is added to identify whether the button is blinking or not } autoStart=()=>{
0
by: Mushico | last post by:
How to calculate date of retirement from date of birth
2
by: DJRhino | last post by:
Was curious if anyone else was having this same issue or not.... I was just Up/Down graded to windows 11 and now my access combo boxes are not acting right. With win 10 I could start typing...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.