FacebookNET - AjaxPostBacks and Debugging

Feb 27, 2008 at 2:08 AM
Have two questions:
1. Using VS2005 - Using IFRAME mode, EnableExternalBrowsing=False, App configuration (on facebook) to use IFRAME, http://localhost/fbapp/ being used as url in config, VS2005 | Debugging | StartupURL=http://localhost/fbapp etc..
Still unable to actually debug the application, I'm trying to debug some functions in FacebookApplication.cs - but no break points get hit - from trying to debug from within VS2005 - anyone able to-do this and how did they configure everything. I need to-do this because of #2.
2. I have an upload control on the page (FileUploaderAJAX):
a. When I use the Facebook Framework provided by Microsoft all is well, when I click the browse button I select a file and can upload - no problems.
b. When I use this framework, when I click the browse button and select a file - the IFRAME used by the uploadcontrol then holds the entire page, so I assume that when the Uploader performs a postback - this framework is doing something that then pushes the entire page back to the upload control instead of the binary data from the file (the entire page shows up in the textbox holder for the filename).

I could use option a, but the Redirect if the user is not logged in looks like crap (don't understand enough to fix it because when redirected, the login page is bigger than the IFRAME, is there a way to fix this?)

That and for a few other reasons, I really would like to use this frame work, does anyone have any ideas on how to deal with this postback? - I'm hoping that debugging would help me nail down the problem, but since I can't debug I'm hoping for some additional information.

Any help would be appreciated..
Thanks - Fruber.
Feb 27, 2008 at 5:53 PM

1. Using VS2005 - Using IFRAME mode, EnableExternalBrowsing=False, App configuration (on facebook) to use IFRAME, http://localhost/fbapp/ being used as url in config, VS2005 | Debugging | StartupURL=http://localhost/fbapp etc..
Still unable to actually debug the application, I'm trying to debug some functions in FacebookApplication.cs - but no break points get hit - from trying to debug from within VS2005 - anyone able to-do this and how did they configure everything. I need to-do this because of #2.


Are you using the vshost.exe for debugging or are you running it through IIS? I ask because vshost uses some obscure port numbers that would need to be put into Facebook's app configuration. My guess is that you are debugging using vshost but you also have IIS running with the app as well. So Facebook tells the browser to access the IIS instance and you're interacting with that but it's never going to the instance with debugging attached. Instead of "Debug > Start Debugging" use "Debug > Attach to Process" and then find your aspnet_wp.exe. Or add in the port number to your Facebook app settings. This is just a guess, but the symptoms you mention corroborate it.


2. I have an upload control on the page (FileUploaderAJAX):
a. When I use the Facebook Framework provided by Microsoft all is well, when I click the browse button I select a file and can upload - no problems.
b. When I use this framework, when I click the browse button and select a file - the IFRAME used by the uploadcontrol then holds the entire page, so I assume that when the Uploader performs a postback - this framework is doing something that then pushes the entire page back to the upload control instead of the binary data from the file (the entire page shows up in the textbox holder for the filename).

I could use option a, but the Redirect if the user is not logged in looks like crap (don't understand enough to fix it because when redirected, the login page is bigger than the IFRAME, is there a way to fix this?)

That and for a few other reasons, I really would like to use this frame work, does anyone have any ideas on how to deal with this postback? - I'm hoping that debugging would help me nail down the problem, but since I can't debug I'm hoping for some additional information.


I haven't tried using a file upload with the iframe and I'm not familiar with that particular control1, but I don't expect that there'd be trouble with it. In my experience, the Facebook.NET framework is transparent and hasn't affected anything I'd normally do in a Web app.

Bill

1. http://en.fileuploadajax.subgurim.net/ Is that the control you're using?
Feb 29, 2008 at 8:59 AM
Yes, that's the control I'm using.

I've at least gotten this to work with the latest build of the MS Control, but still no luck with this. I did notice that it also didn't work with the MS Control until I derived the _Default page from CanvasIFrameBasePage instead of Page. When using Page - same thing happened, but when using CanvasIFrameBasePage ,everything works fine with the MS Control.

Therefore I assume that it must be how the page_load and/or the http handlers are handling things. I'm going to have to dig deeper into the FacebookNET stuff and compare how it's handling the Page stuff (pre render and render etc) and compare notes. Apparent FacebookNet is not quite handling the postback from the upload control properly.

If anyone else can shed some light, that would be nice. Otherwise I'll continue my pursuit...

Fruber