Welcome Guest Search | Active Topics | Members | Log In | Register

Diagnosing Send Failed problems Options · View
Mark Piller
Posted: Tuesday, January 06, 2009 1:32:20 PM

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:

Code:

   
   
        false
   



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:
Code:

   
   
   

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: midnightcoder
blog: blog.themidnightcoders.com
website: www.themidnightcoders.com
dasaint_gray
Posted: Friday, May 15, 2009 10:25:49 PM
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
cassasm
Posted: Thursday, July 01, 2010 9:13:59 AM
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.
Mark Piller
Posted: Thursday, July 01, 2010 9:31:21 AM

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: midnightcoder
blog: blog.themidnightcoders.com
website: www.themidnightcoders.com
cassasm
Posted: Tuesday, July 06, 2010 10:25:17 AM
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.
cassasm
Posted: Tuesday, July 06, 2010 11:22:05 AM
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).


Mark Piller
Posted: Tuesday, July 06, 2010 11:26:34 AM

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.aspx
http://mydomain.com/weborb30/weborb.aspx?diag

if 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: midnightcoder
blog: blog.themidnightcoders.com
website: www.themidnightcoders.com
cassasm
Posted: Tuesday, July 06, 2010 12:38:13 PM
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.
Mark Piller
Posted: Tuesday, July 06, 2010 1:00:10 PM

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: midnightcoder
blog: blog.themidnightcoders.com
website: www.themidnightcoders.com
cassasm
Posted: Tuesday, July 06, 2010 3:30:19 PM
Rank: Apprentice Coder
Groups: Member

Joined: 10/22/2007
Posts: 19
Points: 24
Unfortunately I am not having any luck. As a matter of fact I have just been going in circles for the past few hours. When I update the config file as suggested, I receive this error " There is a duplicate 'system.webServer' section defined" but then when I remove the section definition I get this error "The configuration section 'system.webserver' cannot be read because it is missing a section declaration". Don't know where else to go here. Have read IIS7 docs and all SHOULD be fine with the config files. Lost.

File Attachment(s):
1st attempt.bmp (3,853kb) downloaded 24 time(s).
web.txt (8kb) downloaded 27 time(s).
file_structure.bmp (3,853kb) downloaded 21 time(s).
file_structure_expand.bmp (3,853kb) downloaded 20 time(s).

cassasm attached the following image(s):
.net settings.JPG

Mark Piller
Posted: Tuesday, July 06, 2010 3:56:55 PM

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: midnightcoder
blog: blog.themidnightcoders.com
website: www.themidnightcoders.com
cassasm
Posted: Tuesday, July 06, 2010 4:22:52 PM
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.
Mark Piller
Posted: Tuesday, July 06, 2010 7:34:33 PM

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: midnightcoder
blog: blog.themidnightcoders.com
website: www.themidnightcoders.com
elektron
Posted: Friday, July 16, 2010 12:44:15 AM
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 :(
salcos
Posted: Wednesday, December 22, 2010 9:15:25 AM

Rank: Apprentice Coder
Groups: Member

Joined: 3/30/2010
Posts: 54
Points: 156
Location: California
Mark Piller
Posted: Wednesday, December 22, 2010 11:34:47 AM

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: midnightcoder
blog: blog.themidnightcoders.com
website: www.themidnightcoders.com
salcos
Posted: Wednesday, December 22, 2010 4:30:00 PM

Rank: Apprentice Coder
Groups: Member

Joined: 3/30/2010
Posts: 54
Points: 156
Location: California
No, I don't!
Mark Piller
Posted: Wednesday, December 22, 2010 6:11:23 PM

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: midnightcoder
blog: blog.themidnightcoders.com
website: www.themidnightcoders.com
salcos
Posted: Wednesday, December 22, 2010 9:20:01 PM

Rank: Apprentice Coder
Groups: Member

Joined: 3/30/2010
Posts: 54
Points: 156
Location: California
It says:

WebORB v3.6.0
Mark Piller
Posted: Wednesday, December 22, 2010 10:33:28 PM

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: midnightcoder
blog: blog.themidnightcoders.com
website: www.themidnightcoders.com
Users browsing this topic
Guest


Forum Jump
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.

Main Forum RSS : RSS

YAFVision Theme Created by Jaben Cargman (Tiny Gecko)
Powered by Yet Another Forum.net version 1.9.1.8 (NET v2.0) - 3/29/2008
Copyright © 2003-2008 Yet Another Forum.net. All rights reserved.
This page was generated in 0.301 seconds.