Authenticating with LinkShare’s Link Locator Direct web service with C#
If you're new here, you may want to subscribe to my RSS feed. Thanks for visiting!
I’ve spent the last couple hours debugging an authentication issue with LinkShare’s Link Locator Direct web service. My console app was throwing the following exception:
System.Web.Services.Protocols.SoapException: org.apache.axis.AxisFault:Pass in username/password
The error message seems straight-forward enough– “Pass in username/password.” But what do you do if you know you are passing in the username and password?
This was the code I was using:
LinkShareTextPromotion.EJBTextPromotionServiceService tp =
new LinkShareTextPromotion.EJBTextPromotionServiceService();
tp.Credentials = new NetworkCredential(username, password);
tp.PreAuthenticate = true;
LinkShareTextPromotion.Text[] results = tp.GetAllLinks(sid);
Anyway, I finally lucked out and stumbled onto this link on the LinkShare forums, which lead me to Gordon Weakliem’s blog that had a working solution. Apparently this problem occurs due to how .NET authenticates.
If you’re experiencing the same error and got here via Google, then I hope this helps you get on your way.
Related Posts
- 5 months later, making $40/month using Text-Link-Ads.com
- Update on Text-Link-Ads: Over $70 per month, no work
- .NET Web Services and Windows Services
- More easy money, this time with DealDotCom
- Increase traffic by using BlogRush
- So far, $20+ per month using Text-Link-Ads.com
- Business Idea: Buy website domains over your cell phone


on October 20th, 2007 at 11:16 pm
Can you explain the working code with a VB.net illustration. Thank you so much