J
John
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
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