I'm not sure about NSUrlConnection (I'd assume so, it does everything else!), but look into the CookieContainer* class in .NET if you use the ImageLoader stuff - you make one (for your app), and reuse it, and any requests which get cookies (or need them) store it there.
* how hard did they resist calling it CookieJar???? On Thu, Nov 29, 2012 at 2:23 PM, Dennis Welu <[email protected]> wrote: > Timely question and answer, thanks to you both. Recently I've used this > UIWebImageView class > <https://github.com/escoz/monotouch-controls/blob/master/UICatalog/UIWebImageView.cs> > . Problem was I needed to load the image from an https service and pass in > an aspnet forms auth cookie in the request header. So I ended up modifying > the code further, essentially passing in a delegate that did the actual > loading, which defeated much of the class value. Not a good solution. So now > I'm back revisiting the issue to get it right, and to make sure images are > cached locally, etc. I ran across ImageLoader since then and was going to > look at that as an alternative, but it doesn't appear to deal with passing a > cookie along either, correct? In a web browser context the cookie just rides > along with ajax requests but I'm not sure if there is equivalent way to > store the cookie so that calling through NSUrlConnection will automatically > pick it up? Any thoughts here appreciated. > > > > > -- > View this message in context: > http://monotouch.2284126.n4.nabble.com/Load-images-and-store-locally-tp4657738p4657747.html > Sent from the MonoTouch mailing list archive at Nabble.com. > _______________________________________________ > 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 _______________________________________________ MonoTouch mailing list [email protected] http://lists.ximian.com/mailman/listinfo/monotouch
