YES! That is exactly my issue. Is that in a shipping build of MT? If so, which one? Might also explain why I've not had errors back from users on this one for a while :)
Thanks Jeff! On Wed, Nov 28, 2012 at 11:41 PM, Jeff Stedfast <[email protected]> wrote: > Hi Nic, > > That sounds a lot like this bug: > https://bugzilla.xamarin.com/show_bug.cgi?id=7599 > > Jeff > > On Wed, Nov 28, 2012 at 11:20 AM, Nic Wise <[email protected]> wrote: >> >> ... if anyone happens to be looking into the MT proxy code: >> >> If I set a proxy (using the iOS one, usually, but I think it happens >> if I do it in code too), then: >> >> GET https://api.dropbox.com etc (this works) >> >> GET https://api.someoneelse.com (this doesn't work - it calls >> api.dropbox.com and passes the url / query string for this request) >> >> needless to say, api.someoneelse.com doesn't understand dropbox api >> calls... >> >> I thought it was just RestSharp, as I can't repro consistently without >> using it, but I also can't see how RS would be doing it.... makes no >> sense. >> >> My answer has always been "dont use a proxy. Or Onavo". Lucky most >> people dont' use them. >> >> >> >> >> On Wed, Nov 28, 2012 at 3:56 PM, Robert Reck <[email protected]> wrote: >> > I had something similar happen very recently. I was pulling data from a >> > public US Government web service that did not require credentials, but I >> > was >> > getting the same type of proxy 407 error. My issue turned out to be related >> > to a profile that was installed on my phone by another app (not mine). Even >> > though I had uninstalled the app and tried to remove the profile >> > previously, >> > it was still stuck on there somehow and not visible when looking in the >> > profile section. I found it by pure luck when I re-installed the app in >> > question and noticed that it thought the profile was still installed. I >> > forced a re-install and then removed it successfully and my 407 errors >> > ended. >> > >> > Not sure if this is your problem too, but I figured I'd mention it just >> > in case. >> > Bob >> > >> > >> > -----Original Message----- >> > From: [email protected] >> > [mailto:[email protected]] On Behalf Of Jeffrey Stedfast >> > Sent: Wednesday, November 28, 2012 10:50 AM >> > To: Brad Moore >> > Cc: [email protected] >> > Subject: Re: [MonoTouch] Auto network credentials >> > >> > Hi Brad, >> > >> > This could just be a bug in MonoTouch. I'll try to look into this as >> > soon as I can. You've submitted a bug report to bug ills already, right? >> > (Pretty sure I saw one recently filed on this) >> > >> > Jeff >> > >> > Sent from my iPhone >> > >> > On Nov 26, 2012, at 2:25 AM, Brad Moore <[email protected]> wrote: >> > >> >> Hey >> >> Trying to load some data off my server (xml data). I normally just use >> >> HttpWebRequest as I can set the utomaticDecompression to >> >> DecompressionMethods.GZip | DecompressionMethods.Deflate in order to use >> >> gzip compression of my data automatically. >> >> >> >> Recently a client has emailed me saying that it does not work from >> >> within his school. Sent out another copy of the app to him via >> >> TestFlightApp >> >> to get more debugging info from him and the app responds with a 407 auth >> >> error. Since then I have set up a proxy on my computer which I redirect my >> >> iPhone traffic through to test on. >> >> >> >> My original setup was like so, >> >> >> >> HttpWebRequest request = (HttpWebRequest)WebRequest.Create(_url); >> >> request.CachePolicy = new >> >> HttpRequestCachePolicy(HttpRequestCacheLevel.NoCacheNoStore); >> >> request.Proxy = null; >> >> request.AutomaticDecompression = DecompressionMethods.GZip | >> >> DecompressionMethods.Deflate; WebResponse response = >> >> request.GetResponse(); >> >> >> >> and then so on from there. >> >> >> >> I'd set Proxy to null because in most cases the user would not be >> >> behind a proxy and this cut off 1-2 seconds of proxy resolving. There is >> >> code later to catch this and then re-create the HttpWebRequest but by not >> >> nulling the proxy, which I thought would be default proxy. Apparently not >> >> so... >> >> >> >> I tried to then get the default proxy settings of the device. >> >> >> >> CFProxySettings proxy0 = CFNetwork.GetSystemProxySettings(); >> >> IWebProxy proxy1 = WebRequest.GetSystemWebProxy(); IWebProxy proxy2 = >> >> HttpWebRequest.DefaultWebProxy; IWebProxy proxy3 = >> >> HttpWebRequest.GetSystemWebProxy(); >> >> IWebProxy proxy4 = CFNetwork.GetDefaultProxy(); >> >> >> >> proxy1 - proxy4 have null for the credentials. proxy0 contains proxy >> >> information which I need such as proxy url, port, username, but no >> >> password... >> >> >> >> I manually made a WebProxy with my credentials >> >> >> >> WebProxy webProxy = new WebProxy(proxy0.HTTPProxy, proxy0.HTTPPort); >> >> webProxy.Credentials = new NetworkCredential("user", "pass"); >> >> request.Proxy = webProxy; >> >> >> >> and this works. >> >> Falling short of requesting username and password for the proxy on a >> >> 407 error I am not sure what to do... >> >> WebClient downloads do not work, but UIWebView and MKMapView does >> >> auto-auth itself. >> >> >> >> Any ideas what I am missing? >> >> >> >> - Brad >> >> _______________________________________________ >> >> MonoTouch mailing list >> >> [email protected] >> >> http://lists.ximian.com/mailman/listinfo/monotouch >> > _______________________________________________ >> > MonoTouch mailing list >> > [email protected] >> > http://lists.ximian.com/mailman/listinfo/monotouch >> > _______________________________________________ >> > MonoTouch mailing list >> > [email protected] >> > http://lists.ximian.com/mailman/listinfo/monotouch >> >> >> >> -- >> Nic Wise >> t. +44 7788 592 806 | @fastchicken | http://www.linkedin.com/in/nicwise >> b. http://www.fastchicken.co.nz/ >> >> mobileAgent (for FreeAgent): get your accounts in your pocket. >> http://goo.gl/IuBU >> Trip Wallet: Keep track of your budget on the go: http://goo.gl/ePhKa >> Earnest: Self-employed? Track your business expenses and income. >> http://earnestapp.com >> Nearest Bus: find when the next bus is coming to your stop. >> http://goo.gl/Vcz1p >> London Bike App: Find the nearest Boris Bike, and get riding! >> http://goo.gl/Icp2 > > -- Nic Wise t. +44 7788 592 806 | @fastchicken | http://www.linkedin.com/in/nicwise b. http://www.fastchicken.co.nz/ mobileAgent (for FreeAgent): get your accounts in your pocket. http://goo.gl/IuBU Trip Wallet: Keep track of your budget on the go: http://goo.gl/ePhKa Earnest: Self-employed? Track your business expenses and income. http://earnestapp.com Nearest Bus: find when the next bus is coming to your stop. http://goo.gl/Vcz1p London Bike App: Find the nearest Boris Bike, and get riding! http://goo.gl/Icp2 _______________________________________________ MonoTouch mailing list [email protected] http://lists.ximian.com/mailman/listinfo/monotouch
