Accessing ASP/.NET Application via Presentation Layer

C

Clark Simpson

Hi,

Apologies if this is such a simple query but if I have an ASP/.NET
Application which I normally access via www.foo.com/myapp on Machine A
can I access this application layer machine via a Presentation Layer
Machine B via www.mypresentationlayer.com/myapp? In a nutshell I want
users to access Machine B on the front end (web) but behind the scenes
the actual requests are routed to Machine A.

Anyone?

Thank
 
S

Scott M.

Sure, what you'd do is modify the application layer so that it is a web
service class, rather than a regular class and then you can call this web
service from whatever presentation layer you want.

In the project that contains the application layer, create a new ASP.NET Web
Service (.asmx) file. Create WebMethods in the web service class that will
act as proxies for each of the application layer's methods and recompile the
project.

Now, in your second machine's presentation layer project, make a web
reference to your first machine's web service and then you can make an
instance of the web service (via an automatic proxy) and call the methods
you need.

-Scott
 

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

Top