473,405 Members | 2,338 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,405 software developers and data experts.

Web Services client and Basic Auth


using c# in a windows application.

I am developing a webservice to run on our extranet SSL server. The
company policy is that this server log everybody in.

I am going to use the WSE security, but what is stoping me now is the first
basic auth login handshake.

The webservice works on my dev box, but when i use the test tool I wrote in
c# windows application it fails because it cant get to the webservice, it
is stopped at the Basic Auth.

I saw on the web where you can create a login object and attach it to the
webrequest object, webrequest is buried deep in the
System.Web.Services.Protocols and not available to me.

What can i do - is the only option that I have at present is build the soap
packet myself and then use manual code to send it on to the webservice....
this is not a desirable option.

Nov 21 '05 #1
3 12777
It's in VB but you shouldn't have any problems with it. MSDN has some good
reading on NetworkCredential and the like.

Dim l As New localhost.MyWebService
Dim cred As System.Net.ICredentials 'Or networkcredentials, whatever you
prefer
cred = New System.Net.NetworkCredential(Me.txtUser.Text.Trim,
Me.txtPassword.Text.Trim)
l.Credentials = cred

dim SomValue as string = l.SomeService

"Old Man" <Ol*****@NursingHome.com> wrote in message
news:Xn**********************************@63.223.5 .246...

using c# in a windows application.

I am developing a webservice to run on our extranet SSL server. The
company policy is that this server log everybody in.

I am going to use the WSE security, but what is stoping me now is the
first
basic auth login handshake.

The webservice works on my dev box, but when i use the test tool I wrote
in
c# windows application it fails because it cant get to the webservice, it
is stopped at the Basic Auth.

I saw on the web where you can create a login object and attach it to the
webrequest object, webrequest is buried deep in the
System.Web.Services.Protocols and not available to me.

What can i do - is the only option that I have at present is build the
soap
packet myself and then use manual code to send it on to the webservice....
this is not a desirable option.

Nov 21 '05 #2
syd
after a bit of looking i found this...
Pass Current Credentials to an ASP.NET Web Service
http://support.microsoft.com/?kbid=813834
"Jared" <VB***********@email.com> wrote in
news:10*************@corp.supernews.com:
It's in VB but you shouldn't have any problems with it. MSDN has some
good reading on NetworkCredential and the like.

Dim l As New localhost.MyWebService
Dim cred As System.Net.ICredentials 'Or networkcredentials, whatever
you prefer
cred = New System.Net.NetworkCredential(Me.txtUser.Text.Trim,
Me.txtPassword.Text.Trim)
l.Credentials = cred

dim SomValue as string = l.SomeService

"Old Man" <Ol*****@NursingHome.com> wrote in message
news:Xn**********************************@63.223.5 .246...

using c# in a windows application.

I am developing a webservice to run on our extranet SSL server. The
company policy is that this server log everybody in.

I am going to use the WSE security, but what is stoping me now is the
first
basic auth login handshake.

The webservice works on my dev box, but when i use the test tool I
wrote in
c# windows application it fails because it cant get to the
webservice, it is stopped at the Basic Auth.

I saw on the web where you can create a login object and attach it to
the webrequest object, webrequest is buried deep in the
System.Web.Services.Protocols and not available to me.

What can i do - is the only option that I have at present is build
the soap
packet myself and then use manual code to send it on to the
webservice.... this is not a desirable option.


Nov 21 '05 #3
Syd,
I don't think that will work in this scenario, Old specifically stated
that he needed to use Basic Windows Authentication which passes your
credentials in base64 encoded clear text. Windows Integrated uses a hash,
which "cannot" be decrypted, it just verifies the signature. Since basic
can't verify the identity, it should not allow access.
Your method works great for Windows Integrated.
Jared

"syd" <sy*************@klassifiedbbs.net> wrote in message
news:Xn*********************************@63.223.5. 246...
after a bit of looking i found this...
Pass Current Credentials to an ASP.NET Web Service
http://support.microsoft.com/?kbid=813834
"Jared" <VB***********@email.com> wrote in
news:10*************@corp.supernews.com:
It's in VB but you shouldn't have any problems with it. MSDN has some
good reading on NetworkCredential and the like.

Dim l As New localhost.MyWebService
Dim cred As System.Net.ICredentials 'Or networkcredentials, whatever
you prefer
cred = New System.Net.NetworkCredential(Me.txtUser.Text.Trim,
Me.txtPassword.Text.Trim)
l.Credentials = cred

dim SomValue as string = l.SomeService

"Old Man" <Ol*****@NursingHome.com> wrote in message
news:Xn**********************************@63.223.5 .246...

using c# in a windows application.

I am developing a webservice to run on our extranet SSL server. The
company policy is that this server log everybody in.

I am going to use the WSE security, but what is stoping me now is the
first
basic auth login handshake.

The webservice works on my dev box, but when i use the test tool I
wrote in
c# windows application it fails because it cant get to the
webservice, it is stopped at the Basic Auth.

I saw on the web where you can create a login object and attach it to
the webrequest object, webrequest is buried deep in the
System.Web.Services.Protocols and not available to me.

What can i do - is the only option that I have at present is build
the soap
packet myself and then use manual code to send it on to the
webservice.... this is not a desirable option.



Nov 21 '05 #4

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

Similar topics

3
by: Dan Stromberg | last post by:
If I wanted to write a python script that performs basic auth, gets a cookie, and then does an http POST using the cookie for authentication, what would be the best python API to write to? Does...
7
by: Michael Foord | last post by:
#!/usr/bin/python -u # 15-09-04 # v1.0.0 # auth_example.py # A simple script manually demonstrating basic authentication. # Copyright Michael Foord # Free to use, modify and relicense. #...
0
by: Ciaran McAuliffe | last post by:
Hey, I have a bit of a tricky problem, here is a quick overview. I have a website which connects to a webservice, this web service is a front for access to the Reporting Services Web Service, the...
1
by: Pepe Le Peu | last post by:
I have been looking at Remoting and Web Services and I think I can do almost anything I want with Web Services. Here's my intellectual puzzle though: Suppose I wanted to create a P2P...
4
by: Barry | last post by:
The MS fix for IE broke how users access our site (if they patch their browsers), so I need a solution to get users logged onto our site transparently. Basically we used to log on to the site...
8
by: Woody Splawn | last post by:
I am asking this question here because I asked this question in the Reporting Services Newsgroup and did not get an answer. Does anyone know if Reporting Services is intended to work in a...
0
by: SammyBar | last post by:
Hi all, My problem is basic. I'm starting to try web services with Visual Studio .NET 2002, .NET Framework 1.0. I'm testing the following configuration for my project. It's a ASP.NET Web Service...
1
by: Ottavio | last post by:
Hello, I'm having some problems with the authentication during a web service call I know I have to add the "Authorization: Basic xxxxxxxx" in the http header (not soap header) but I can't find a...
8
by: =?Utf-8?B?TFc=?= | last post by:
Hello! I am just learning about forms authentication so please excuse this basic question. I am using .NET 1.1 and C#. I have created my web.config file and my login.aspx and the associated cs...
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: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
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
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
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
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...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

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.