views:

63

answers:

3

Hi All

I am trying to implement a feature. But I've never had anything to do with "Web Services" before, other than using them.

I have a desktop application, and I want that application to be able to sort of "post" some information (i.e. email address, username, user-selected options (just plain text) etc) to an application or "web service" on my ASP.NET web server.

Can somebody please guide me in the right direction? How would I accomplish this?

Thank you :)

Jason

+1  A: 

Assuming that you have Visual Studio, it is pretty easy: go to make a new project, under C#\Web, there is a project type of web service. Make that and you are immediately having a sample web service (ASMX). You can start from there.

TimeSpace Traveller
Awesome, thank you for this. I'm about to try it now; I hope that option's available for Exprses editions
lucifer
It should, asmx is a file, and it compiles to a .NET supported facility. Express shouldn't limit that.
drachenstern
Nope, option's not there in Visual Studio Express Edition :(
lucifer
+1 anyway. This'll come in handy when/if I ever decide to buy Visual Studio
lucifer
Are you using Visual Studio Web Developer Express? And which version are you using? 2008 or 2010?
TimeSpace Traveller
Oohhhhhh! I'm so silly. I was opening Visual Studio C# Express lol. Just a habit I guess :P I have both versions of Web Dev (08 and 10)
lucifer
when you start your new ASMX service, there is a default implementation of "Hello World". Just run the project and browse to your service to see a working example.
Zachary
OK, so I got the wrong impression too. lol I forgot that Express is not integrated solutions; in this case, you should be able to find it under the Web Dev. If not, I would call it strange.
TimeSpace Traveller
Nah, I think it is different in Vis. Stdo. Express lol, It just comes up with some weird page when I hit the debug button. What i'm trying to accomplish is just have some kind of application sitting on my asp.net server that just accepts and stores plain text data as it arrives without any webpages etc. Oh but maybe this is the right way i'll keep checkin it out and see what I can conjure up lol
lucifer
Yes, that weird page is the parameter input mock page. The basic of Web Service is using XML to transmit method call, so the weird mock page would accept your parameters, and forms the necessary XML to transmit to your web method. It's the correct behavior. Try more. :D
TimeSpace Traveller
Thanks heaps TimeSpace! :D Hey do you wanna add me to msn lol?
lucifer
I would love to~ What's your MSN ID?
TimeSpace Traveller
yay :D it is: [email protected]
lucifer
+3  A: 

I would skip the classic web-service and start learning WCF.

http://blogs.msdn.com/trobbins/archive/2006/11/26/how-to-building-a-wcf-service-and-consumer.aspx

Faruz
I concur. However, for learning, asmx is easier and gives results now. That's just as valuable when learning.
drachenstern
A: 

U can also start learning the basics of the Webserivice from here

http://www.w3schools.com/webservices/ws_intro.asp

Phani Kumar PV