tags:

views:

35

answers:

3

In my mvc application in need to submit the form from one application to another application.

Is this possible?

A: 

Don't think so; because when you are doing a POST, you are counting on the HttpContext.POST to transfer the information.

But this HttpContext.POST is per web application, so there is no way to do a post across different web app.

Ngu Soon Hui
`HttpWebRequest` class can be used from ASP.NET app to make outgoing requests to other servers.
Franci Penov
+1  A: 

It is better you create web/WCF service in another app , so you can call it from your current website

Anton Setiawan
that works only if he controls both applications
Franci Penov
+1  A: 

Depends where you want to do the POST from - client side of your web app or the server side?

  • if you want to initiate the POST from client side, there's nothing inherently differently from creating a form that posts to your own server. Just point the URL the form submits the POST request to be on the server for the second app.

  • if you want to initiate the POST from the server side of your application, while you are still processing the response of a request to your app, you can use the HttpWebRequest class. Here's some example code to get you started; you can find more articles and samples by searching the web for httpwebrequest asp.net

Franci Penov