Recipe 20.3 Configuring Flash Remoting for .NET

20.3.1 Problem

You want to configure Flash Remoting for .NET.

20.3.2 Solution

Add the flashgateway.dll file to the .NET web application's bin directory and create a blank gateway.aspx file in the web application's root directory. The file and folder permissions must be set to allow access to .NET web services. For example, web services won't work if the ASP.NET user doesn't have permission to run wsdl.exe. To support all Flash Remoting features, install the entire .NET SDK on the server, and not just the limited .NET Framework.

20.3.3 Discussion

Flash Remoting for .NET allows Flash clients to communicate with Windows .NET applications. The Flash Remoting for .NET gateway is sold separately by Macromedia (see You must download and install either the trial version or full version before proceeding.

To use Flash Remoting for .NET, two things must be properly configured on the server: the Flash Remoting assembly (flashgateway.dll), which implements Flash Remoting support on the server, and an ASPX page, which is used as the Flash Remoting gateway. If you have installed Flash Remoting for .NET, the default installation creates a flashremoting directory within the IIS web root (usually C:\Inetput\wwwroot). The flashgateway.dll assembly file can be found within the bin directory of that directory, and you should copy it to the bin directory of your own .NET web application. Additionally, you should create a blank ASPX page within your web application's root directory. For Flash to connect to the Flash Remoting gateway, it needs a URL to a valid ASPX page in the web application's root. While it is not absolutely necessary that you create an ASPX page specifically for this purpose (since any ASPX page will do), it is generally a good idea to keep things simple and standardized. Likewise, it is a good idea to name the ASPX file gateway.aspx, although it is not absolutely necessary.

The gateway URL that you should use in your Flash movies to connect to the Flash Remoting gateway for .NET applications (as discussed in Recipe 20.1) should be of the form:


in which dotNetServerNameOrIP is the domain name or IP address of the .NET server. applicationContext should be the context of the .NET web application as it has been set in the IIS snap-in. For example, the correct gateway URL for a web application on localhost with a context of /myApplication is:


20.3.4 See Also

Recipe 20.1, Recipe 20.9, Recipe 20.16, Recipe 20.19, and Recipe 20.24

    Part I: Local Recipes
    Part II: Remote Recipes