• 0

C# Windows Store: Missing function


Question

Hello gang,

I am converting an app to a Windows Store app, and the ".GetResponse" function is not available from the System.Net.WebRequest object. I'm sure this is something stupid, and all references show that this is available for Windows Store apps. Any clue what I am doing wrong?


string sURL = "http://iplocationtools.com/index.html";
WebRequest rssReq = WebRequest.Create(sURL);
WebResponse rep = rssReq.[b]GetResponse()[/b];
Stream remoteStream = default(Stream);
StreamReader readStream = default(StreamReader);
[/CODE]

Link to comment
https://www.neowin.net/forum/topic/1155876-c-windows-store-missing-function/
Share on other sites

1 answer to this question

Recommended Posts

  • 0

The members page for the class shows it's not available for Windows Store apps. You should probably use GetResponseAsync instead. As a general rule, synchronous calls that can take an arbitrary amount of time to complete (i.e. network, database calls) have been obsoleted and replaced with asynchronous versions for Windows Store apps. The point is to help developers produce more responsive applications (it's all about Fast and FluidTM :p)

This topic is now closed to further replies.