• 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.
  • Posts

    • I do not use the AdGuard extension. I have uninstalled both the uBlock and Stylus extensions, as well as the Tampermonkey extension, since I began using AdGuard for Windows 7 months ago. It does not use any extension APIs, it modifies traffic system wide using a local proxy. AdGuard performs all the functions of uBlock, as well as additional features such as HTTPS filtering, cosmetic (user scripts and user styles), as well as DNS. It works with any browser and application. I don't understand why you consider the desktop program to be useless...
    • Should Google be forced to stop promoting Chrome over other browsers? Google pushes Chrome to anyone visiting its website using browsers other than Chrome.
    • Save 31% on Samsung T7 Portable SSD by Taras Buria During the ongoing memory crisis, where RAM and storage get extremely expensive, it is hard to find a good deal on an internal or portable SSD. While we are far away from 2024 prices, Samsung is currently offering a big discount on its 1TB T7 Portable SSD, saving you 31% or $85. The discount applies to the 1TB variant, which, although not record-breaking, is still plenty for all sorts of data. The drive uses a USB-C port for universal compatibility and high-speed data transfer of up to 1,050 megabytes per second. Samsung claims this drive is nearly ten times faster than a conventional hard drive, plus you get all the benefits of solid-state memory, such as better drop and shock resistance. There is also the ability to password-protect the drive, and you get extra peace of mind with a limited three-year warranty. The Samsung T7 Portable SSD works with all modern computers and tablets, including iPhones, iPads, Android smartphones, and more. And thanks to the two bundled USB cables (Type-C and Type-A), you can use the T7 even with devices that lack USB Type-C ports. The T7 Portable is available in three colors and four storage configurations, but unfortunately, only the 1TB Titan Gray is discounted: 1TB Samsung T7 Portable SSD - $189.98 | 31% off on Amazon This Amazon deal is US-specific and not available in other regions unless specified. This is a first-party seller link (at the time of article publishing); ensure that you also purchase from a first-party seller link only. If you don't like it or want to look at more options, check out the previous deals that we have covered, OR you can also visit Amazon US deals page. Get Prime (SNAP), Prime Video, Audible Plus or Kindle / Music Unlimited. Free for 30 days. As an Amazon Associate, we earn from qualifying purchases.
    • Plenty of nations have risen from the ashes of war and today they have high standards of living. Maybe the problem is that your government is run by corrupt and power hungry terrorist organizations that keep the country in the **** because all they care about is filling up their pockets and maintaining their power instead of actually managing the country for the benefit of everyone. Just ask Russians, North Koreans, Iranians, Cubans, Venezuelans and Nicaraguans, etc.
    • My macbook pro is an intel from 2019... I am good with MacOS 26 for at least three years and then will swap the OS for Linux or Windows on it.
  • Recent Achievements

    • Week One Done
      rubentuben8 earned a badge
      Week One Done
    • Week One Done
      ARaclen earned a badge
      Week One Done
    • One Year In
      jojodbn earned a badge
      One Year In
    • One Month Later
      jojodbn earned a badge
      One Month Later
    • Week One Done
      jojodbn earned a badge
      Week One Done
  • Popular Contributors

    1. 1
      +primortal
      525
    2. 2
      PsYcHoKiLLa
      232
    3. 3
      +Edouard
      132
    4. 4
      ATLien_0
      88
    5. 5
      Steven P.
      83
  • Tell a friend

    Love Neowin? Tell a friend!