Skip to main content
Participant
August 2, 2011
Question

How can I pass http header to IIS webservice in basic authentication mode?

  • August 2, 2011
  • 1 reply
  • 2387 views

Hi,

I'm using Caringorm framework in my web application. The UI invokes webservice hosted in IIS. As of now I'm using windows authentication.

Authentication works perfectly in this mode.]

Now I wish to change authentication to IIS basic authentication.

Can anyone help me how can I achiev this?

Also I would like to encrypt the user credentials befor posting.

I'm trying with the below code and getting IE popups login box appearing everytime.

private function loadTranslationWSDL():void

{

    var encoder:Base64Encoder = new Base64Encoder();

    encoder.insertNewLines = false;

    encoder.encode(portalSer.strUserName + ":" + portalSer.strPassword);

    model.svcLocator.getWebService("svcCommon").httpHeaders = {AUTHORIZATION : "Basic " + encoder.toString()};

    var translationToken:AsyncToken = model.svcLocator.getWebService("svcCommon").GetPortalUserTranslations();

    translationToken.addResponder(new ItemResponder(onGetPortalUserTranslationsResult,onTranslationsFault));

}

This topic has been closed for replies.

1 reply

March 3, 2012

var enc:Base64Encoder = new  Base64Encoder();

                enc.encode("test:supp0rt");

                web_Service_id.httpHeaders= {Authorization:"Basic " + enc.toString()};