in

Dot Net Mafia

Group site for developer blogs dealing with (usually) .NET, SharePoint, Office 365, Mobile Development, and other Microsoft products, as well as some discussion of general programming related concepts.

This Blog

Syndication

Archives

Corey Roth [MVP]

A SharePoint MVP bringing you the latest time saving tips for SharePoint 2013, Office 365 / SharePoint Online and Visual Studio 2013.

Compilation Error with Generic Handler in Visual Studio 2008

Anyone else out there notice that if you add an generic handler to your project that it won’t compile?  It appears to be an issue with the template included in Visual Studio and it may have been resolved in a service pack but currently I don’t think so.  The file type I am describing is the .ashx generic handler and not the ASP.NET Handler as you can see below.

GenericHandler

After it creates the file you might immediately notice there are issues.  If you go to compile it, you’ll get errors like seen below.

GenericHandlerError

Luckily, resolving the error is quite easy.  You just need to add System.Web.Services to your using block.  Once you do that, you can compile successfully and begin building your handler.  I just thought I would point this out since I have seen this on multiple systems now.

Comments

 

Twitted by coreyroth said:

Pingback from  Twitted by coreyroth

July 27, 2009 6:00 PM

Leave a Comment

(required)  
(optional)
(required)  
Add

About CoreyRoth

Corey Roth is an independent SharePoint consultant specializing in ECM, Apps, and Search.
2015 dotnetmafia.
Powered by Community Server (Non-Commercial Edition), by Telligent Systems