473,834 Members | 1,905 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 4363
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 <appSettingssec tion, 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 <appSettingssec tion, 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 <appSettingssec tion, 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 <appSettingssec tion, 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
3171
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 development on existing and new applications. This environment also has its own Sql Server with dev versions of all our live Databases. Our live production server also its own Sql Server, these 2 Sql Servers are kept completely separate (for obvious...
6
3837
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 assembly 'App_Web_vxfyglsm'. Make sure that it is compiled before accessing the page". I checked - The assembly DOES exist in the target web folder.
9
2385
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 impractical, what if my users generate these documents or images through their interaction with the site, and then I change some code and publish it, boom, everything is gone. I cannot put these folders outside the solution due to security/pathing...
10
2539
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 to the remote site. It finish with a message of publish sucess but no files nor folders on the remote disk ? I have checked rights on this folder, everyone have modify.
3
1454
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 errors, etc. It's not like that it does not work, but the process is unstable, I can't quite figure it out.
3
1509
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 another way to publish from my local box to the test web server? what is the best way to publish an .NET 05 web site to a server? Also for publishing updates to the web site how does that work because I have to drag and drop dll's that I'm...
2
3456
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 in advance,
3
3896
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 ? any ideas thanks
9
2935
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 password and select "passive mode" when publishing the site, like I have always done. Visual Studio deletes the existing files, but then doesn't write the new ones, though it tells me the operation was
2
670
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 most of the files and folders and then fails. It doesn't give any error msg so I don't know where to start trouble shooting it. can anyone lend a hand here? Thanks!
0
9799
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9649
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10515
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10554
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
1
7761
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5629
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
4428
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3985
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
3084
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.