Skip navigation.

TrackBacks WelcomeAll recent postsWriting Accessible Code In ASP.NET

Visual Studio.NET Fails To Copy ASHX Handlers

This is something I discovered today. After I uploaded changes with comment feeds and TrackBacks I noticed an HttpHandler implemented in an ASHX file was missing which is why I couldn't make heads and tails of why my handler was not accepting test TrackBacks.

Normally I choose "Copy Project..." from the "Projects" menu and pick "Only files needed to run this application". HttpHandlers in ASHX files are full-fledged citizens of ASP.NET and are well documented as such at MSDN. They even have a handler factory, System.Web.UI.SimpleHandlerFactory, assigned to them in machine.config. Why Visual Studio.NET 2003 ignores them beats me. Even XSLTs get copied. Weird.

Comments

Comment permalink 1 Randy Charles Morin |
Deployment using "Copy Project..." is not a good idea. I've encountered similar issues. Wizards are for mundane users, not programmers. Programmers should understand the details beneath the wizards they employ and test their assertions. MHO.
Comment permalink 2 Milan Negovan |
Well, I usually deploy minor changes by hand, but the latest update was quite big and I put my trust in the wizard. :|
Comment permalink 3 Conrad |
For copying a project quickly you really can't beat Copy Project (and yes I am a real programmer). For a solution to the files it leaves behind just set the Build Action property to Content. It will pick it up from then on.
Comment permalink 4 Milan Negovan |
Conrad, thank you for the tip.
Comment permalink 5 strider |
Thanks Conrad your tip has saved me. My project was ignoring XSD files manually added to my project.

Emails and Notifications

Would you like to be notified when somebody responds to this post?  Would you like to have these comments emailed to you?

TrackBacks

Sorry, TrackBacks are not allowed.

Submit your comment

Please enter only text since all HTML tags except hyperlinks will be stripped. Hyperlinks will become live links. Any comments with flaming or offensive language will be deleted. Be courteous to other posters. Thank you.

Your name (required):
Your email (optional):
Your site's URL (optional):
Enter this number
Type in the number above:
Comment (required):