Thanks for the suggestion, I screwed up the IIS setting, that caused the
problem, it's fixed after I change the setting back. Thanks.
I do have one more question. In my client application, normally when I add
that web reference, Visual Stiudio .Net will automatically generate the
proxy in reference.cs. But I noticed that in some examples, they just write
their own proxy class without adding that web reference, what's differnce
between these two? is there anything we need to consider if I write my own
proxy class?
Thanks!
Jason
"Ben Eaton" <be*@madeupaddress.com> wrote in message
news:#2**************@tk2msftngp13.phx.gbl...
Hi Jason
Sounds like an authentication problem. Check the directory security
settings in IIS match your web.config file settings (i.e. if web.config is
set to windows authentication then so should IIS).
If you are using windows authentication then any proxy class calling the
service needs to include the following line in the constructor:
me.credentials = system.net.credentialcache.defaultcredentials
hth
~Ben
"Jason Zhou" <jz***@apx.com> wrote in message
news:e9**************@TK2MSFTNGP11.phx.gbl...Hi All,
This is my first time to play with web service, but it failed with error
message like: The request failed with HTTP status 401: Access Denied. WhatIdid is very simple: I am using WSE 2.0, I implemented a web method to
returncurrent system time. Client is a simple C# window aplication to call
this web service. I guess it's something related to my security setting or
permission setting, but I have no clue where it is.
Any help would be appreciated!
Jason