Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > Publish Web site and the web.config

Reply
Thread Tools

Publish Web site and the web.config

 
 
Graham
Guest
Posts: n/a
 
      11-06-2005
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
 
Reply With Quote
 
 
 
 
Steven Cheng[MSFT]
Guest
Posts: n/a
 
      11-07-2005
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" <(E-Mail Removed)>
| 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: <uHo9h$(E-Mail Removed)>
| 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!TK2MSFT NGP09.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
|

 
Reply With Quote
 
 
 
 
Graham
Guest
Posts: n/a
 
      11-07-2005
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


"Steven Cheng[MSFT]" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> 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" <(E-Mail Removed)>
> | 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: <uHo9h$(E-Mail Removed)>
> | 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!TK2MSFT NGP09.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
> |
>



 
Reply With Quote
 
Scott Allen
Guest
Posts: n/a
 
      11-08-2005
On Tue, 8 Nov 2005 10:08:52 +1300, "Graham"
<(E-Mail Removed)> wrote:

>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/archi...06/429723.aspx

--
Scott
http://www.OdeToCode.com/blogs/scott/

 
Reply With Quote
 
Greg Burns
Guest
Posts: n/a
 
      11-08-2005
Wow. Good find.

"Scott Allen" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> On Tue, 8 Nov 2005 10:08:52 +1300, "Graham"
> <(E-Mail Removed)> wrote:
>
>>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/archi...06/429723.aspx
>
> --
> Scott
> http://www.OdeToCode.com/blogs/scott/
>



 
Reply With Quote
 
Steven Cheng[MSFT]
Guest
Posts: n/a
 
      11-08-2005
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 <(E-Mail Removed)>
| Subject: Re: Publish Web site and the web.config
| Date: Mon, 07 Nov 2005 20:54:42 -0500
| Message-ID: <(E-Mail Removed)>
| References: <uHo9h$(E-Mail Removed)>
<(E-Mail Removed)>
<(E-Mail Removed)>
| 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!TK2MSFT NGP12.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"
| <(E-Mail Removed)> wrote:
|
| >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/archi...06/429723.aspx
|
| --
| Scott
| http://www.OdeToCode.com/blogs/scott/
|
|

 
Reply With Quote
 
Graham
Guest
Posts: n/a
 
      11-08-2005
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


"Steven Cheng[MSFT]" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> 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 <(E-Mail Removed)>
> | Subject: Re: Publish Web site and the web.config
> | Date: Mon, 07 Nov 2005 20:54:42 -0500
> | Message-ID: <(E-Mail Removed)>
> | References: <uHo9h$(E-Mail Removed)>
> <(E-Mail Removed)>
> <(E-Mail Removed)>
> | 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!TK2MSFT NGP12.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"
> | <(E-Mail Removed)> wrote:
> |
> | >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/archi...06/429723.aspx
> |
> | --
> | Scott
> | http://www.OdeToCode.com/blogs/scott/
> |
> |
>



 
Reply With Quote
 
Steven Cheng[MSFT]
Guest
Posts: n/a
 
      11-09-2005
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" <(E-Mail Removed)>
| References: <uHo9h$(E-Mail Removed)>
<(E-Mail Removed)>
<(E-Mail Removed)>
<(E-Mail Removed)>
<(E-Mail Removed)>
| 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: <#(E-Mail Removed)>
| 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!TK2MSFT NGP11.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
|
|
| "Steven Cheng[MSFT]" <(E-Mail Removed)> wrote in message
| news:(E-Mail Removed)...
| > 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 <(E-Mail Removed)>
| > | Subject: Re: Publish Web site and the web.config
| > | Date: Mon, 07 Nov 2005 20:54:42 -0500
| > | Message-ID: <(E-Mail Removed)>
| > | References: <uHo9h$(E-Mail Removed)>
| > <(E-Mail Removed)>
| > <(E-Mail Removed)>
| > | 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!TK2MSFT NGP12.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"
| > | <(E-Mail Removed)> wrote:
| > |
| > | >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/archi...06/429723.aspx
| > |
| > | --
| > | Scott
| > | http://www.OdeToCode.com/blogs/scott/
| > |
| > |
| >
|
|
|

 
Reply With Quote
 
Greg Burns
Guest
Posts: n/a
 
      11-10-2005
"Scott Allen" <(E-Mail Removed)> wrote in message
> I'd give it a couple more days to see if the web deplyoment project
> does everything you need:
> http://weblogs.asp.net/scottgu/archi...06/429723.aspx


Looks like you can download it now.

http://channel9.msdn.com/showpost.aspx?postid=134912

http://msdn.microsoft.com/asp.net/re...p/default.aspx


 
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
Publish Web Site won't publish my doc/docx files Tim Royal ASP .Net 0 08-28-2008 01:42 AM
Help: Copy Web site vs Publish Website vs Web Deployment Project Cirene ASP .Net 4 05-08-2008 05:58 PM
How can I prevent Publish Web Site from overwriting web.config? Stan B ASP .Net 3 04-06-2007 03:23 PM
Re: How publish a web site without web.config? Mark Rae ASP .Net 0 01-05-2007 06:57 PM
I want to publish my web site on the web ShayHk ASP .Net 3 12-22-2006 09:47 AM



Advertisments