[How Do I:] Create and Call a Simple Web Service in ASP.NET

Please install Silverlight or click download to watch video locally.

In this video Chris Pels will show how to create a web service in ASP.NET and then call the service from another ASP.NET web site. First, learn how to create an .asmx component which represents a web service in an ASP.NET web site. When creating the web service learn how to control several aspects of the web service functionality with web service attributes. Next, see how to test the web service in the Visual Studio web service test page. Then learn how ASP.NET allows many .NET data types to be returned from a web service. Create a business class library project and then use a class in that project as a return value from a web service by serializing the custom business object instance. Finally, see how to consume a web service from an ASP.NET web site.

Presented by Chris Pels

Duration: 33 minutes, 22 seconds

Date: 27 March 2008

Watch    Video   |   Download    Video   |   VB Code    C# Code

Video downloads: WMV  |  Zune  |  iPod  |  PSP  |  MPEG-4  |  3GP

Audio downloads: AAC  |  WMA  |  MPEG-4  |  MPEG-3  |  MPEG-2

Comments : 46

Leave a Comment

Nezdet : On March 28, 2008 10:17 AM said:

the qulity for this video is bad...

nitancy : On March 28, 2008 12:48 PM said:

I ,too, was surprised at how grainy this video appeared. :-(

nitancy : On March 28, 2008 1:05 PM said:

I downloaded it and the quality is much better running form the desktop!

igavemybest : On March 29, 2008 12:50 AM said:

Yeah, can't you fix this video?

meles1 : On March 29, 2008 12:59 AM said:

can you do something about the quality of the picture, both screen features are awful.  The subject matter and the sound is pretty good.

futureking : On March 29, 2008 5:17 AM said:

The quality of this video is very bad.

Hey! Please reupload this video.

JAGomez : On March 30, 2008 7:21 AM said:

Click on the Zune Video instead.  The links are crossed.

ckir : On March 30, 2008 6:14 PM said:

So far so good!! Now please show us Exception Handling and Membership. thnx

teacare : On March 31, 2008 12:17 AM said:

Yes, this video is very badly.But,i want to thanks for the author.

JoeStagner : On March 31, 2008 9:33 AM said:

Hi Folks - I'll see to getting this video replaced, I'm not sure if this was a post production issue or what, but I'll try to get it replaced.

ChristianHuenniger : On March 31, 2008 5:25 PM said:

the quality is :(

EduardoAndres : On March 31, 2008 9:12 PM said:

`Wow .. the quality is really bad .. is there a way to get this video in a better quality?

JoeStagner : On March 31, 2008 10:02 PM said:

Watch THIS one .....

download.microsoft.com/.../WinVideo-ASP-SimpleWebService.wmv

It's full quality.

huh : On April 01, 2008 1:41 AM said:

hihi, the link of video is bad. Click on the Zune instead of WMV

cmcdavid : On April 01, 2008 4:20 PM said:

Thanks Joe.  You rock.

glitch007 : On April 01, 2008 7:13 PM said:

The WMV and Zune links to the video are swapped by mistake

dhounshell : On April 02, 2008 3:26 PM said:

The WMV and Zune links have been corrected.

ChristianHuenniger : On April 02, 2008 3:57 PM said:

WOW

the quality is now better:-)

Ponraja : On April 03, 2008 5:43 AM said:

Hi all.. i am a young developer.. for me kind of guys it is really interesting to watch this.

one more thing, could you please let me know any video files for Web control library.

give me a sugesstion to create a gridview using custom control.

Thanks.

Manmadhan : On April 07, 2008 5:35 PM said:

I am new to webservice, and found this video pretty easy and useful for beginners. Is there any video that has webservice reading from Database and displaying data as a XML file?

Manmadhan : On April 07, 2008 7:31 PM said:

I tried working the VB Code in C# and I am not able to run the web page with "Label1.Text = wsCustomer.GetCustomerName(33);" in default.aspx.cs. I recieved the output string as localhost.CustomerClass.

I changed the line to "WSCustomer.CustomerName(2).CustomerName" and go the output. Did anyone faced the same issue?

Manmadhan : On April 07, 2008 7:33 PM said:

I tried to work in C# along with the video. I created a default website, default.aspx.cs and coded as mentioned. I received the output as "localhost.CustomerClass". When I changed from "TextBox2.Text = WSCustomer.CustomerName(2)" to "TextBox2.Text = WSCustomer.CustomerName(2).CustomerName", I got the output. Did anyone face the same issue?

Manmadhan : On April 07, 2008 7:34 PM said:

I tried to work in C# along with the video. I created a default website, default.aspx.cs and coded as mentioned. I received the output as "localhost.CustomerClass". When I changed from "TextBox2.Text = WSCustomer.CustomerName(2)" to "TextBox2.Text = WSCustomer.CustomerName(2).CustomerName", I got the output. Did anyone face the same issue?

Manmadhan : On April 07, 2008 7:38 PM said:

0

yatin : On April 11, 2008 8:55 AM said:

Good Easy For Beginners to Understand

yatin : On April 11, 2008 8:56 AM said:

tgtgt

ewitkows : On April 17, 2008 9:25 AM said:

Nice job Joe!  Looking forward to hearing you speak at http://www.techbash.com =]

Paul I : On April 21, 2008 3:52 AM said:

Very helpful video that I felt presented the subject at an appropriate level.

I have one question. I need to be able to call my Web service from other Microsoft products, specifically Excel.

What is the recommended approach?

Thanks

MR.walid24 : On May 25, 2008 7:51 AM said:

Hi,

I'm downloading this video know and cause my bad connection I didn't wath it yet completly. and I want say that I have a probleme to manipulat a database class in my web service. exactly my problem is:

I have a web site using a web service,

the web site will sent a search request to the web service and this last must get the data from its databasaclass (the informations can be more than 1 ligne) and return it.

I was thinking to use a table of string for the return value but I couldn't get the informations from the database in fact I don't know how I do so please can you help me?

cv_vikram : On August 09, 2008 8:37 AM said:

tfs....

myloginid1 : On August 17, 2008 9:57 PM said:

i would only like to say thanks u did try to help

Nicolay : On August 28, 2008 3:42 AM said:

russian translate - http://nignatov.ru/?p=488

moosdau : On September 03, 2008 12:44 AM said:

it's helpful , thanks

moosdau : On September 03, 2008 12:47 AM said:

But I think there should be some links to other videos that related to the topic of this  

ipjyothi : On October 14, 2008 4:06 PM said:

this video is helpful

thanks

djibril_chimere_DIAW : On October 29, 2008 7:56 PM said:

Thanks! Jërëjëf!

djafer : On November 12, 2008 1:56 AM said:

İnşaallah faydasını görürüm ya.

tkbalaji : On November 27, 2008 4:20 AM said:

I am unable to downalod the video...It says page cannot be displayed...Anyone help plz...

rami_nassar : On December 26, 2008 8:08 AM said:

good introduction

bohunt : On February 13, 2009 3:39 PM said:

Nice video!

cleverwisdomforever : On March 29, 2009 4:28 PM said:

Thats perfect video including subject and quality and sound. I dont see any problem, i dont know why u guys get problem in watching through the asp.net link. I would like to thanks Chris Pels for the great job. We wish that Chris will keep up us up to date. I would like to request Chris to upload few videos regarding testing(N-Unit), Design Pattern and more in detail Web Services please.

Many Thanks Chris Pels, God Bless you!!!!

Regards Cleverwisdomforever!!!!!!!

puneet bhatia : On May 28, 2009 11:47 AM said:

Nce video... really helpful... all you people who are saying that the video is not clear... double click it and view in large... it is very clear video i think..

tutu : On July 30, 2009 7:17 AM said:

Chris, thanks. Excellent for newbies. You started talking about getting data (customer name) from a database. I am interested in that and wonder if you or anyone help me with an example web service that reads data from a MS SQL database on the same machine please. I am new to web service and having problems. Thanks all.

tutu : On July 31, 2009 1:38 PM said:

Hi Chris, This tutorial is wonderful but I wondered if you can show how one can connect to a database and retrieve information given a value within a web service please.

lokuge : On September 13, 2009 8:23 AM said:

hh

lokuge : On September 13, 2009 8:30 AM said:

Nice video.You did very good job sir.I have learnt lot about web services from this video.thank you again

Leave a Comment

You must be logged in to leave a comment. Click here to log in.

Microsoft Communities