Friday, September 19, 2008

Accessing web services from swf – never use virtual directories

Today I learned something, as usual the hard way :-(

We were deploying a “dynamic banner” developed in flash, and we were already late: this banner is going to access a web service (that we developed, .Net 2.0, Sql server-based) every time is loaded in a web page.

Now, to keep things easy, I decided to deploy the web service in a virtual directory in the production servers, such avoiding the need of updating DNS etc etc (the domain is maintained elsewhere, we are only host for this initiative).

Then when we switched in the production environment, the banner loaded from other domains… simply did not call anything but the web service WSDL.

After one “panic hour” without understanding where the problem was, and modifying in every known way the crossdomain.xml file, it came to my mind that maybe the problem was the virtual directory.

We moved as fast as possible everything in a new domain by itself and – MAGIC – now everything works.

So when dealing with swf that need to access server resources – never use virtual directories!!!


No comments: