Website Publishing does not include the *.ashx files

Discussion in 'ASP .Net' started by Max2006, Oct 1, 2007.

  1. Max2006

    Max2006 Guest

    Hi,



    After I right-click on my web application project file and choose
    "Publish ." and do the publishing, the result publishable files does not
    include the *.ashx files. Is it by design? How can I add *.ashx files to
    the publish target?



    Thanks,

    Max
    Max2006, Oct 1, 2007
    #1
    1. Advertising

  2. Hi Max,

    Please note that .ashx files type are not compiled by the ASP.NET Compiler
    when you publish your website. They are moved to the output directories as is
    and not compiled. If you wish to have the handler code compiled, place the
    code into source code files in the App_Code directory.

    Could you also check if the option "Allow this precompiled site to be
    updatable" is checked or not when publishing your website. If you choose the
    option to allow the precompiled site to be updated, any code-behind classes
    for your .aspx, .asmx, and .ashx files are compiled into assemblies. However,
    the .aspx, .asmx, and .ashx files themselves are copied as-is to the target
    folder so that you can make changes to their layout after deploying the site.

    Regards,
    Manish




    "Max2006" wrote:

    > Hi,
    >
    >
    >
    > After I right-click on my web application project file and choose
    > "Publish ." and do the publishing, the result publishable files does not
    > include the *.ashx files. Is it by design? How can I add *.ashx files to
    > the publish target?
    >
    >
    >
    > Thanks,
    >
    > Max
    >
    >
    >
    >
    >
    =?Utf-8?B?TWFuaXNo?=, Oct 1, 2007
    #2
    1. Advertising

  3. Hi Manish,

    Thanks for the tips. I think Max is using the "web Application Project"
    which should allow codebehind to reside with aspx/ashx template and will be
    precompiled into a main assembly in "bin" folder.

    Hi Max,

    You're using the "Web Application Project" right? If so, I've try
    performing some test on my side as below:

    **use an ASP.NET 2.0 web application project which contains some aspx
    pages and ashx simple handler

    **publish it to a local disk folder through "right click project node and
    select "publish" menu item ....". Also, I choose "only files needed to run
    this application" when publishing it.

    After that I saw the ashx handler file be correctly copied to the target
    publish folder. Is this the behavior you expect? I think ashx files should
    be certainly considered as necessary stuffs for publishing. You can also
    try a simpler project to verify this.

    Please feel free to post here if you have any other findings or anything
    we've missed here.

    Sincerely,

    Steven Cheng

    Microsoft MSDN Online Support Lead



    ==================================================

    Get notification to my posts through email? Please refer to
    http://msdn.microsoft.com/subscriptions/managednewsgroups/default.aspx#notif
    ications.



    Note: The MSDN Managed Newsgroup support offering is for non-urgent issues
    where an initial response from the community or a Microsoft Support
    Engineer within 1 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 or complex
    project analysis and dump analysis issues. 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/subscriptions/support/default.aspx.

    ==================================================


    This posting is provided "AS IS" with no warranties, and confers no rights.
    --------------------
    >From: =?Utf-8?B?TWFuaXNo?= <>
    >References: <>
    >Subject: RE: Website Publishing does not include the *.ashx files
    >Date: Mon, 1 Oct 2007 12:56:03 -0700
    >
    >Hi Max,
    >
    >Please note that .ashx files type are not compiled by the ASP.NET Compiler
    >when you publish your website. They are moved to the output directories as

    is
    >and not compiled. If you wish to have the handler code compiled, place the
    >code into source code files in the App_Code directory.
    >
    >Could you also check if the option "Allow this precompiled site to be
    >updatable" is checked or not when publishing your website. If you choose

    the
    >option to allow the precompiled site to be updated, any code-behind

    classes
    >for your .aspx, .asmx, and .ashx files are compiled into assemblies.

    However,
    >the .aspx, .asmx, and .ashx files themselves are copied as-is to the

    target
    >folder so that you can make changes to their layout after deploying the

    site.
    >
    >Regards,
    >Manish
    >
    >
    >
    >
    >"Max2006" wrote:
    >
    >> Hi,
    >>
    >>
    >>
    >> After I right-click on my web application project file and choose
    >> "Publish ." and do the publishing, the result publishable files does

    not
    >> include the *.ashx files. Is it by design? How can I add *.ashx files

    to
    >> the publish target?
    >>
    >>
    >>
    >> Thanks,
    >>
    >> Max
    >>
    >>
    >>
    >>
    >>

    >
    Steven Cheng[MSFT], Oct 2, 2007
    #3
    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. =?Utf-8?B?TGFrc2htaSBOYXJheWFuYW4uUg==?=

    Question Title: How to work with .ASHX files in vs.net 2005 beta?

    =?Utf-8?B?TGFrc2htaSBOYXJheWFuYW4uUg==?=, Sep 22, 2004, in forum: ASP .Net
    Replies:
    0
    Views:
    327
    =?Utf-8?B?TGFrc2htaSBOYXJheWFuYW4uUg==?=
    Sep 22, 2004
  2. Replies:
    0
    Views:
    729
  3. Replies:
    0
    Views:
    378
  4. Andreas Bogenberger
    Replies:
    3
    Views:
    886
    Andreas Bogenberger
    Feb 22, 2008
  5. Cal Who
    Replies:
    0
    Views:
    304
    Cal Who
    Apr 11, 2010
Loading...

Share This Page