What you would need is to build your own HttpModule that monitors all traffic
coming through. It would co-exist with Macromedia's remoting connector and not
be a sub-class of Macromedia's components. It seems you are pretty
knowledgably in C# so I won?t bore you will the details on how to implement
your own HttpModule (MSDN docs do a better job than I could anyways). One of
the benefits of the .Net remoting components Macromedia provides is it allows
you to inspect AMF data. Macromedia has not documented a lot of these methods
because their original intent was not to inspect AMF data manually but to do it
all automatically for the user. So by building our own HttpModule and making
use of Macromedia's remoting classes, we could inspect that data easily.
In your HttpModule?s BeginRequest event handler (the event of HttpApplication
instance passed to the Init() method), you would take the input stream of the
HttpApplication and create an instance of the FlashGateway.Action.ActionMessage
datatype
<example>
ActionMessage requestMessage = new ActionMessage();
long length = app.Context.Request.InputStream.Length;
BufferedStream bufferedStream = new
BufferedStream(app.Context.Request.InputStream, (int)length);
MessageDeserializer deserializer = new MessageDeserializer(bufferedStream);
requestMessage = deserializer.readMessage();
</example>
Then it is up to you how you verify that the call is to be accepted or
rejected. A simple example would take the ActionMessage and check for a
certain unique identifier returned by the GetHeader() method. If the unique
identifier is valid then it would allow the call to occur by setting the
HttpApplication.Context.Request.InputStream.Position = 0. I would recommend
you look through the different classes available and what their capabilities
are. Most of them are self explanatory.
HTH
Thanks
Chafic
----
http://www.blinex.com blog: http:/
www.rewindlife.com Team Macromedia Volunteer:
http://www.macromedia.com/go/teammacromedia