views:

28

answers:

2

We have a Web Application (WebApplication A) which is in place and serving fine, we are working on another WebApplication which will use the Engine of Existing Web Application (WebApplication B) to some extent.

Problem: WebApplication A responds when a http request is made for a resource, like LatestPost.aspx, which passes it down to relevant class / Module like FrontManager.cs. I want to know how can we access that Module / class (FrontManager.cs) from WebApplication B, without requesting a Web Page ?

+1  A: 

Use an HttpHandler. You will need to create a class which implements IHttpHandler and register it in the <httphandlers> section of the web.config file. These are commonly accessed with a .ashx extension (LatestPost.ashx in your case).

Ray
A: 

Create a web service, using WCF, to expose the operations of FrontManager.cs.

However, you should try to separate the user-interface aspects of FrontManager.cs from the actual functionality. Expose the raw functionality, with no reference back to user-interface.

John Saunders