Hi
My first web service seems to be OK as I can put its url in explorer and can
use the invoke button to view the returned data as xml. The problem comes
when I call it form a client app using;
Dim ws As New localhost.StaffWS
Dim ds = ws.GetStaffDiary
When the second line above is executed I get a 'The request failed with HTTP
status 401: Access Denied.' error on the line indicated below in the
\webreferences\localhost\references.vb file on the line indicated below;
<System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://localhost
/staff/staffws/StaffWS.asmx/GetStaffDiary",
RequestNamespace:="http://localhost/staff/staffws/StaffWS.asmx",
ResponseNamespace:="http://localhost/staff/staffws/StaffWS.asmx",
Use:=System.Web.Services.Description.SoapBindingUse.Literal,
ParameterStyle:=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)> _
Public Function GetStaffDiary() As System.Data.DataSet
Dim results() As Object = Me.Invoke("GetStaffDiary", New Object(-1) {})
'<== This line has the error.
Return CType(results(0),System.Data.DataSet)
End Function
Any idea what this error is about and how to fix it?
Thanks
Regards
John - 17 Aug 2004 11:47 GMT
PS: The web service is really very simple. Here is the full source code;
www.infovis.biz/Staff.zip.
Thanks
Regards
> Hi
>
[quoted text clipped - 8 lines]
> status 401: Access Denied.' error on the line indicated below in the
> \webreferences\localhost\references.vb file on the line indicated below;
<System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://localhost
> /staff/staffws/StaffWS.asmx/GetStaffDiary",
> RequestNamespace:="http://localhost/staff/staffws/StaffWS.asmx",
[quoted text clipped - 12 lines]
>
> Regards
Jeffrey Hasan - 23 Aug 2004 18:49 GMT
Make sure your settings on the Web service host virtual directory are
correct. In Directory Security check "Anonymous Access" and make sure you
are selecting a valid IUSR_ Windows account/password.
Jeffrey Hasan, MCSD
President, Bluestone Partners, Inc.
-----------------------------------------------
Author of: Expert SOA in C# Using WSE 2.0 (APress, 2004)
http://www.bluestonepartners.com/soa.aspx
> Hi
>
[quoted text clipped - 8 lines]
> status 401: Access Denied.' error on the line indicated below in the
> \webreferences\localhost\references.vb file on the line indicated below;
<System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://localhost
> /staff/staffws/StaffWS.asmx/GetStaffDiary",
> RequestNamespace:="http://localhost/staff/staffws/StaffWS.asmx",
[quoted text clipped - 12 lines]
>
> Regards