Using Web Services in C#

I followed the walkthrough to start learning how to connect to web services in Nav 2009.

http://msdn.microsoft.com/en-us/library/dd355316.aspx

I typed in the code exactly as it is, but when I run it, I get a WebException was unhandled error at the

Customer[] list = service.ReadMultiple(filter.ToArray(), null, 100);

line. The error says ‘The request failed with HTTP status 401: Unauthorized’.

Does anyone have an idea of what is causing this and how I can fix it?

It sounds like a permission error. Have you tested that your web service is running correctly?