Results 1 to 6 of 6
  1. #1
    Member offerfind's Avatar
    Join Date
    January 18th, 2005
    Posts
    69
    Question Link Locator Direct web service
    Has anyone used C# / VB .NET to create a script to access the Link Locator Direct web service? I can't seem to get it to function correctly (authorization issues), but have followed the instructions given. Any tips or resources would be helpful.

    Exact error:
    "System.Web.Services.Protocols.SoapException: org.apache.axis.AxisFault:Pass in username/password"

  2. #2
    ABW Ambassador LinkShare Moderator's Avatar
    Join Date
    January 18th, 2005
    Posts
    1,316
    offerfind,
    The .NET issue that you referring to is a client side issue. Our research
    indicates that it is caused due to the way in which .NET authenticates.

    The following articles describe the problem and possible solutions.
    http://radio.weblogs.com/0106046/2002/10/24.html
    http://www.dotnet247.com/247referenc...40/203250.aspx

    Ranae

  3. #3
    Member offerfind's Avatar
    Join Date
    January 18th, 2005
    Posts
    69
    Talking
    Ranae,

    Thanks for the information!! By setting PreAuthenticate to True and adding the code (posted in the first link you mentioned) to the Reference.vb, it was fixed within minutes (as I had previously spent a few hours toying with it).

    Perhaps you should post that as a note in the LLD guidelines somewhere?

  4. #4
    Newbie
    Join Date
    October 21st, 2007
    Posts
    2
    Can you provide more info on what you added to the reference.vb file.
    I did not find a reference.vb file in my ASP.net 2005 project. I created a new file and tried to added the following to the
    Protected Overloads Overrides Function GetWebRequest(ByVal uri As Uri) As System.Net.WebRequest
    Dim request As System.Net.HttpWebRequest = DirectCast(MyBase.GetWebRequest(uri), System.Net.HttpWebRequest)
    If Me.PreAuthenticate Then
    Dim nc As System.Net.NetworkCredential = Me.Credentials.GetCredential(uri, "Basic")
    If nc IsNot Nothing Then
    Dim credBuf As Byte() = New System.Text.UTF8Encoding().GetBytes(nc.UserName + ":" + nc.Password)
    request.Headers("Authorization") = "Basic " + Convert.ToBase64String(credBuf)
    End If
    End If
    Return request
    End Function

    But i was not able to compile the same. Can you share what y did . Thanks

    Quote Originally Posted by offerfind
    Ranae,

    Thanks for the information!! By setting PreAuthenticate to True and adding the code (posted in the first link you mentioned) to the Reference.vb, it was fixed within minutes (as I had previously spent a few hours toying with it).

    Perhaps you should post that as a note in the LLD guidelines somewhere?

  5. #5
    Newbie
    Join Date
    May 15th, 2005
    Posts
    16
    Here are the steps to building the application:
    1. Create a new project.
    2. Add a web reference using the wsdl location (I ignored the user name & password in the URL)
    3. Double click on the references to expand the view.
    4. Double click on the reference for a specific wsdl to view the code the reference.
    5. Locate the GetWebRequest method in this reference file and make the changes mentioned.
    6. Now you can add a new web page or vb form and add code to use the web service.

  6. #6
    Member
    Join Date
    April 30th, 2008
    Posts
    88
    Hey,

    I just found out about Linkshare's Link Locator Direct webservice today and ran into the same issue. The remedy provided by offerfind worked perfectly.

  7. Newsletter Signup

+ Reply to Thread

Similar Threads

  1. Linkshare link locator Direct service
    By arianman in forum Rakuten LinkShare - LS
    Replies: 8
    Last Post: September 12th, 2013, 12:13 PM
  2. Linshare Link Locator Direct
    By pirate3x3 in forum Rakuten LinkShare - LS
    Replies: 1
    Last Post: May 28th, 2008, 09:03 PM
  3. PHP for Link Locator Direct? anyone, anyone Gardner?
    By bouffoc in forum Rakuten LinkShare - LS
    Replies: 4
    Last Post: January 16th, 2008, 09:46 AM
  4. Having Problems with the New Link Locator Direct 2?
    By flipone in forum Rakuten LinkShare - LS
    Replies: 5
    Last Post: December 12th, 2007, 06:00 PM
  5. Non programer needs access to Link Locator Direct
    By signofDtimes in forum Rakuten LinkShare - LS
    Replies: 3
    Last Post: January 30th, 2007, 05:09 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •