Hi everybody,
Need to call some webpage from c# window app. and want to get the return value from that web function that i called.Is it possible.If yes please help me!!
Regards
Amit
Loading
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
Niradhip ChakrabortyPosted May 8, 2009, 8:03 AM
Well it is bit difficult to send response from windows to web and again from web to window. What you can do is create a unique key while creating the exe for windows application and ask the client to use it for first time installation. So this way you can secure only authenticate user can use your application.
amit hasijaPosted May 8, 2009, 7:48 AM
Amit
Niradhip ChakrabortyPosted May 8, 2009, 7:41 AM
Amit that is not a good idea I believe. It’s also risky. Sending username and password in query string is not acceptable. Now the most wired part is you are validating the username and password in web application and based on result u want to proceed in windows application. This is no way acceptable. Say one case the server for web application is down and you want to validate some user in windows application then you need to wait for hours to accomplish the goal. What you can do to validate the user in your windows form only. To do that you should have same database connected for both windows and web application or you should have at least one common table for username and password and make sure if any username and Password create by new user or update it, it should update both the places but the best way to get rid of it to have a single database for both the application.
amit hasijaPosted May 8, 2009, 6:11 AM
I am sending username and Password in the url and want that to be verified in the function and give me true or false depending upon user verification.Than according to returned value i want to process my window application.
Hoping i am able to explain you whole scenario.
Thanks
Niradhip ChakrabortyPosted May 8, 2009, 5:37 AM
amit hasijaPosted May 8, 2009, 5:20 AM
I wrote this in page load of app.
System.Diagnostics.Process.Start("http://192.168.0.143:8888/starcoach/books/verify/str");
when i run the app it opens the web page in new window i do want to open that in window and also want to get the return value from the called function like true or false.
How do i get the return value from web function to my window application.
Please help!!
Regards
Amit
Niradhip ChakrabortyPosted May 8, 2009, 4:58 AM
Ya you can call it in button click of windows application
System.Diagnostics.Process.Start(
www.yahoo.com);if you are passing some query string then validate it in web page.
amit hasijaPosted May 8, 2009, 4:49 AM
i want to call a some function from my window application do not how, some url like
http://www.example.com/test?uername= amit
get the parameters at web function from url some processing like validation and want to return true from where i called this function.
Hope you got now and thanks for any kind of help.
Regards
Amit
Niradhip ChakrabortyPosted May 8, 2009, 4:48 AM
Try This:
System.Diagnostics.Process.Start(
www.yahoo.com);Kirtan PatelPosted May 8, 2009, 3:56 AM