Winton DeShong
Web / Flash Development

Archive for the 'ASP.NET' Category

Resolving “Could not load file or assembly ‘FluorineFx’ or one of its dependencies.”

May 05th, 2009 | Category: AMF, ASP.NET, IIS, Software

Problem:

Could not load file or assembly ‘FluorineFx’ or one of its dependencies. Strong name signature could not be verified. The assembly may have been tampered with, or it was delay signed but not fully signed with the correct private key. (Exception from HRESULT: 0×80131045)

Description:

This issue isn’t a problem inherent to the FluorineFx package, but is caused by any libraries that use signing. If an assembly that uses signing is requested, IIS checks against the GAC to make sure it has record of the assemblies “Public Key Token”. This is used so IIS can serve different versions of the same assembly across different applications.

Solution

(1) Install the .NET Framework 2.0 Software Development Kit if it is not already.
http://www.microsoft.com/downloads/details.aspx?FamilyID=fe6f2099-b7b4-4f47-a244-c96d69c35dec&DisplayLang=en

NOTE: This installation does NOT require a restart.

(2) Install the appropriate version of the FluorineFx package OR whichever library that is causing the issue.

(3) Go to Control Panel > Administrative Tools > .NET Framework 2.0 Configuration > “Manage the Assembly Cache” > “View List of Assemblies in the Assembly Cache”.

(4) Right-click “Assembly Cache” in the left column and select “Add…”.

(5) Browse to the newly installed DLL. If you try to reference the DLL that is in your application you may run into issues.

In the case of FluorineFx, the default path is “C:\Program Files\FluorineFx\Bin\net\3.5\FluorineFx.dll”

With the DLL added to the GAC you should be good to go!

No comments

ActionScript Message Format Presentation

A few weeks back I gave a presentation at the Central Pennsylvania Flash User Group (CPFUG) on the ActionScript Message Format, or AMF. Below is a screen capture of the presentation along with audio. You can also download a higher quality 800×600 version here.

Adobe Flash Player version 9 or higher is required.

4 comments

Using the FluorineFx AMF3 package to communicate with Flex.

Problem

Utilizing SOAP web services to communicate with Flex has many benefits, but it’s slow. Using custom XML can be light-weight, but it’s not standard. What is the best route for someone using ASP.NET?

Source

ASP.NET and Flex Source Code [1.8 MB]

Explanation

Instead of using SOAP or your own custom XML solution, I recommend giving AMF a try. Visit http://osflash.org/documentation/amf.

Read more

9 comments

AMF versus SOAP

AMF Logo

What is AMF?

AMF is a binary format based loosely on the Simple Object Access Protocol (SOAP). It is used primarily to exchange data between an Adobe Flash application and a database, using a Remote Procedure Call.

Each AMF message contains a body which holds the error or response, which will be expressed as an ActionScript Object.

AMF was introduced with Flash Player 6, and this version is referred to as AMF 0. It was unchanged until the release of Flash Player 9 and ActionScript 3.0, when new data types and language features prompted an update, called AMF 3.

Why AMF over SOAP?

Though SOAP has become the standard for web services across the web, there are various alternatives. My full-time employer, andCulture, gave me the task of researching alternatives to SOAP for improvement of current and future client-side web applications utilizing the flash platform.

Having had previous experience with many different approaches to flex/flash remoting, I immediately turned to AMF. To make the point clear, I whipped up a quick Flex application that handled requests from two different web services. The first webservice was an ASP.NET SOAP Webservice and the second was an ASP.NET AMF3 Webservice. Each service utilized the same methods and value objects/descriptors. The results were dramatic!

AMF versus SOAP

* Take note of the payload size of AMF and SOAP at a descriptor count of 140.

How do I get started with AMF?

Being a PHP developer at heart, I have extensive experience with the AMFPHP project. From the removal of the method table to the addition of the flex service browser, the AMFPHP package is light-weight and has little overhead. At the same time, being that Adobe has moved toward Zend as the standard for AMF, the AMFPHP project has since died (R.I.P.).

Keeping AMFPHP in mind, I did research into ASP.NET solutions for AMF flash/flex remoting. After looking over the various options, I found the FluorineFx package.


FluorineFx

The FluorineFx package is an ASP.NET library for .NET 1.1, 2.0, 3.5, and Mono 1.2.4 for Flex, Flash, and Silverlight Remoting. This package combines my favorite aspects of AMFPHP, previously mentioned, and ASP.NET/Visual Studio. Here are a few highlights:

1. Flex Service browser - If included, you can simply use http://www.your-domain.com/website/Fluorine.aspx and browse your existing services, generate code, and test methods.

2. AMF0 and AMF3 support - Fluorine supports both the new actionscript 3 format and legacy formats of AMF.

3. Upcoming Flex Visual Studio wrapper - Yeah, I said it! They are developing a wrapper for VS that will enable recognition of flex projects in VS!

4. Code generation templates - The 1.0.0.15 release of FluorineFx (installed via setup.exe found on site) includes a few templates for generation of cairngorm templates and general code for the foundation of your flash projects. The version found in SVN contains support for extension of these templates (http://code.google.com/p/fluorinefx/).

Note: If you attempt to build from source, make sure to generate and assign new keys to the appropriate projects (ex. fluorine.snk).

5. New project types for Visual Studio - After installing FluorineFx, you will find new project types in your Visual Studio interface. Similar to the current workflow for SOAP services in VS.

There are many other features offered by the FluorineFx library and I encourage you to head on over to FluorineFx.com!

1 comment

ASP.NET Network BIOS command limit

October 17th, 2008 | Category: ASP.NET, Events, Visual Studio, Workflow

Today I experienced quite the issue with my ASP.NET development environment. I have been using a virtualized instance of Windows XP Pro with VMWare/Parallels for quite some time now without any issues. Apparently, none of my previous experiences has quite the same amount of files and directories as my latest project. While developing some ASP.NET 2.0 SOAP web services I began to receive the following error in Visual Studio 2008:

An error occurred loading a configuration file: Failed to start monitoring changes to ‘[…]’ because the network BIOS command limit has been reached. For more information on this error, please refer to Microsoft knowledge base article 810886. Hosting on a UNC share is not supported for the Windows XP Platform.

After the typical procedure of restarting Visual Studio and restarting IIS I was out of luck. I tried to by pass the error being that it really had nothing to do with what I was doing. Finally, after quite a lengthy conversation with Sir. Google, I found a solution. Not the most elegant solution, but a solution nonetheless. Heck, what solution is elegant when developing on Windows? I digress…

Anyway, without wasting any more time that you probably have wasted with this issue, here is the fix.

You need to add an additional registry key:
Add the following DWORD value at the following registry key:

HKLM\Software\Microsoft\ASP.NET\FCNMode

The following table lists possible values for the FCNMode DWORD value and the behavior that is associated with each value.

Value Behavior Does not exist This is the default behavior. For each subdirectory, the application will create an object that will monitor the subdirectory.

0 or greater than 2 This is the default behavior. For each subdirectory, the application will create an object that will monitor the subdirectory.

1 The application will disable File Change Notifications (FCNs).

2 The application will create one object to monitor the main directory. The application will use this object to monitor each subdirectory.

I recommend setting the value to 1, to disable the FCN. This is what is causing the error when you try to use the debugger.

Finally, after applying the registry changes, don’t forget to restart your Visual Studio. Good luck!

3 comments

google

google

asus