Publish Web site and the web.config

Discussion in 'ASP .Net' started by Graham, Nov 6, 2005.

  1. Graham

    Graham Guest

    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
     
    Graham, Nov 6, 2005
    #1
    1. Advertising

  2. 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" <>
    | 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$>
    | 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
    |
     
    Steven Cheng[MSFT], Nov 7, 2005
    #2
    1. Advertising

  3. Graham

    Graham Guest

    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]" <> wrote in message
    news:...
    > 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" <>
    > | 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$>
    > | 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
    > |
    >
     
    Graham, Nov 7, 2005
    #3
  4. Graham

    Scott Allen Guest

    Scott Allen, Nov 8, 2005
    #4
  5. Graham

    Greg Burns Guest

    Wow. Good find.

    "Scott Allen" <> wrote in message
    news:...
    > On Tue, 8 Nov 2005 10:08:52 +1300, "Graham"
    > <> 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/archive/2005/11/06/429723.aspx
    >
    > --
    > Scott
    > http://www.OdeToCode.com/blogs/scott/
    >
     
    Greg Burns, Nov 8, 2005
    #5
  6. 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 <>
    | Subject: Re: Publish Web site and the web.config
    | Date: Mon, 07 Nov 2005 20:54:42 -0500
    | Message-ID: <>
    | References: <uHo9h$>
    <>
    <>
    | 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"
    | <> 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/archive/2005/11/06/429723.aspx
    |
    | --
    | Scott
    | http://www.OdeToCode.com/blogs/scott/
    |
    |
     
    Steven Cheng[MSFT], Nov 8, 2005
    #6
  7. Graham

    Graham Guest

    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]" <> wrote in message
    news:...
    > 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 <>
    > | Subject: Re: Publish Web site and the web.config
    > | Date: Mon, 07 Nov 2005 20:54:42 -0500
    > | Message-ID: <>
    > | References: <uHo9h$>
    > <>
    > <>
    > | 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"
    > | <> 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/archive/2005/11/06/429723.aspx
    > |
    > | --
    > | Scott
    > | http://www.OdeToCode.com/blogs/scott/
    > |
    > |
    >
     
    Graham, Nov 8, 2005
    #7
  8. 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" <>
    | References: <uHo9h$>
    <>
    <>
    <>
    <>
    | 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: <#>
    | 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
    |
    |
    | "Steven Cheng[MSFT]" <> wrote in message
    | news:...
    | > 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 <>
    | > | Subject: Re: Publish Web site and the web.config
    | > | Date: Mon, 07 Nov 2005 20:54:42 -0500
    | > | Message-ID: <>
    | > | References: <uHo9h$>
    | > <>
    | > <>
    | > | 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"
    | > | <> 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/archive/2005/11/06/429723.aspx
    | > |
    | > | --
    | > | Scott
    | > | http://www.OdeToCode.com/blogs/scott/
    | > |
    | > |
    | >
    |
    |
    |
     
    Steven Cheng[MSFT], Nov 9, 2005
    #8
  9. Graham

    Greg Burns Guest

    Greg Burns, Nov 10, 2005
    #9
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. ShayHk
    Replies:
    3
    Views:
    394
    Eliyahu Goldin
    Dec 22, 2006
  2. Mark Rae
    Replies:
    0
    Views:
    480
    Mark Rae
    Jan 5, 2007
  3. Stan B
    Replies:
    3
    Views:
    560
    Stan B
    Apr 6, 2007
  4. CSharpner
    Replies:
    0
    Views:
    1,109
    CSharpner
    Apr 9, 2007
  5. Tim Royal
    Replies:
    0
    Views:
    734
    Tim Royal
    Aug 28, 2008
Loading...

Share This Page