Skip navigation
Currently Being Moderated

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

Aug 1, 2011 11:08 PM

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)) ;

 

 

 

}

 

 

 

 
Replies
  • Currently Being Moderated
    Mar 2, 2012 7:43 PM   in reply to gnanaprakasamag

    var enc:Base64Encoder = new  Base64Encoder();

                    enc.encode("test:supp0rt");

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

     
    |
    Mark as:

More Like This

  • Retrieving data ...

Bookmarked By (0)

Answers + Points = Status

  • 10 points awarded for Correct Answers
  • 5 points awarded for Helpful Answers
  • 10,000+ points
  • 1,001-10,000 points
  • 501-1,000 points
  • 5-500 points