Quantcast
Channel: Recent Threads — Xamarin Community Forums
Viewing all articles
Browse latest Browse all 204402

workaround for Mono bug 523151

$
0
0

Hi,

I am trying to do a webrequest and to get the response into a xmlReader. But, always my xmlreader throw a nullReference exception when I call : xmlreader.MoveToContent() . I verified the response received from my webrequest and it's ok: the response seems to have a content and the status of my response is "OK". I also verified the xmlReader content and it seems to have nothing!

There is my code :

var request = WebRequest.Create (MyUri);
                    using (var response = request.GetResponse ()) {
                        using (var stream = response.GetResponseStream ()) {
                            using (var reader = XmlReader.Create (stream)) {
                                // FIXME this is a workaround for Mono bug 523151
                                xmlreader.MoveToContent ();
                            }
                        }
                    }

I spent so much time on this problem without finding a solution! So if anybody can help me, i would appreciate it a lot!

Thanks!


Viewing all articles
Browse latest Browse all 204402

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>