Get Help:Ask a Question in our Forums|Report a Bug|More Help Resources
Last post Jan 24, 2013 03:16 PM by GaurangNaik
Jan 16, 2013 06:07 PM|LINK
I have a scenario where I am working on integrating two web applications. I am not sure how do I approach it. Here is the scenario:
1) application A wants data from applicaton B by using POST parameters
2) whenever app B receives a request it should send notification to app A saying I received the request successfully.
3) After processing the request app B should send another notification saying. request performed successfully.
4) While receiving these notifications app A should insert these notifications for records. while sending these notifications app B should insert these for records.
This is it..
Now the questions:
1) which POST parameters shall I use to hit app B?
2) How do I send and receive notifications from app B to app A? I mean in which format? XML or txt? I have no idea how should I trigger these notifications from app B? how should I receive these notifications?
Would you please give me some idea?
Jan 16, 2013 06:36 PM|LINK
1) just instantiate an HTTP Post to the site and pass whatever parameters its looking for. This is pretty standard.
2) you don't. There is no open connection between the two. You would have to POST back to an endpoint on site1 from site2 (in reverse of what you did the first time) and site1 would have to store that input and check for it on the PAGE_LOAD events (or similar).
The basic thing is that you are trying to treat 2 Web applicaitons as if they are 2 Windows applications where you have a handle/endpoint that can be "listening" for this stuff, but with Web applications it's not there as they live on a Server but input/output
on a Client machine.
Jan 18, 2013 01:40 PM|LINK
Thanks for the reply Curt. But how Do I achieve notification exchange stuff? it has tto be implemented.
Jan 18, 2013 02:30 PM|LINK
Site1 has a service on it that Site2 calls when its completed.
Site1 has a db table to store the call from Site2.
Site1 will check for this entry everytime a page loads, you may want to have a clientside timer running to do a service call to check for the entry every minute (or whatever time you want).
Jan 18, 2013 02:48 PM|LINK
Is it a good idea to implement a windows service to keep an eye on that table. If the count of the table row increases then based on the identity value, i will have that row sent over http to the site 2. but how shall communicate to windows service from
my asp.net page? and whenever I send value to site 2, i need to be sure that site 2 receives it and inserts it in its db too.
Jan 18, 2013 03:41 PM|LINK
Your service call to Site2 needs to do a RETURN, thats how you know it passed.
If you want to use a Window Service for monitoring, sure... the big thing is that the Monitor needs to write the response to somewhere where Site1 can read it whenever a page loads.
Jan 18, 2013 05:15 PM|LINK
I have a scenario where I am working on integrating two web applications.
Jan 24, 2013 03:16 PM|LINK
what is the type of network between these two applications? Interanet/internet or Local machine.
Are both of these application are written in .net or different technology ?
2) both are developed in .NET platform.