473,326 Members | 2,588 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,326 software developers and data experts.

Error calling web service

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.SoapDocumentMethodA ttribute("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.SoapBindingUs e.Literal,
ParameterStyle:=System.Web.Services.Protocols.Soap ParameterStyle.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
Nov 21 '05 #1
2 3712
PS: The web service is really very simple. Here is the full source code;
www.infovis.biz/Staff.zip.

Thanks

Regards
"John" <jo**@nospam.infovis.co.uk> wrote in message
news:e$**************@TK2MSFTNGP11.phx.gbl...
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.SoapDocumentMethodA ttribute("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.SoapBindingUs e.Literal,
ParameterStyle:=System.Web.Services.Protocols.Soap ParameterStyle.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

Nov 21 '05 #2
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

"John" <jo**@nospam.infovis.co.uk> wrote in message
news:e$**************@TK2MSFTNGP11.phx.gbl...
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.SoapDocumentMethodA ttribute("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.SoapBindingUs e.Literal,
ParameterStyle:=System.Web.Services.Protocols.Soap ParameterStyle.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

Nov 21 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Van | last post by:
Developing in C++, .Net 2003 (7.1) Running on Windows XP SP2 My delima is that all my windows services run fine until I STOP the service at which time I get a "The windows service terminated...
0
by: Francois Guerin | last post by:
I have an application calling a web service on a different machine. The application code runs under a local user account on the application server. The account (identical username/password) is...
4
by: jf li | last post by:
I have a Asp.net web application and a Asp.net Web service application. The Web application is using HtmlInputFile to get a 50M size of file selected by end user, read the data of this file and...
1
by: Ted | last post by:
I'm running a web sercvice on Win. Server 2003, and accessing it via a vb.net application, when calling web services I get the following error and at times a 404 error. Server did not recognize...
7
by: Jorgen Haukland, Norway | last post by:
Hi, I have created a Java webservice which runs in IBM WebSphere appserver. I take the WSDL-file and create a VS.NET WinForm application and calls the service running on my PC and everything...
3
by: shodson | last post by:
I have a web service http://localhost/ServiceA/ProxyService.asmx calls http://localhost/ServiceB/Service.asmx And I get an error in ServiceB's method when it calls Invoke() it craps out...
0
by: jimmyfishbean | last post by:
Hi, I am using ASP.NET (framework 1.1), Windows 2003, IIS 6.0. I have a VB.NET web service client that connects/calls a web service written in ASP.NET (both applications are installed on the...
10
by: Jim Underwood | last post by:
I am having a problem with my web page timng out while retrieving a long runnign report (90-120 seconds. I have tried modifying several settings in various places and cannot get it to run for more...
1
by: Pooja | last post by:
Hi, I am calling a web service to get Latitude and Longitude by sending a zip code. This is happening inside a loop (2000 - 3000 times). After say 80 times, it gives me an error - The operation...
6
by: alho | last post by:
The web service is called by a program running on pocket pc. When to call the web service, the first call is still ok, but for the second or later calls, it will throw "403 Forbidden" WebException....
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.