Config Transforms with Web Deployment Projects

Discussion in 'ASP .Net' started by Chuck, Jun 25, 2010.

  1. Chuck

    Chuck Guest

    Can you use Config Transforms with Web Deployment Projects.

    I couldn't get it to work in VS2010. Nothing happened. Other than the
    transform files got copied over.

    I turned off the web.config files section replacement option in the web
    deployment project.
    Chuck, Jun 25, 2010
    #1
    1. Advertising

  2. Hi Chuck,

    Please check if you are using correct config file (web.debug.config for
    DEBUG web.release.config for RELEASE)

    Here are my test steps:
    1. Create a C# web application in VS 2010
    2. Add follow lines in web.config:
    <customErrors mode="RemoteOnly" defaultRedirect="GenericErrorPage.htm">
    <error statusCode="403" redirect="NoAccess.htm" />
    <error statusCode="404" redirect="FileNotFound.htm" />
    </customErrors>
    3. Add follow lines in web.debug.config:
    <customErrors defaultRedirect="GenericError.htm"
    mode="RemoteOnly" xdt:Transform="Replace">
    <error statusCode="500" redirect="InternalError.htm"/>
    </customErrors>
    4. Save all files
    5. Create the deployment package
    6. The customerror element is changed in
    \obj\Debug\TransformWebConfig\transformed
    --
    Sincerely,
    Zhi-Qiang Ni
    Microsoft Online Support
    ==================================================
    Get notification to my posts through email? Please refer to
    http://msdn.microsoft.com/en-us/subscriptions/aa948868.aspx#notifications.

    MSDN Managed Newsgroup support offering is for non-urgent issues where an
    initial response from the community or a Microsoft Support Engineer within
    2 business day is acceptable. Please note that each follow up response may
    take approximately 2 business days as the support professional working with
    you may need further investigation to reach the most efficient resolution.
    The offering is not appropriate for situations that require urgent,
    real-time or phone-based interactions. Issues of this nature are best
    handled working with a dedicated Microsoft Support Engineer by contacting
    Microsoft Customer Support Services (CSS) at
    http://msdn.microsoft.com/en-us/subscriptions/aa948874.aspx
    ==================================================
    Zhi-Qiang Ni[MSFT], Jun 29, 2010
    #2
    1. Advertising

  3. Chuck

    Chuck Guest

    Did you create a deployment or a Web Deployment Project.
    I was using a web deployment project.

    "Zhi-Qiang Ni[MSFT]" wrote:

    > Hi Chuck,
    >
    > Please check if you are using correct config file (web.debug.config for
    > DEBUG web.release.config for RELEASE)
    >
    > Here are my test steps:
    > 1. Create a C# web application in VS 2010
    > 2. Add follow lines in web.config:
    > <customErrors mode="RemoteOnly" defaultRedirect="GenericErrorPage.htm">
    > <error statusCode="403" redirect="NoAccess.htm" />
    > <error statusCode="404" redirect="FileNotFound.htm" />
    > </customErrors>
    > 3. Add follow lines in web.debug.config:
    > <customErrors defaultRedirect="GenericError.htm"
    > mode="RemoteOnly" xdt:Transform="Replace">
    > <error statusCode="500" redirect="InternalError.htm"/>
    > </customErrors>
    > 4. Save all files
    > 5. Create the deployment package
    > 6. The customerror element is changed in
    > \obj\Debug\TransformWebConfig\transformed
    > --
    > Sincerely,
    > Zhi-Qiang Ni
    > Microsoft Online Support
    > ==================================================
    > Get notification to my posts through email? Please refer to
    > http://msdn.microsoft.com/en-us/subscriptions/aa948868.aspx#notifications.
    >
    > MSDN Managed Newsgroup support offering is for non-urgent issues where an
    > initial response from the community or a Microsoft Support Engineer within
    > 2 business day is acceptable. Please note that each follow up response may
    > take approximately 2 business days as the support professional working with
    > you may need further investigation to reach the most efficient resolution.
    > The offering is not appropriate for situations that require urgent,
    > real-time or phone-based interactions. Issues of this nature are best
    > handled working with a dedicated Microsoft Support Engineer by contacting
    > Microsoft Customer Support Services (CSS) at
    > http://msdn.microsoft.com/en-us/subscriptions/aa948874.aspx
    > ==================================================
    >
    > .
    >
    Chuck, Jun 29, 2010
    #3
  4. Chuck

    Steven Cheng Guest

    Hi Chuck,

    Regarding on the problem scenario, I have performed some local
    tests(through WebDeployment project in Visual Studio 2010). Yes, I did
    repro the same behavior you mentioned, the Visual Studio 2010 web
    deployment project works the same as the VS 2008 one. The configuration
    Transforms(from the "Build Deployment Package" command) is not available in
    the web deployment project.
    This seems a by design limitation of the web deployment project and so far
    the workaround I've tried is we first generate the transformed web.config
    file(either based on debug or release web.config files) in the web
    application or web site project (before compiling them using web deployment
    project. And in the web deployment project, we still use the web.config
    standard file.

    Also, as for this limitation, I would recommend you post it to our feedback
    center for vs 2010 and .NET framework 4 so that the product team can get
    informed on this:

    Connect site for Visual Studio 2010 and .NET Framework 4
    https://connect.microsoft.com/VisualStudio?wa=wsignin1.0

    Sincerely,

    Steven Cheng

    Microsoft MSDN Online Support Lead


    --------------------
    >From: =?Utf-8?B?Q2h1Y2s=?= <>
    >References: <>

    <>
    >Subject: RE: Config Transforms with Web Deployment Projects
    >Date: Tue, 29 Jun 2010 15:15:38 -0700


    >
    >Did you create a deployment or a Web Deployment Project.
    >I was using a web deployment project.
    >
    >"Zhi-Qiang Ni[MSFT]" wrote:
    >
    >> Hi Chuck,
    >>
    >> Please check if you are using correct config file (web.debug.config for
    >> DEBUG web.release.config for RELEASE)
    >>
    >> Here are my test steps:
    >> 1. Create a C# web application in VS 2010
    >> 2. Add follow lines in web.config:
    >> <customErrors mode="RemoteOnly" defaultRedirect="GenericErrorPage.htm">
    >> <error statusCode="403" redirect="NoAccess.htm" />
    >> <error statusCode="404" redirect="FileNotFound.htm" />
    >> </customErrors>
    >> 3. Add follow lines in web.debug.config:
    >> <customErrors defaultRedirect="GenericError.htm"
    >> mode="RemoteOnly" xdt:Transform="Replace">
    >> <error statusCode="500" redirect="InternalError.htm"/>
    >> </customErrors>
    >> 4. Save all files
    >> 5. Create the deployment package
    >> 6. The customerror element is changed in
    >> \obj\Debug\TransformWebConfig\transformed
    >> --
    >> Sincerely,
    >> Zhi-Qiang Ni
    >> Microsoft Online Support
    >> ==================================================
    >> Get notification to my posts through email? Please refer to
    >>

    http://msdn.microsoft.com/en-us/subscriptions/aa948868.aspx#notifications.
    >>
    >> MSDN Managed Newsgroup support offering is for non-urgent issues where

    an
    >> initial response from the community or a Microsoft Support Engineer

    within
    >> 2 business day is acceptable. Please note that each follow up response

    may
    >> take approximately 2 business days as the support professional working

    with
    >> you may need further investigation to reach the most efficient

    resolution.
    >> The offering is not appropriate for situations that require urgent,
    >> real-time or phone-based interactions. Issues of this nature are best
    >> handled working with a dedicated Microsoft Support Engineer by

    contacting
    >> Microsoft Customer Support Services (CSS) at
    >> http://msdn.microsoft.com/en-us/subscriptions/aa948874.aspx
    >> ==================================================
    >>
    >> .
    >>

    >
    Steven Cheng, Jul 12, 2010
    #4
  5. Chuck

    Chuck Guest

    Config Transforms with Web Deployment Projects in ASP.net

    Did you get a chance to speak with the DevDiv (Ming Chen) about this issue?
    Chuck, Jul 12, 2010
    #5
  6. Chuck

    Steven Cheng Guest

    RE: Config Transforms with Web Deployment Projects in ASP.net

    Thanks for reply Chuck,

    Though we will have some communication channels with the dev product team,
    but there is no direct contact on specific dev engineers and even DEVDIV
    group has many teams focus on different products. So far for internal
    communication we will periodically forward some hot/frequestly asked issues
    to the product team and we can help add this issue into the list also. And
    for public, the Connect Feedback site is the recommended channel. BTW, have
    you ever worked with some certain engineers in the DevDiv group?

    Sincerely,

    Steven Cheng

    Microsoft MSDN Online Support Lead

    --------------------
    >From: =?Utf-8?B?Q2h1Y2s=?= <>
    >References: <>

    <>
    <>
    <>
    >Subject: Config Transforms with Web Deployment Projects in ASP.net
    >Date: Mon, 12 Jul 2010 15:24:02 -0700


    >
    >Did you get a chance to speak with the DevDiv (Ming Chen) about this

    issue?
    >
    Steven Cheng, Jul 13, 2010
    #6
  7. Chuck

    Chuck Guest

    Config Transforms with Web Deployment Projects in ASP.net

    > BTW, have
    you ever worked with some certain engineers in the DevDiv group?

    Periodically these days. Did frequently when asp.net 1.0 was in pre-beta.
    Chuck, Jul 13, 2010
    #7
  8. Chuck

    Steven Cheng Guest

    RE: Config Transforms with Web Deployment Projects in ASP.net

    That's cool! Sometimes it does be much more effecient if you have direct
    contact to a specific dev engineer especially when the engineer is just the
    owner of the certain product/feature you're working at.

    Sincerely,

    Steven Cheng

    --------------------
    >From: =?Utf-8?B?Q2h1Y2s=?= <>
    >References: <>

    <>
    <>
    <>
    <>
    <>
    >Subject: Config Transforms with Web Deployment Projects in ASP.net
    >Date: Tue, 13 Jul 2010 08:30:05 -0700


    >
    >> BTW, have

    >you ever worked with some certain engineers in the DevDiv group?
    >
    >Periodically these days. Did frequently when asp.net 1.0 was in pre-beta.
    >
    Steven Cheng, Jul 14, 2010
    #8
    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. Random

    xslt, multiple transforms

    Random, Feb 28, 2005, in forum: ASP .Net
    Replies:
    3
    Views:
    1,478
    Wilco Bauwer
    Feb 28, 2005
  2. Ian Stanley

    Help with transforms

    Ian Stanley, Jul 30, 2003, in forum: Java
    Replies:
    3
    Views:
    502
    Ian Stanley
    Jul 31, 2003
  3. Replies:
    0
    Views:
    412
  4. Brian McCullough

    Web Deployment & Web Application Projects in SP1?

    Brian McCullough, Feb 5, 2007, in forum: ASP .Net
    Replies:
    3
    Views:
    414
    Mark Rae
    Feb 6, 2007
  5. CSharpner
    Replies:
    0
    Views:
    1,010
    CSharpner
    Apr 9, 2007
Loading...

Share This Page