Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / ASP.NET / Web Services / August 2004

Tip: Looking for answers? Try searching our database.

Error calling web service

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
John - 17 Aug 2004 01:20 GMT
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

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.