FluorineFx Throws "Requested access is not allowed" Message When Calling a Secure Service From Flash

by dcurtis 4/17/2012 11:26:00 AM

I downloaded the FluorineFx code from http://www.fluorinefx.com and looked for sample code for authentication from Flash.  I finally found the code in the Samples\Flex\Remoting\MultipleClientAuthentication directory.  After authenticating, the Flex code called the "GetSecureData()" method and worked as expected, but the Flash example would always throw the "Requested access is not allowed" error message when calling the same secure service method.  I spent a couple of days searching the internet to find a solution and could find nothing so I decided to compile the source code and debug the solution to see if I could track down the problem.  It turns out that there is a bug in the code in the FluorineFx.Messaging.Endpoints.Filter.AuthenticationFilter class on line 106--the code calls the RestorePrincipal method but never assigns the returned principal to the principal variable and as a result, the principal is always null.

                        if (key != null)
                            // someone forgot to set the principal object in this code so it was always null
                            // FluorineContext.Current.RestorePrincipal(messageBroker.LoginCommand, key);
                            principal = FluorineContext.Current.RestorePrincipal(messageBroker.LoginCommand, key);

Hope this solution helps others save a little time in their searches.  Happy coding!


Looks like this is only an issue if you use the setup.exe and use the source files from there.  If you download the source from SVN it has been fixed in the 4.0 project and the class is actually quite different.

Be the first to rate this post

  • Currently 0/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5

Tags: , ,


Powered by BlogEngine.NET
Theme by Mads Kristensen

About the author

Derek Curtis Derek Curtis
President, Plaid Pony Technology Solutions LLC

E-mail me Send mail


<<  June 2018  >>

View posts in large calendar


    Recent comments



    The opinions expressed herein are my own personal opinions and do not represent my employer's view in anyway.

    © Copyright 2018

    Sign in