2

Looking for ideas. From within a web application (app #1), I need to call another web application (app #2), allow web app #2 to PRESENT FORMS TO THE USER, do some work, and then receive a result or return value into the original web app. The apps must be completely separated code bases. More than likely app #2 will need to be contained in a popup window but that is not entirely clear as of yet. There is a possibility that the single window may navigate to the second app. The apps are currently using ASP.NET and C#.

I originally thought of sending a "callback URL" to app #2, and allowing app #2 to post the result to app #1 through that URL, but then someone mentioned the need to do this as a modal window and NOT app #1 to navigate away from the calling page. On the other hand, if the receiving page was maintained on the back end, then it should always be possible to simply have the original app check for a session variable (or similar) since, as long as the browser for app #1 is not closed, the session content would still exist.

Thanks, in advance, for taking the time to respond.

Fred Lackey
  • 2,351
  • 21
  • 34

1 Answers1

1

If you want to communicate between two web applications, I would set up a Web Service interface in the second application. Then your first app can send "requests" to the Web Service that lives in the second app, and receive a response back.

MSDN has a lot of detailed information about this topic here: XML Web Services Using ASP.NET

The more specific places to get you started would be the guide to using Visual Studios web service creation wizard, and the examples of how to call a Web Service method.

This Stack Overflow answer has another way to call Web Service methods that might be more relevant to your use-case (calling via the URL).

Community
  • 1
  • 1
Josh Darnell
  • 11,304
  • 9
  • 38
  • 66
  • A web service would not work in this situation because both web apps have controls and require action on the part of the user. The best way to think of app #2 is that it contains resource forms that must be completed where the result is returned to app #1. – Fred Lackey Jul 24 '13 at 13:52
  • Ohhh, I'm with you now, @FredLackey. What if you did this: have a web service in app #1, with a method that receives the values from the form in app #2. Then, in your event handler for the submission of the form in app #2, make a request to the Web Service method in app #1. – Josh Darnell Jul 24 '13 at 14:00
  • Yeah, that's what I'm doing now. Just didn't know if there was some magic framework, or some handy technique, that would handle UI intensive web apps interweaving between each other WITHOUT making calls to the back end of each other... possibly intercepting posts to each subsequent page. – Fred Lackey Jul 24 '13 at 14:30
  • @FredLackey Gotcha. Well, I'm not familiar with anything like that. – Josh Darnell Jul 24 '13 at 15:08