Click here to Skip to main content
15,882,329 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
Hi Friends,
I have created a Windows Application using Vb.Net code.Now I want that desktop app to send a String to the ASP.Net Application and Process the request and then it sent back to the desktop application. Is this possible that can we send the data from Widows to Web App (Provided Internet Connection is Present all the time ).

How can we achieve this? Can we do with a ASMX Service? Is this possible or is there any other way of doing?
Actual requirement is I will send a string to web app that will search the string in a web app and it will sends the data to desktop app.

Any Help, Please

1 solution

It has nothing to do with Windows application, or any other kind of desktop application — it does not matter. You can do it using the class System.Net.HttpWebRequest:[^].

Please see also my past answers:
How to get the data from another site[^],
get specific data from web page[^].


As the use of System.Net.HttpWebRequest is based on its base class System.Net.HttpWebRequest; and the run-time type is determined during run time, based on the URI scheme ([^]) through it factory method ([^]) Create, the code sample is available here:[^].

Share this answer
Ganesh KP 8-Oct-12 5:58am    
Thanks Sergey , Can we commit this with using ASMX Web Service like our Desktop app will send some data to the service and can receive the data from asmx service.
Sergey Alexandrovich Kryukov 8-Oct-12 13:45pm    
It does not matter. You can send HTTP request and try to get HTTP response with any type of application.
Ganesh KP 8-Oct-12 14:52pm    
Can you Please give me some example what I need exactly? Sergey
Sergey Alexandrovich Kryukov 8-Oct-12 16:04pm    
Sure, please see the updated answer, after [EDIT].
Espen Harlinn 8-Oct-12 18:04pm    

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900