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 / September 2004

Tip: Looking for answers? Try searching our database.

Web Services client and Basic Auth

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Old Man - 10 Sep 2004 19:37 GMT
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.
Jared - 10 Sep 2004 21:41 GMT
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

> using c# in a windows application.
>
[quoted text clipped - 18 lines]
> packet myself and then use manual code to send it on to the webservice....
> this is not a desirable option.
syd - 11 Sep 2004 11:23 GMT
after a bit of looking i found this...
Pass Current Credentials to an ASP.NET Web Service
http://support.microsoft.com/?kbid=813834

> It's in VB but you shouldn't have any problems with it. MSDN has some
> good reading on NetworkCredential and the like.
[quoted text clipped - 30 lines]
>> packet myself and then use manual code to send it on to the
>> webservice.... this is not a desirable option.
Jared - 11 Sep 2004 12:44 GMT
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

> after a bit of looking i found this...
> Pass Current Credentials to an ASP.NET Web Service
[quoted text clipped - 34 lines]
>>> packet myself and then use manual code to send it on to the
>>> webservice.... this is not a desirable option.

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.