By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
458,081 Members | 1,348 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 458,081 IT Pros & Developers. It's quick & easy.

Website Publishing does not include the *.ashx files

P: n/a
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


Oct 1 '07 #1
Share this Question
Share on Google+
2 Replies


P: n/a
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


Oct 1 '07 #2

P: n/a
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/subscripti...ult.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/subscripti...t/default.aspx.

==================================================
This posting is provided "AS IS" with no warranties, and confers no rights.
--------------------
>From: =?Utf-8?B?TWFuaXNo?= <Ma****@discussions.microsoft.com>
References: <ej**************@TK2MSFTNGP02.phx.gbl>
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


Oct 2 '07 #3

This discussion thread is closed

Replies have been disabled for this discussion.