Q:

troubleshoot asp.net web app on iOS

I have a web app with asp.net mvc 5 on running on iis 7.5. I have a photo upload page that I made with DropZone (a javascript ajax upload plugin). In my asp.net controller during certain errors, I return an httpstatuscode of 500 with a status description with a descriptive error. DropZone then displays this descriptive error. Everything works as it should on desktop devices, however when used on an iOS device it displays a generic "Internal Server Error" message. 
I'm lost at how to troubleshoot this issue. I've placed javascript alerts throughout my javascript code to try and figure out what the issue is but that didn't reveal anything helpful. I've tried using the MIHTool ipad app and the HttpWatchBasic ipad app to try and set breakpoints but that was not helpful either. 
Is there a way to remotely debug an asp.net web app from an iPad? (I have visual studio 2013 premium) Or does anyone have any ideas what may be causing a different status code to be sent?
UPDATE: It appears that iOS devices ignore any custom xhr.statusText and uses the standard default statusText (i.e. code 500 is Internal Server Error). As a work around (which I hate doing, but since this is primarily for use on company iPads I didn't have much choice) I've returned a different 500 class code for each possible exception and then in the javascript code check the status code and assign my own custom error message in the javascript code. 

A:

Quickest and easiest way to see the actual exception is to turn off custom errors in your Web.config - you'll then be able to view the actual stacktrace on the iPad.
If you'd like to be able to debug the exception, you should be able to trigger it by accessing the site from the iPad by hitting your windows development machine while running in the debugger. You'll need to configure IIS express to allow remote connections (editing application host.config), adding a urlacl, and opening the Windows firewall if necessary. There are numerous guides in setting this up online.
If you want to actually debug the JS in mobile Safari, this is possible from the Mac version of Safari - see http://webdesign.tutsplus.com/articles/quick-tip-using-web-inspector-to-debug-mobile-safari--webdesign-8787 for details.

