Windows 7 Windows 7 gadget and Windows authentication?

Discussion in 'Desktop Customization' started by Arnelaa, Apr 8, 2011.

  1. Arnelaa

    Arnelaa New Member

    Joined:
    Apr 8, 2011
    Messages:
    2
    Likes Received:
    0
    Hi everybody,

    I'm new at gadget development, so I already have a problem

    I want to make a gadget that will, for a start, be returning user name through windows authentication. I'm not sure is this even possible to do?

    I've already done an asp web service, which returns user name. Then I've done a html file, from which I'm calling that web service with ajax. And it is all working perfectly fine in web browser.

    But when I convert it to a gadget, I get An error occured.

    Here is the part of code that is returning an error. As we can see, GetUser function is called, but for some reason i get error.

    .ajax({

    type: "POST",

    contentType: "application/json; charset=utf-8",

    url: "http://localhost:888/Service.asmx/GetUser",

    dataType: "json",

    success: function (data) { $('.result').html("User: " + data.d); },

    error: function (e) { $('.result').html("An Error Occured"); }
    });




    If you have any ideas, how to do it in a easier way, I will be happy to hear it
     
  2. oligsei

    oligsei New Member

    Joined:
    Sep 7, 2011
    Messages:
    4
    Likes Received:
    0
    Are you using jquery?

    Try replacing the arguments for the callback function for the error.
    [h=5]error(jqXHR, textStatus, errorThrown)[/h]
    like so. And simply analyze the textStatus
     

Share This Page

Loading...