Passing object from one web App to another web App and back (webRequest maybe) can you help?

Hi

Guys not sure if the right place for this. I am STUCK!!!!

I need to pass data from one web application to another web Application and back

Before implementing in the real work that I am doing , i have build a quick demo

2 Web Application Projects (WebAppA and WebAppB)
01 Class Library
With 2 Classes
RequestClass (1 Property amountToPay=10)
ResultClass (1 Property bool IsSuccess)

WebAppA.MakePayment.aspx has method call Pay

ResultClass rslt=payMethod(requestclass)  // this should be a call to WebAppB

WebAppB should return a result back .How can I do it??????

 

I have found the following on the net.But I not sure how to adapt to my needs.

How do i pass the data?

How webAppB receives it and send the result back?

  FOUND ON THE NET  // Create a request for the URL.        
            WebRequest request = WebRequest.Create ("http://www.contoso.com/default.html");
            // If required by the server, set the credentials.
            request.Credentials = CredentialCache.DefaultCredentials;
            // Get the response.
            HttpWebResponse response = (HttpWebResponse)request.GetResponse ();
            // Display the status.
            Console.WriteLine (response.StatusDescription);
            // Get the stream containing content returned by the server.
            Stream dataStream = response.GetResponseStream ();
            // Open the stream using a StreamReader for easy access.
            StreamReader reader = new StreamReader (dataStream);
            // Read the content.
            string responseFromServer = reader.ReadToEnd ();
            // Display the content.
            Console.WriteLine (responseFromServer);
            // Cleanup the streams and the response.
            reader.Close ();
            dataStream.Close ();
            response.Close ();

 

Can you help ? any suggestions?

 Thanks a lot


Thanks a lot
0
brix
4/3/2009 4:57:23 PM
asp.net.getting-started 91979 articles. 4 followers. Follow

3 Replies
833 Views

Similar Articles

[PageSpeed] 16

Why do you make use of web services? You can then have WebApplication and a WebService

WebApplication can talk to the Webservice and get results by simply calling a function onte webservice,.

 in the WebApplication.MakePayment.aspx

Dim Result as boolean

Result = Webservice.payMethod(AmountToPay)

 If Result = false then

 'Sorry. payment failed

Else

'Success

End if

 

 


Brave Trips http://www.bravetrips.com
Singapore's Newest Auction Site http://www.bubble.sg
0
stupid2533
4/3/2009 7:44:09 PM

thanks for your reply.

You might well be right and I might use a web service ,but i didnt know or see the use of it ,but before let me explain this a bit further.

Scenario

Ability to support many payment Systems some like PayPal  etc and some that go via an Authorization provider but we provide the user interface.

These are built using a plugin architecture,i didnt mention this before as i didnt want to make things confusing.

Suppose we have 10 plugins= 10 payment systems ,

at the moment the user presses OK and wants to check out he will be presented with a webpage with 10 buttons if you like

Pay by Credit card, By Voucher ,Pay by Account ,Pay by PayPal etc......

when pressing the button I know which plugin it is and I have to redirect to a webpage that is customMade for that plugin.That page might or not be available.

I thought it would be a good idea to have a web App  eg ("MyCompany.ABCPaymentSystem.Web) and in it you will be presented with a page with a credit Card Control on it

Pay and be redirected back. 

Any suggestions or other way to achieve the same?

In the meantime can anybody suggest or provide an example on how to communicate between 2 web application?

Thanks again

 


Thanks a lot
0
brix
4/3/2009 9:33:49 PM

Guys

I thought i would simplify the question as i need help and not sure whether I have complicated things.

2 website and I need to pass data from one to the other.

If you use paypal.

  1. you have your website
  2. you pass data to paypal
  3. Paypal pops ups a credit card form
  4. you pay and then it redirect to your web site again

I need to do the same

a webSite calls another website and pass data from and to

 

Any suggestions


Thanks a lot
0
brix
4/4/2009 5:20:16 AM
Reply:

Similar Artilces:

How to use a web user control from one web app in another web app?
I have a production web app project (at work) that has custom web user controls in it.I have another web app project for experimenting and I want to use some web controls from the production web app. The big trick is that I need to load the controls dynamically.LoadControl() doesn't seem to work - it complains about loading controls from a different application. I also tried adding a project reference to the production web app and using "UC1 newUC = new UC1();" and then "this.Controls.Add(newUC);", but the controls (like TextBoxes) on the web user control don't seem to exist on the new UC1s....

How do I merge web services' app.config with web app's web.config? Help!!
I have a web application project that uses a separate class library containing web service references (service layer). I want to be able to configure the web reference URLs dynamically and I know you can set this up by setting the URL behavior to  'Dynamic', etc, etc. The problem is VS2005 puts the URLs in the project's app.config file. When the class library becomes a DLL component, I have no way of accessing the app.config file.Is there a way to make the web reference project to look for the URLs in the web.config instead of its app.config? Or is there a way to merge this app.config w...

convert java web app 2 .NET web app
Hi, i am able to convert java console app to .NET console app.but i am unable to convert java web based application to .NET web based application. can u give me some idea as to how to convert that. Thanks in advance,nizam. I believe the technical phrase is.. rtfm?  lol.  you're going to have to do it the hard way.  JSP operates on a different theory of web development than asp.net/asp.net 2.0Kay LeeMySpace.com - http://www.myspace.com/kragieInfrastructure GroupMySpace.com- Code to live, but Live to code. Try these two links for sample code and free book from Microsoft, ...

Best INTRANET option; one web app or mulitple web apps
My company has several small client/server apps and they want then move to asp.net.  Some of these apps may call each other pages and share some pages for searching data.  The main question is: Best option or practice--- Do we create multiple virtual directories or just one virtual directory and split out the apps in their own separate folders?  If we use one large app, are you able to compile just a part that was changed or do you have to bring down the entire site?  Will sub directories work the best? Any opinions or directions to a white paper would be greatly apprec...

Can WSE 3.0 Web Service be exposed to the web and can it be consumed by non .Net apps?
If I write a WSE 3.0 web service in .Net 2.0, can I expose it to the web like an IIS XML web service.?Also, can this web service be consumed by non .Net apps or .Net 1.1. apps?sun21170 Yes, simply enable your web service project for WSE 3, and this will alter web.config to support WSE 3 web services in IIS.The web service can be consumed by non .Net clients, however .Net 1.1 clients may struggle unless you add WSE support ans generate specific WSE proxies at the client end.  JamesMy Blog: http://www.wintersfamily.plus.com/blogs/JamesWinters...

Web Apps vs. Web Sites (was: Universal Navigation for Web Apps)
On Wed, Mar 14, 2012 at 12:58 PM, Justin D'Arcangelo <justindarc@gmail.com>wrote: > there needs to be a differentiation between > web sites and web *apps*. > While we might be able to describe characteristics that conceptually separate a "web site" from a "web app", I think in reality they will exist on a continuum. Chris Jones is right that we need more data from actual app developers on this, but I can provide some anecdotal evidence by telling the story of a web app I worked on which got listed in a web app store. I worked on a web-b...

Can we include AJAX controls in a regular web app? or do we need to create AJAX WEB APP?
I wanted to know that to use the ajax controls that comes with asp.net 2.0, do we need to build an ajax web site or we will need to develop a regular web application and can use the ajax. As when we open visual studio 2005, it asks us that do you want to create, 1) asp.net web application OR 2) AJAX ENABLED WEB APPLICATION?     Hi! If you use AJAX ENABLED WEB APPLICATION you will have automatically: 1 - reference to System.Web.Extensions assembly (base assembly for ajax) 2 - all necessary configurations on web config 3 - a page with a script manager inside (script ...

Regular web app or Mobile web app.
Im targeting PocketPCs only (w/PocketIE). I changed the web.config to cookieless="true" and placed buttons with events. Im getting the postbacks and everything looks good so far... Can we just use this intead of the mobile web app project? Whats the difference? Duke You can use either a regular Web app or a mobile app, presuming you are targeting ONLY Pocket IE. Pocket IE accepts HTML.Starting with ASP.NET 2.0? Look at:Programming Microsoft Web Forms My Blog...

Need helps on deploying a web services or web app to an existing web server
Hi people, I am going to deploy a new web service and a new web application to an existing web server, which is also hosting several other web apps. I am told that the IIS CAN NOT BE STOPPED, which means I can not build a MSIs to install them. Looks like only two options I can use: 1) XCOPY 2) Publish the web service or web app through the VS 2008. Can anyone please give me some advices what is the best way to have a deployment without any interruptings and less problems. Thank you.    use FTP to copy files from your system to web hoster system. you ca...

Web App unable to get same data that a sibling WinForm App gets
 Working in VS08/3.5 on project based very closely off EntLib's DataAccess QuickStart.The sln has 3 projects -   1. VB Class Library (CMS) to provide db access to the other UI projects   2. Winform (WinFormUI) - references CMS to show output to conventional WinForm (bascially I just broke the QuickStart's Winform to a seperate project and then referenced CMS)   3. WebServices app to provide SOAP output of the same db WinForm works correctly so at least I've gotten that far.The WebService app is calling the correct function in CommonData breakpoi...

Determining if an app is a web app or a windows app
Hi all,  I'm writing a generic utilites class and one of the methods needs to get the physical path of the application. I know Server.MapPath("~") gets the server path of the app for windows and also that Application.ExecutablePath gets the path for windows app. Now how would i determine which app is a windows app or a web app?   Thanks in advance. add a reference to system.web and then do the following  if (System.Web.HttpContext.Current == null)            {       &...

Web.config from another web app on the same webserver
Can one application read connection strings from the web.config of another application? I would guess not, since this is a security issue, but I am not sure. Is there a way?Thanks!When you ask a question, remember to click "mark as answered" when you get a reply which answers your question; this ensures the right forum member gets credit below for being helpful (and makes search more relevant too)....

Pass value from web app to win app
I'm looking to pass an ID value from a web page click event to a Windows forms application.  I've seen examples for going from forms to the web, but nothing going from web to forms.  Any suggestions??Regradscheers...

Object References in web service and web app
I have a web service which is exposed to a web app.The service accepts an object of type Billing.Check as a parameter.The web app creates an instance of type Billing.Check. The problem is I get the following error: cannot convert from 'ClassLibrary1.Class1' to 'WebApplication1.myWebRef.Class1'  I'm confused as both the service and application are referencing the same assembly for the type Billing.Check. Any ideas?If everything happens for a reason what is the reason for this error? Normally, the service would have the definitions for Billing.Check, when you cre...

Web resources about - Passing object from one web App to another web App and back (webRequest maybe) can you help? - asp.net.getting-started

Resources last updated: 11/29/2015 4:46:26 PM