Website Publishing does not include the *.ashx files

M

Max2006

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
 
G

Guest

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
 
S

Steven Cheng[MSFT]

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.
--------------------
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,969
Messages
2,570,161
Members
46,708
Latest member
SherleneF1

Latest Threads

Top