Related Posts Plugin for WordPress, Blogger...

How To Create A Web Service


Hello World Web ServiceStarting today, since my workday life tackles in programming, it would be helpful to others that I post codes that I have learned. I know it is very stressful for a Programmer like me to learn something new and it is sometimes hard to find the answer in the Internet.

For my first programming post, I would discuss on how to create a web service using C#.net. Web service by the way is the "in thing" now in web applications. Instead of modifying your old code, you can just create a web service. It can also be called by any applications connected to the Internet or the Intranet.

To create a web service using Visual Studio 2005, click File - New - Web Site. At the Web Site window, select ASP.Net Web Service.

Go to the asmx file in the Solution Explorer. Go inside the class and type the method you want to call in your other web application. In this given example, I'm going to create a method that displays a "Hello world" message.

public string HelloWorld()
{
return "Hello World!";

}

To test if it is working, build the project then start the program. You should be able to see in your browser the HelloWorld link.

If you like this post, buy me a cup of coffee.

Share This Post Digg This Del.icio.us Furl Reddit Fav This With Technorati Yahoo MyWeb Stumble This

3 comments

  1. webbielady  

    February 12, 2009 at 3:27 PM

    Now I know what your profession is! So you do programming stuffs there in SIngapore eh? Anyway, i don't even have knowledge about what web service is and what I am wondering and I would like to know how is how you put a subdomain and make another unique website/blog... just like what you have: http://www.money.makoyskie.com? Do you have a tutorial on this too?

    86th BigMak Contest point for WebbieLady

  2. Makoy  

    February 12, 2009 at 9:45 PM

    maybe i can post about that in the coming days.

  3. webbielady  

    February 13, 2009 at 3:52 PM

    I am glad you will.. I gave yu my email on previous comment I gave on Harry potter post of yours, so maybe you may teach me in email as well... I have wanted to do this for so long already but work consumes my time alot... Im just lucky that we can surf as well. ^

    Thanks for considering the request.

    110th BigMak Contest point for WebbieLady


Namecheap.com - Cheap domain name registration, renewal and transfers - Free SSL Certificates - Web Hosting