Showing posts with label concept. Show all posts
Showing posts with label concept. Show all posts

Wednesday, March 28, 2012

Web service

Dear Friends,
I`m very much new to VB.NET
Can anyone will explain me the concept of Web Service and its application.
Any example code is welcome.
Anita.there's a brief description and a brief example on my website www.vb-tech.com, or have a look at http://www.dotnetjohn.com/webservices.aspx which is a good all round website as well.

Nick
Thanks nswan,

Can anyone will tell@.me What is the difference between
Web service and Web Form?
Or we can use only Web Forms to creat a web service?

Anita
A web form is a pretty way to say a web page. That is all. A web form is something you can navigate to in your browser and view just like any other html page on the internet.

A web service is like a object you put on the internet for other applications to use (or just your apps, whatever you like). Basically, it only applies to application developers, normal end users shouldn't have a need for them. What they do is expose some methods that you can call from your applications (windows, or web) as if you were calling a method on a object in your project, even though the web service lies on another server.

(Hypothetical situation:)
Lets say FED EX wanted to expose a web service to allow programmers to access their information to display in their own applications. I could build a application for my company that sits in the system tray or something that would allow the users at my business to click it, enter a tracking number, and get the tracking results back. What would happen behind in the code would be I would take that tracking number, and pass it as an argument to a web service method that FED EX exposed. The return for that function would be the tracking data that I would then display on the form.

Hope that helps you.
Example

You have a web site (site A) which give news to its visitors, so that your site has three sections: sports,national and culture news.

But the sports news come from another company, suposse site B, and the same for the other kind of news, site C for national news and site D for culture news.

So each site has its own information in its database, but you need to extract this information to your site, how can you do it?

Well, each site (i.e. site B,C,D) has a web service echa one which its principal function is to provide the information you need; not just you could extract the information but other companies, trought a web service client.

In general a web service is a function which you call, but this function is in other web site.

Web Service 405 - method not allowed

Allright, I know this is just ignorance on my part, but the boss wants to demo a proof of concept I wrote, so trying to move on his machine. It's a web service. I just installed IIS on his machine, copied my entire folder under his wwwroot directory. Now, trying to access a web service method, getting error 405 - method not allowed.

Apologies for this lame post, but he's leaving soon and I'm running out of time to get it working on his machine. Have been googling. Just not sure what permissions or whatever, don't even know what tool would be used to set it up.

If anyone can help me out, I'd really appreciate it (read as: I'll buy you a beer).

Sorry for being desperate,
MikeJust in case anyone else is an idiot like me and tries to rush deployment. Needed to run aspnet_regiis.exe. I ran it twice, once with -enable and then again with -ir, not sure which one really needed to be done.

Then, since I just copied over the folder, I needed to set up the virtual directory in IIS.

I would imagine a proper setup routine would take care of this.