Web Services and HTTP Authentication

freeek

Expert Member
Joined
Dec 6, 2003
Messages
2,143
Reaction score
1
Location
Cape Town, South Africa.
Hi All.

I'm struggling to add http authentication to my app (client side). I am rather new to working with webservices. The application and the webservice are both on the local domain and were working fine but Management has asked the web service guys to use authentication.

I was just emailed a username and password. I'm not to sure what to do with this, from what i have been reading is that I need to edit the credentials? I can someone please guide me thanks

I'm using visual studio 2003, If I open object explorer and click on a web reference this is what I included in the constructor

Public Sub New()
MyBase.New
Me.Url = "http://zablv20650.xyz.corp:5555/soap/rpc"
Dim cred As New System.Net.NetworkCredential("username", "password")
Me.Credentials = cred
Me.PreAuthenticate = True
End Sub
 
Is this just not doing anything or are you getting an error message?
What have you tried to make this work?

Its not easy or even sometimes possible at all to diagnose the issue and help you reach a solution without this kind of information.

In lieu of this information, however, I will make a suggestion that I personally hate getting myself. Use something else.

With relative ease, I was able to write and connect to my web service using ASP.NET Web Api 2. It uses MVC Razor architecture so that helped me figure out how it'd work and there are decent tutorials on how to access the web service in there as well.

http://www.asp.net/web-api/overview/getting-started-with-aspnet-web-api/tutorial-your-first-web-api
 
Only took you 20 minutes to find an old thread. You need to up your Mybbfu
 
Top
Sign up to the MyBroadband newsletter
X