Publish Web site and the web.config

G

Graham

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 reasons). I have a separate web.config file for each environment for each Sql connection string as well as having debug mode turned on or off.

At the moment we use a winace script that aces all teh required files into a .ace file, which we then upload to teh production server via ftp then run an unace script to release each website. While this isnt exactly the prettiest method of deployment it is reasonably quick and we can set what files do or do not get deployed when we do a release.

With the release of .Net 2.0 I noticed that websites are no longer compiled into a single dll. In fact in terms of dll creation it seems that they arent compiled at all. This makes deploying to our live production server a tad difficult. Below are the following methods I have been able to find:

Straight File Copy
One way is copying all the files onto the production server filessytem and let the website be JIT compiled when it is accessed. This method while easier to accomplish creates a couple of bad things - it slows the server down when it has to compile each page and it allows the client to access the source code of the site ( I dont like doing this).

Build->Publish Website
I had a play with with this tool for awhile but it does some strange things. It removes all files in the directory before each build, including custom files (the tool tells you about existing files, and fails if you select not to remove them). Plus it releases the development web.config with the rest of the website meaning on each publish I have to change the production web.config manually.

Website-> Copy Website
This seems like a built in Ftp client with dif tools, which would be nice if I could get around having to upload my .cs files to the production server.

What I am looking for is something like Publish Website, but that you can either select files to not be published or for it not to delete the existing files in the release directory. Or a single dll to be created when you compile a website in the IDE so I can use my existing method of releasing websites.

Help Appreciated
Graham
 
S

Steven Cheng[MSFT]

Hi Grapham,

Welcome here.
Regarding on the problem you mentiond, first I think all the things and
behaviors you described are correct. Copy Files only help us copy and
synchronous specified items between current site and target site (but no
precompiled action is performed). While the publishSite seems good but will
empty the target website(virtual dir) first.

Based on my research and testing, I'd suggest the following two approach:
1. Since the only difference between your client and server is the
web.config file, is it possible that we modify or replace the web.config at
development machine before publishing? If possible, we can still utilize
the PublishSite directly....

2. If it's really impossible to get the target server's configuration on
dev machine before publishing. We can consider separate the publishing into
two steps:

1) Since the VS.NET 2005's publishSite can let us publish the Precompiled
website into a local physical filesystem folder. So we can publish the
precompiled Site into a local file folder.

2) use VS.NET 2005 to open the temp file folder created in 1). Then, we'll
get message indicate that this is a precompiled site and do not modify it(
just ignore it). Then, we can use the CopySite function to copy the
necessary files we want to deploying...

Just some of my suggestions. I'm afraid so far there is no perfect solution
available.
Thanks for your understanding.

Regards,

Steven Cheng
Microsoft Online Support

Get Secure! www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)








--------------------
| From: "Graham" <[email protected]>
| Subject: Publish Web site and the web.config
| Date: Mon, 7 Nov 2005 11:17:29 +1300
| Lines: 162
| MIME-Version: 1.0
| Content-Type: multipart/alternative;
| boundary="----=_NextPart_000_0017_01C5E38C.D762CC30"
| X-Priority: 3
| X-MSMail-Priority: Normal
| X-Newsreader: Microsoft Outlook Express 6.00.2900.2180
| X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2180
| Message-ID: <[email protected]>
| Newsgroups: microsoft.public.dotnet.framework.aspnet
| NNTP-Posting-Host: 222-153-144-207.jetstream.xtra.co.nz 222.153.144.207
| Path: TK2MSFTNGXA01.phx.gbl!TK2MSFTNGP08.phx.gbl!TK2MSFTNGP09.phx.gbl
| Xref: TK2MSFTNGXA01.phx.gbl
microsoft.public.dotnet.framework.aspnet:136472
| X-Tomcat-NG: microsoft.public.dotnet.framework.aspnet
|
| 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 reasons). I have a separate
web.config file for each environment for each Sql connection string as well
as having debug mode turned on or off.
| At the moment we use a winace script that aces all teh required files
into a .ace file, which we then upload to teh production server via ftp
then run an unace script to release each website. While this isnt exactly
the prettiest method of deployment it is reasonably quick and we can set
what files do or do not get deployed when we do a release.
| With the release of .Net 2.0 I noticed that websites are no longer
compiled into a single dll. In fact in terms of dll creation it seems that
they arent compiled at all. This makes deploying to our live production
server a tad difficult. Below are the following methods I have been able to
find:
| Straight File Copy
| One way is copying all the files onto the production server filessytem
and let the website be JIT compiled when it is accessed. This method while
easier to accomplish creates a couple of bad things - it slows the server
down when it has to compile each page and it allows the client to access
the source code of the site ( I dont like doing this).
| Build->Publish Website
| I had a play with with this tool for awhile but it does some strange
things. It removes all files in the directory before each build, including
custom files (the tool tells you about existing files, and fails if you
select not to remove them). Plus it releases the development web.config
with the rest of the website meaning on each publish I have to change the
production web.config manually.
| Website-> Copy Website
| This seems like a built in Ftp client with dif tools, which would be nice
if I could get around having to upload my .cs files to the production
server.
| What I am looking for is something like Publish Website, but that you can
either select files to not be published or for it not to delete the
existing files in the release directory. Or a single dll to be created when
you compile a website in the IDE so I can use my existing method of
releasing websites.
| Help Appreciated
| Graham
|
 
G

Graham

Thanks for your reply.
Is it possible to create a custom Visual Studio add-in that does exactly
what I need and uses the Publish Website function as well?

Graham
 
S

Steven Cheng[MSFT]

Thanks for Scott's informative input,

Hi Graham,

So I think building a custom ADD-in could be helpful on make our
precompiling more easy(not need to do it in two steps as mentioned in my
last message), however, I'm afraid it won't help change the PublishSite's
behavior...
How about the feature described in the article Scott provided?

Thanks,

Steven Cheng
Microsoft Online Support

Get Secure! www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)
--------------------
| From: Scott Allen <[email protected]>
| Subject: Re: Publish Web site and the web.config
| Date: Mon, 07 Nov 2005 20:54:42 -0500
| Message-ID: <[email protected]>
| References: <[email protected]>
<[email protected]>
<[email protected]>
| X-Newsreader: Forte Agent 1.8/32.548
| MIME-Version: 1.0
| Content-Type: text/plain; charset=us-ascii
| Content-Transfer-Encoding: 7bit
| Newsgroups: microsoft.public.dotnet.framework.aspnet
| NNTP-Posting-Host: dyn-170-243-160.myactv.net 24.170.243.160
| Lines: 1
| Path: TK2MSFTNGXA01.phx.gbl!TK2MSFTNGP08.phx.gbl!TK2MSFTNGP12.phx.gbl
| Xref: TK2MSFTNGXA01.phx.gbl
microsoft.public.dotnet.framework.aspnet:136805
| X-Tomcat-NG: microsoft.public.dotnet.framework.aspnet
|
| On Tue, 8 Nov 2005 10:08:52 +1300, "Graham"
|
| >Thanks for your reply.
| >Is it possible to create a custom Visual Studio add-in that does exactly
| >what I need and uses the Publish Website function as well?
| >
|
|
| I'd give it a couple more days to see if the web deplyoment project
| does everything you need:
| http://weblogs.asp.net/scottgu/archive/2005/11/06/429723.aspx
|
| --
| Scott
| http://www.OdeToCode.com/blogs/scott/
|
|
 
G

Graham

Thank you Scott
Looks like I will be able to do eveything I need using that add-in.
I had a read of the decisions behind the changes to web projects in VS 2005,
and I have to say that I am slowly understanding why it does what it does.
Change should not be feared.
Thanks for your continued support Steven.

Graham
 
S

Steven Cheng[MSFT]

Thanks for your followup and the further feedback.

Yes, we'll get much more confident when actually get how and why something
do. Also, hope you also bring this good feature to more other .net guys :)

Thanks,

Steven Cheng
Microsoft Online Support

Get Secure! www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)


--------------------
| From: "Graham" <[email protected]>
| References: <[email protected]>
<[email protected]>
<[email protected]>
<[email protected]>
<[email protected]>
| Subject: Re: Publish Web site and the web.config
| Date: Wed, 9 Nov 2005 09:47:12 +1300
| Lines: 72
| X-Priority: 3
| X-MSMail-Priority: Normal
| X-Newsreader: Microsoft Outlook Express 6.00.2900.2180
| X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2180
| X-RFC2646: Format=Flowed; Original
| Message-ID: <#[email protected]>
| Newsgroups: microsoft.public.dotnet.framework.aspnet
| NNTP-Posting-Host: 222-153-144-207.jetstream.xtra.co.nz 222.153.144.207
| Path: TK2MSFTNGXA01.phx.gbl!TK2MSFTNGP08.phx.gbl!TK2MSFTNGP11.phx.gbl
| Xref: TK2MSFTNGXA01.phx.gbl
microsoft.public.dotnet.framework.aspnet:137063
| X-Tomcat-NG: microsoft.public.dotnet.framework.aspnet
|
| Thank you Scott
| Looks like I will be able to do eveything I need using that add-in.
| I had a read of the decisions behind the changes to web projects in VS
2005,
| and I have to say that I am slowly understanding why it does what it does.
| Change should not be feared.
| Thanks for your continued support Steven.
|
| Graham
|
|
| | > Thanks for Scott's informative input,
| >
| > Hi Graham,
| >
| > So I think building a custom ADD-in could be helpful on make our
| > precompiling more easy(not need to do it in two steps as mentioned in my
| > last message), however, I'm afraid it won't help change the
PublishSite's
| > behavior...
| > How about the feature described in the article Scott provided?
| >
| > Thanks,
| >
| > Steven Cheng
| > Microsoft Online Support
| >
| > Get Secure! www.microsoft.com/security
| > (This posting is provided "AS IS", with no warranties, and confers no
| > rights.)
| > --------------------
| > | From: Scott Allen <[email protected]>
| > | Subject: Re: Publish Web site and the web.config
| > | Date: Mon, 07 Nov 2005 20:54:42 -0500
| > | Message-ID: <[email protected]>
| > | References: <[email protected]>
| > <[email protected]>
| > <[email protected]>
| > | X-Newsreader: Forte Agent 1.8/32.548
| > | MIME-Version: 1.0
| > | Content-Type: text/plain; charset=us-ascii
| > | Content-Transfer-Encoding: 7bit
| > | Newsgroups: microsoft.public.dotnet.framework.aspnet
| > | NNTP-Posting-Host: dyn-170-243-160.myactv.net 24.170.243.160
| > | Lines: 1
| > | Path: TK2MSFTNGXA01.phx.gbl!TK2MSFTNGP08.phx.gbl!TK2MSFTNGP12.phx.gbl
| > | Xref: TK2MSFTNGXA01.phx.gbl
| > microsoft.public.dotnet.framework.aspnet:136805
| > | X-Tomcat-NG: microsoft.public.dotnet.framework.aspnet
| > |
| > | On Tue, 8 Nov 2005 10:08:52 +1300, "Graham"
| > |
| > | >Thanks for your reply.
| > | >Is it possible to create a custom Visual Studio add-in that does
| > exactly
| > | >what I need and uses the Publish Website function as well?
| > | >
| > |
| > |
| > | I'd give it a couple more days to see if the web deplyoment project
| > | does everything you need:
| > | http://weblogs.asp.net/scottgu/archive/2005/11/06/429723.aspx
| > |
| > | --
| > | Scott
| > | http://www.OdeToCode.com/blogs/scott/
| > |
| > |
| >
|
|
|
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,055
Latest member
SlimSparkKetoACVReview

Latest Threads

Top