473,748 Members | 5,232 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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.Serv ices.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 12793
It's in VB but you shouldn't have any problems with it. MSDN has some good
reading on NetworkCredenti al and the like.

Dim l As New localhost.MyWeb Service
Dim cred As System.Net.ICre dentials 'Or networkcredenti als, whatever you
prefer
cred = New System.Net.Netw orkCredential(M e.txtUser.Text. Trim,
Me.txtPassword. Text.Trim)
l.Credentials = cred

dim SomValue as string = l.SomeService

"Old Man" <Ol*****@Nursin gHome.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.Serv ices.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.supe rnews.com:
It's in VB but you shouldn't have any problems with it. MSDN has some
good reading on NetworkCredenti al and the like.

Dim l As New localhost.MyWeb Service
Dim cred As System.Net.ICre dentials 'Or networkcredenti als, whatever
you prefer
cred = New System.Net.Netw orkCredential(M e.txtUser.Text. Trim,
Me.txtPassword. Text.Trim)
l.Credentials = cred

dim SomValue as string = l.SomeService

"Old Man" <Ol*****@Nursin gHome.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.Serv ices.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.2 23.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.supe rnews.com:
It's in VB but you shouldn't have any problems with it. MSDN has some
good reading on NetworkCredenti al and the like.

Dim l As New localhost.MyWeb Service
Dim cred As System.Net.ICre dentials 'Or networkcredenti als, whatever
you prefer
cred = New System.Net.Netw orkCredential(M e.txtUser.Text. Trim,
Me.txtPassword. Text.Trim)
l.Credentials = cred

dim SomValue as string = l.SomeService

"Old Man" <Ol*****@Nursin gHome.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.Serv ices.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
3496
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 someone already have example code that does something like this? Thanks.
7
9289
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. # No warranty express or implied for the accuracy, fitness to purpose
0
1174
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 middle web service just provides some simpler functions for creating reports on the fly. The initial web site is set up to use windows auth and to impersonate. The middle web service is set up to use windows auth but not to impersonate and...
1
5218
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 application using just web services. It would work something like this: 1) Assume a client (A) with a button and a text box.
4
2071
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 by: http://username:pwd@www.mysite.com/main/ which uses basic auth, but now that doesn't work. I would like to find a way where I can still use basic auth and tell the people hitting our site to modify their url to:...
8
2751
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 client/Server or Local machine environment? Based on what I have seen my guess is yes but that is a guess. In some materal it talks about it running on a web server but my supposition is that this does not necessarily mean that it would not make for a...
0
2081
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 project in the role of server. It's another project, a Windows Form project to act as the web services client. Both projects are joined in the same solution. I hope this will be the best arrangement to develop in parallel both the server and the...
1
7774
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 way to add it. I've tryed to use ethereal to watch what I'm sending and I can see all the header (Accept-Language,Accept-Encoding,User-Agent,Host,Connection,..) and the SOAP xml message but there is no "Authorization: Basic ......" at all.
8
2149
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 file using examples on MSDN. I have created a FormsAuthenticationTicket and cookie and added the cookie to the response and then set the SetAuthCookie etc. When I go to the redirected page, I am not sure how to read the cookie value so I know who...
0
8831
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
9548
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
9325
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9249
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
8244
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
6076
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4607
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4876
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
3
2215
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.