Watch, Follow, &
Connect with Us

Please visit our new home

Public Report
Report From: Delphi Prism/Other    [ Add a report in this area ]  
Report #:  72936   Status: Closed
Generic Handler produces source code that doesn't compile
Project:  Embarcadero Prism Build #:
Version:    1.0 Submitted By:   Bob Swart
Report Type:  Crash / Data loss / Total failure Date Reported:  4/13/2009 6:25:45 AM
Severity:    Infrequently encountered problem Last Updated: 3/20/2012 2:24:39 AM
Platform:    All platforms Internal Tracking #:   268977
Resolution: Fixed (Resolution Comments) Resolved in Build: : Prism 2010
Duplicate of:  None
Voting and Rating
Overall Rating: No Ratings Yet
0.00 out of 5
Total Votes: None
When adding a New Item to an ASP.NET project, and selecting Generic Handler, the generated code for the example Generic Handler does not compile.

The code define a method ProcessRequest in public class Handler1, but the implementation is given of method ProcessRequest, without the Handler1. prefix.
Steps to Reproduce:
1. Create a new ASP.NET project or web site and add a new Generic Handler
2. Try To Compile
Result: compiler error: duplicate source files!

Apart from node Handler1.ashx and the subnode Handler1.ashx.pas, there is another subling Handler1.ashx.pas added to the project tree.

We need to manually remove the subling Handler1.ashx.pas node from the project (be careful not to Delete the file, but only to Remove the reference).

However, even then we cannot compile, because the generated code doesn't compile.

The definition is as follows:

  Handler1 = public class(IHttpHandler)
    method ProcessRequest (context : HttpContext);

With the following implementation:

method ProcessRequest (context : HttpContext);

But that doesn't compile, and should be changed as follows:

method Handler1.ProcessRequest (context : HttpContext);

Bob Swart at 4/2/2010 5:03:17 AM -
This problem is fixed in Delphi Prism 2010, so this report can be closed now.

Tomohiro Takahashi at 4/2/2010 7:14:11 PM -
Thanks for the confirmation. I will check the internal status.

Server Response from: ETNACODE01