473,395 Members | 1,641 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,395 software developers and data experts.

Web Service Credentials

Hi All,

I am trying to consume a web service that requires a username/password.

If I go direct to the web service in my browser, I get a password box.
If I enter the username/password I am presented with the usual 'The
following operations are supported.' - All fine! :)

Now, when I try to use the service in my application, I get the
following error:

"The request failed with HTTP status 401: Access Denied."

My code to use the web service is this:

Dim BS7666 As New bs7666.BS7666
Dim CredCache As New CredentialCache
CredCache.Add(New Uri(BS7666.Url), "Negotiate", New
NetworkCredential("UserName", "PassWord", "ServerName"))
BS7666.Credentials = CredCache
Dim DataSet_bs7666 As New DataSet
DataSet_bs7666 = BS7666.GetAddresses(0, "", strPostCode.ToLower,
BuildingNoOrName.ToLower, "", strStreet.ToLower, 0, 0) <-- This is
where it fails.

I don't get it! Help! :)

Thanks,
Simon.

Nov 19 '05 #1
2 1163
I've just checked my IIS logs, seems no user name/password are being
passed when my application accesses the service. Odd.

Any help will be much appreciated! :)

Nov 19 '05 #2
Ok, changed it to this:

CredCache.Add(New Uri(BS7666.Url), "Negotiate", New
NetworkCredential("UserName", "Basic", "ServerName"))
(Note auth type changed from Negotiate to Basic)

It now passes the correct user name and password, but, throws this
error:

"Invalid URI: The format of the URI could not be determined."

I know that BS7666.Url.toString returns the correct URL to my web
service.

Any ideas anyone?

Nov 19 '05 #3

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

Similar topics

4
by: Ian | last post by:
Can anyone help I have a web server on the internet with and ASP.NET application on it, the application is set to allow Anonymous Access and Integrated Windows. The Web.config is set to use...
3
by: cmueller | last post by:
Hey all - I'm in a bit of a bind concerning web services and integrated authentication. I'll give you a little background as to what I'm trying to do ... I have a client application that...
4
by: Dan Higman | last post by:
I'm sure this is easy and I'll be embarrassed when I see the answer, but I just can't figure this one out. Using .Net/ASP 1.1 on a server using integrated authentication-- I have a web page...
8
by: Manfred Braun | last post by:
Hello All! I am writing a management application, which has to access remote machines registry via System.Diagnostics.EventLog.CreateEventSource . For each machine, I connect to, I create a...
5
by: Nate | last post by:
We are attempting to make a request to a web service (we will refer to it as XXXServices) hosted on a Web Logic server from a C# SOAP client. The server responds with a 401 Unauthorized error...
3
by: Robert May | last post by:
Here's the setup: Windows 2003 running .net 1.1 webservice with Integrated Authentication set. Client machine running .net 1.1 on xp pro with latest service packs and updates. User also has...
1
by: Manuel Brandao | last post by:
Hi all I would like to now the answer to the following problem, if someone can help. Given a windows application client that's calling a web service (using default credentials) the web...
3
by: =?Utf-8?B?RGFuZGFuIFpoYW5n?= | last post by:
Now I have a web application, a web service and a SQL Server database. The Web application will invoke the web service, the web service invokes the SQL Server stored procedure. I let the web...
4
by: c_shah | last post by:
I have a web application developed in ASP.net 2.0. I have to use SQL server authentication (Our outside hosting company only allows sql authentication) Inside that web application I have a web...
5
by: dm3281 | last post by:
I'm really starting to hate writing services -- or trying to, anyway. Why do I need to rename my project to the service name? Why do I need to set the "ServiceName" property to my service name?...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

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.