Home Tutorials Forums Articles Blogs Movies Library Employment Press
Old 04-09-2010, 06:37 PM   #1
skreisoft
Registered User
 
Join Date: Apr 2010
Posts: 2
Default Flex WebService Custom Http Header

Hi,

I have an Asp.Net custom http module that validates each request by pulling out the "Authorization" header from each request and validating it agaist my custom membershilp provider. I wrote a test flex client that creates an instance of the WebService class, and sets the http header, but when I debug it, the header never gets sent. Please Help!

var svc:WebService = new WebService();
svc.wsdl = "http://localhost:<port>/<MyWsdlUrl>;

// Encode creds - username = Foo, password = Bar
var encoder:Base64Encoder = new Base64Encoder();
encoder.insertNewLines = false;
encoder.encode("Foo:Bar");

// Set creds on proxy
svc.httpHeaders = {"Authorization" : "Basic " + encoder.toString()};


// Load wsdl
svc.loadWSDL();

// Set event handlers
svc.addEventListener(ResultEvent.RESULT, resultHandler);
svc.addEventListener(FaultEvent.FAULT, faultHandler);

// Invoke service method
svc.getOperation("GetShortDateString").send();
skreisoft is offline   Reply With Quote
Old 04-09-2010, 07:38 PM   #2
skreisoft
Registered User
 
Join Date: Apr 2010
Posts: 2
Default

Actually this code works in firefox, the "Authorization" header gets sent but does not work with IE 8, does anyone know why this doesn't work with IE8?
skreisoft is offline   Reply With Quote
Reply


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Forum Jump


All times are GMT. The time now is 07:38 AM.

///
Follow actionscriptorg on Twitter

 


Powered by vBulletin® Version 3.8.5
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Ad Management plugin by RedTyger
Copyright 2000-2013 ActionScript.org. All Rights Reserved.
Your use of this site is subject to our Privacy Policy and Terms of Use.