• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
Locked
0

webservice with authentication browser popup missing after release/deployment

New Here ,
May 18, 2012 May 18, 2012

Copy link to clipboard

Copied

I'm writing a flash (flex actionscript) application that connects to a webservice using mx.rpc.soap.WebService over https and using Basic Authentication. I understand that flash will remove the authentication headers if there is no crossdomain.xml file on the server root. In development mode when I run my flash application the browser still pops up the authentication request. When I enter it the app runs fine. But when I create a release and run it using the browser I don't get the browser popup and authentication fails and my application cannot continue. Does anyone know how to fix this?

My code is below

var ws:WebService;
var encoder:Base64Encoder = new Base64Encoder();
encoder
.insertNewLines=false;               
encoder
.encode(event.credentials.username + ':' + event.credentials.password);

var encodedCredentials:String = new String();
encodedCredentials
= encoder.toString();

ws
= new WebService();
ws
.addEventListener(FaultEvent.FAULT, onFault);
ws
.addEventListener(ResultEvent.RESULT, onResult);
ws
.httpHeaders = {Authorization:"Basic " + encodedCredentials};
ws
.loadWSDL(event.credentials.url + "?wsdl");

Views

571

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
May 19, 2012 May 19, 2012

Copy link to clipboard

Copied

LATEST

I also noticed that when I release to bin-release under the project folder. I get the popup window. But if I release to a different folder outside of the project then I don't get the popup and authentication fails. I've gone through the deployment documentation but can't think of what I might be missing.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines