How to test Vkontakte application with local WS? - apache-flex

I've developed a Vkontakte application by using Adobe Flex technology with WCF as my server side. The whole thing works perfectly on localhost, but after uploading it to Vkontakte - the WS doesn't seem to work and I get this error:
faultCode:Channel.Security.Error faultString:'Security error accessing url' faultDetail:'Destination: DefaultHTTP'
How can I solve this problem? How can I test my application on Vkontakte while the WS are still referring to localhost?

It appears that I should have used the crossdomain.xml file to enable the flash file to interact with outside domains.

Related

ASP.Net SignalR: http://127.0.0.1/signalr/hubs (404 Not found) when accessed from different application

I have created a simple chat application following the Getting Started With SignalR URL. When I run and test the program it is working wonderfully fine.
I tried to create a simple client out of this application with a simple HTML and required SignalR.JS package installed as instructed in the second part of Self Hosting SignalR the article where a html and set of JS files try to access the chat application hosted in IIS (one developed following the Getting Started URL.
I am getting the signalr/hubs 404 Not Found error when firebug is used to trace and is not working. Can someone please help me understand what change we need to do to get the chat server working from the JavaScript (and any other) client application.
My chat server is hosted in my IIS as srserver (virtual directory) and the client again is hosted in IIS as srclient (virtual directory) . It is not Cross domain but still not able to get this working.
I had similar problem , that i was missing in the auto generated hubs js (visual studio generates it automatically but when in production environment i had to place it there)
you can generate it using the following command, and than place in the production environment :
signalr ghp /path:[path to the .dll that contains your Hub class]
follow the full instrutinos here

Changing Web Service from Localhost to Server

I've got a small WCF service I've created.
I can edit it and get it working great on the localhost, but my PC is not where this application is going to be run from. It is going to run on our Server.
However, every time I try making any kind of change to the project that points it to our server, the entire project goes to crap: I can no longer view the project in a browser and my test console application can not connect to it. I try changing it back to using the local IIS web server, but then the local machine does not start up IIS whenever the project is started so it doesn't work either.
I can debug and troubleshoot for a day or so to get it working again on the local machine, but then I'm back to Square 1 where I need to deploy my application onto our Server.
This is freakin' maddening!
My project works, but I can't seem to get it from Localhost to a real Server.
All the examples I find online show how to do this using Localhost. Does no one ever deploy their projects?
Where is the Guide for getting me from Development stage to Deploy?
Some nice tutorials here
http://www.dotnetspider.com/forum/193466-Deploy-Wcf-service-IIS.aspx
http://wcftutorial.net/WCF-IIS-Hosting.aspx
also on SO Deploy WCF Service to IIS when it only has an App.config
Also a video on youtube http://www.youtube.com/watch?v=mX8quq7MoeI

Flex app not hitting web service

I have zero knowledge on flex and need help to determine what is preventing my web service from being called.
We have a working application in production and the developer who wrote it has left.
I am trying to build it on my machine and I can see a web service call in fiddler being made with the URL "/Services.asmx/MethodName" (as a GET request).
I have set my break point in the asmx web service and it is not being hit. All I get in the flex front end is a pop up with " The remote server failed to respond and may be offline. http://MachineName/Services.asmx/MethodName"
The web service is in the same application as the web app that hosts the SWF file.
I have the cross domain policy file in place.
What I noticed in fiddler is the URL is "/Services.asmx/MethodName" and not "/WebApp/Services.asmx/MethodName" (not sure if this makes a difference) where WebApp is the IIS virtual directory to the web application that hosts the SWF.
Any ideas?
JD
If you are Web-services and your web-application is same domain then just pass the whole path like "http://..../Services.asmx" for creating web-service api instance in ActionScript 3.0 (for flex). and use this instance name to call your web-service method.
Please read this article from Adobe help for your perfect answer

Silverlight failing with Cross Domain Error

I have an application that is built using ASP.NET, with an embedded Silverlight Object that communicates with a WCF back end. It is set up like so:
Server 1: Hosts ASP.NET Website on IIS7
Server 2: Hosts WCF Application on IIS7
My Machine will try to access Server 1 over the internet to log in to the website. Server 1 will the authenticate the user using the WCF Web Service over our internal network on Server 2. I can do this but when it loads the silverlight object it crashes, complaining about CrossDomain/ClientAccessPolicy failure. So to be sure I put those two files on every folder in the inetpub/wwwroot on both Server 1 and 2, just to be sure. But I am still getting the same error.
When I run the application from Server 1, it can connect to the site through its local network IP and it all works, it also works when I run the ASP.NET application from Visual Studio 2010 on my own machine, with the web service references pointing to Server 2.
I am almost at my wits end, there have been so many red herrings that I have tried and none have worked. I am not even sure if it is Silverlight/WCF or the IIS configuration on each server that is breaking it.
If anyone can help me shed some light on this I would greatly appreciate it.
Thanks,
Stuart.
one idea could be to use fiddler and find the request which is making crossdomainpolicy xml request. Is that failing? Check the address it is pointing to. I debugged my issue using that. It was pointing to root of the server and my crossdomainpolicy xml was in WCF project folder.
I found the issue to my problem. I was not realising that the Silverlight application was trying to access a web service that was restricted by firewalls, so I had to create another web service that would re-route through the website and to the original web service.
What a bloomin' pain!

Cannot access SOAP service when Flex 3 app is compiled

I've got a flex app that hits a remote SOAP service and populates a list with the results.
It works fine when i run it through flex builder, but when i compile the application and move it onto a webserver it can't access the services.
I've tried it from a standalone webserver and on my own machine. I'm assuming that there's a security issue that i've missed as i can't think of any other reason why it's ok in flex builder but not when compiled on the same box.
Thanks all.
Is it a crossdomain.xml issue?
The web server running the SOAP service needs crossdomain.xml file to allow your flash movie to access it. See http://www.adobe.com/devnet/articles/crossdomain_policy_file_spec.html

Resources