|
|
 Rank: Administration Groups: Administration
Joined: 8/21/2006 Posts: 1,607 Points: 4,082 Location: Frisco, TX
|
Hey guys, I know many of you run into the "Send Failed" problem. Specifically, the problem seems to appear once you start migrating WebORB into a remote setup, although for some it could occur locally as well. One of the main reasons why Send Failed may occur is incorrect URL the client uses to send remoting requests. What is an "incorrect" URL for a remoting call? From the Flex client perspective it is a URL resulting in 404. Before I delve into the details for diagnosing and fixing the problem, I believe it is important to explain how a Flex client gets wired-up with a URL for the remoting backend (WebORB for PHP in our case): When you compile a Flex Project, you include a reference to services-config.xml in the additional compiler arguments. If you're not doing it, then either you configure your remote object programmatically, or the problem will start right there. Let's assume you do have a reference to services-config.xml, which should look like this: Code:-services /full/path/to/Weborb/WEB-INF/flex/services-config.xml services-config.xml is an important file. It defines channels used by the client application. Every channel has an endpoint URI. It is the URL the client will send remoting requests to. For instance, take a look at the following channel definition: The endpoint's uri attribute contains "weborb.php". It does not look like a URL, but it is. In fact it is a relative URL. If your flex application is loaded from http://foobar.com/myapp, then the Flex client will send remoting requests to http://foobar.com/myapp/weborb.php. As a result, it is important to place weborb.php file into the same directory where your SWF resides AND adjust the path to the /Weborb folder from the product distribution inside of weborb.php. How does Flex client know what channel and this URI to use for a particular remote object? The answer is in another configuration file - remoting-config.xml which is referenced from services-config.xml. At the top of remoting-config.xml you will see the following configuration: As you can see, there are three channels listed in there (my-rtmp is not really needed, so we'll take it out in the next release). The channels are listed as "default channels", therefore they apply to all the destinations in the same file where there's no explicit channel definition. Your Flex client will use the destinations defined in remoting-config. A destination will either use a channel explicitly defined in the channel or will go down the list of the default channels. As a result, suppose you invoke a method via the GenericDestination. Flex client will attempt to use the URI from the my-amf channel first, if it fails, it will try the URI from the my-rtmp channel and if that fails, it will attempt to send the request to the URI from the my-amf-absolute channel. If all of them fail, you will get the dreaded "Send Failed" message. Now that you know what's going on behind the curtains, I will share a few pointers on diagnosing the problem. First and foremost you need to figure out what URL the client is sending the requests to. We released a product that will make it significantly easier to debug this kind of problems- RIA AppPuncher. AppPuncher will run side-by-side with the browser hosting your Flex client and register itself as a proxy server. Not only it lets you see the URLs where the requests are sent to, but you can also inspect the data in the AMF requests and responses. There's a detailed write-up on my blog at the following URL: http://www.themidnightcoders.com/blog/2009/01/apppuncher-clientserver-debugging.html. If you're getting the "Send Failed" error, run AppPuncher and check where the error occurs in the client/server exchange. Odds are it will be because of missing weborb.php in the right place. There are probably a few other oddball scenarios which I cannot think of at the moment. Hopefully this thread will grow to provide additional information. Cheers, Mark
Mark Piller Midnight Coders, Inc. twitter: midnightcoderblog: blog.themidnightcoders.comwebsite: www.themidnightcoders.com
|
|
Rank: Apprentice Coder Groups: Member
Joined: 7/11/2007 Posts: 11 Points: 18 Location: Quezon City, Philippines
|
Hi Mark,
What do i need to configure in Weborb for PHP to work with in AIR?
Thanks
|
|
Rank: Apprentice Coder Groups: Member
Joined: 10/22/2007 Posts: 19 Points: 24
|
Hi Mark. I have spent the past year developing an application in Flex for weborb 3 .NET. Everything works fine locally but when I deploy the solution to a hosted server I get the famous "send failed" error. I have spent the last 3 hours searching online for a solution and i can not find any salvation. Please help me. Can you please at least point me in the right direction? Thank you in advance.
|
|
 Rank: Administration Groups: Administration
Joined: 8/21/2006 Posts: 1,607 Points: 4,082 Location: Frisco, TX
|
Have you checked with AppPuncher what URL your Flex client sends requests to?
Mark Piller Midnight Coders, Inc. twitter: midnightcoderblog: blog.themidnightcoders.comwebsite: www.themidnightcoders.com
|
|
Rank: Apprentice Coder Groups: Member
Joined: 10/22/2007 Posts: 19 Points: 24
|
Hey there "the guy" and thank you once again for your swift reply. No I did not try to use AppPuncher yet but I am doing so right now. Also 1 note: I did notice with Firebug (firefox plugin) that the swf client was trying to look for weborb.aspx inside of my flex application folder (http://mydomain/weborb30/myapp/weborb.aspx) rather than in the weborb installation folder (http://mydomain/weborb30/weborb.aspx) and returns a 404 error. Also when I try to navigate to http://mydomain/weborb30/weborb.aspx I receive a 404 error. I think that i have configured my weborb.config files correctly according to the docs but then again the docs seem to imply that I need to add a whole new configuration node set rather than just appending the node set (which I did). At any rate I will try now with the RIAAppPuncher and I will report back. Thanks again sooo much.
|
|
Rank: Apprentice Coder Groups: Member
Joined: 10/22/2007 Posts: 19 Points: 24
|
After reviewing the deploy instructions for the 100th time I finally realized that I would need to edit the web.config and not the weborb.config file in the target virtual directory (which I assume to be the weborb directory on the remote server). Since there was not a web.config there I copied the file from my local weborb installation to the remote location and made the changes as instructed. Now when I try to navigate to http://mydomain.com/weborb30/weborb.aspx I receive this error: HTTP Error 500.23 - Internal Server Error An ASP.NET setting has been detected that does not apply in Integrated managed pipeline mode. Not sure where to go now but I will still move ahead with RiaAppPuncher. Thanks again. File Attachment(s):
error500.23.bmp (3,853kb) downloaded 33 time(s).
|
|
 Rank: Administration Groups: Administration
Joined: 8/21/2006 Posts: 1,607 Points: 4,082 Location: Frisco, TX
|
If you get return code 500 from the server, there is a problem with the server/ASP.NET configuration or setup. It would not be a problem with WebORB per se. You could also try running diagnostics using the following URLs: http://mydomain.com/weborb30/diagnostics.aspxhttp://mydomain.com/weborb30/weborb.aspx?diagif you could attach screenshots of the error you're getting, I'd be happy to look into it further. Mark
Mark Piller Midnight Coders, Inc. twitter: midnightcoderblog: blog.themidnightcoders.comwebsite: www.themidnightcoders.com
|
|
Rank: Apprentice Coder Groups: Member
Joined: 10/22/2007 Posts: 19 Points: 24
|
Thanks Mark. The error I get back is 500.23 which according to Microsoft: "500.23 - An ASP.NET httpHandlers configuration does not apply in Managed Pipeline mode" The application server that I am trying to migrate to is IIS 7.5. Does this make a difference in the way that I need to edit the web.config file?
I have attached a screenshot of the error. I get the same error when I try to request diagnostics.aspx.
|
|
 Rank: Administration Groups: Administration
Joined: 8/21/2006 Posts: 1,607 Points: 4,082 Location: Frisco, TX
|
Please take a look at the section on that error page titled "Things to try". In my experience the suggestion they give usually works. Let me know if that does the trick for you. Regards, Mark
Mark Piller Midnight Coders, Inc. twitter: midnightcoderblog: blog.themidnightcoders.comwebsite: www.themidnightcoders.com
|
|
Rank: Apprentice Coder Groups: Member
Joined: 10/22/2007 Posts: 19 Points: 24
|
|
|
 Rank: Administration Groups: Administration
Joined: 8/21/2006 Posts: 1,607 Points: 4,082 Location: Frisco, TX
|
Could you post a few screenshots of your system configuration? Specifically the following: 1. file system setup: show where weborb and your application is installed (with all the folders expanded) 2. your IIS apppool setup screen Thanks, Mark
Mark Piller Midnight Coders, Inc. twitter: midnightcoderblog: blog.themidnightcoders.comwebsite: www.themidnightcoders.com
|
|
Rank: Apprentice Coder Groups: Member
Joined: 10/22/2007 Posts: 19 Points: 24
|
Mark thanks for your time. I have attached the files as requested. Thank you again.
|
|
 Rank: Administration Groups: Administration
Joined: 8/21/2006 Posts: 1,607 Points: 4,082 Location: Frisco, TX
|
Your web.config looks like a mess. Can you use the one installed by the weborb installer? If you could put it there and post a en external http link to you app here, it would be a good way to restart the diagnostics process. Btw, the problems you're experiencing are related to the basic ASP.NET/IIS setup and really have nothing to do with WebORB... Mark
Mark Piller Midnight Coders, Inc. twitter: midnightcoderblog: blog.themidnightcoders.comwebsite: www.themidnightcoders.com
|
|
Rank: Newbie Coder Groups: Member
Joined: 7/14/2010 Posts: 4 Points: 12 Location: Estonia
|
HI Mark The code blocks in first post, are empty :(
|
|
 Rank: Apprentice Coder Groups: Member
Joined: 3/30/2010 Posts: 54 Points: 156 Location: California
|
|
|
 Rank: Administration Groups: Administration
Joined: 8/21/2006 Posts: 1,607 Points: 4,082 Location: Frisco, TX
|
Do you get anything back in the response?
Mark Piller Midnight Coders, Inc. twitter: midnightcoderblog: blog.themidnightcoders.comwebsite: www.themidnightcoders.com
|
|
 Rank: Apprentice Coder Groups: Member
Joined: 3/30/2010 Posts: 54 Points: 156 Location: California
|
No, I don't!
|
|
 Rank: Administration Groups: Administration
Joined: 8/21/2006 Posts: 1,607 Points: 4,082 Location: Frisco, TX
|
What do you see when you load http://localhost/your-path-to-weborb/weborb.php in a browser?
Mark Piller Midnight Coders, Inc. twitter: midnightcoderblog: blog.themidnightcoders.comwebsite: www.themidnightcoders.com
|
|
 Rank: Apprentice Coder Groups: Member
Joined: 3/30/2010 Posts: 54 Points: 156 Location: California
|
It says:
WebORB v3.6.0
|
|
 Rank: Administration Groups: Administration
Joined: 8/21/2006 Posts: 1,607 Points: 4,082 Location: Frisco, TX
|
Does your Flex client send requests to the same URL you opened in a browser? If not, make sure it does by adjusting endpoint URI in WEB-INF/flex/services-config.xml
Mark Piller Midnight Coders, Inc. twitter: midnightcoderblog: blog.themidnightcoders.comwebsite: www.themidnightcoders.com
|
|
|
Guest |