Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8101231
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 5, 20262026-06-05T22:56:01+00:00 2026-06-05T22:56:01+00:00

Busy working on Visual Studio 2010 Express for Windows phone and is wanting to

  • 0

Busy working on Visual Studio 2010 Express for Windows phone and is wanting to call a servlet that returns json from one of my classes.

I have the following method so far:

public Login(string userName, string password){

   string servletUrl = "http://172.12.5.35:8080/SomeService/login?u="+userName+"&p="+password;
   HttpWebRequest request = (HttpWebRequest)WebRequest.Create(servletUrl);
   HttpWebResponse response = (HttpWebResponse)request.GetResponse();

}

But for some reason I get an error right by the “GetResponse()” method call saying that there is no such method? Anybody has any ideas? I’ve looked around quite a bit and my code seems right to me?

Edited—————————

public Login(string userName, string password){

   string servletUrl = "http://172.12.5.35:8080/SomeService/login?u="+userName+"&p="+password;
   using(var client = (IDisposable)new WebClient(servletUrl))
   {
        string result = client.DownloadString(servletUrl);

   {

}

But it seems that there is no DownloadString method for WebClient?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-05T22:56:03+00:00Added an answer on June 5, 2026 at 10:56 pm

    Windows Phone 7 (and Silverlight in general) doesn’t support synchronous IO. If you look at the Silverlight API documentation, you’ll find the compiler is entirely right – there isn’t a GetResponse method. You need to use the async BeginGetResponse method instead.

    Alternatively, use WebClient which makes the async part somewhat simpler – and of course C# 5’s async support will make asynchrony much easier in general.

    EDIT: As noted in comments – DownloadString is still synchronous, so not supported in Silverlight. You want the async API, e.g. DownloadStringAsync.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm busy working on a windows phone application that calls a servlet that then
I am busy working on a mobile application that retrieves data from a web
I'm keeping my self busy working on app that gets a feed from twitter
I'm working on a web application project in Visual Studio 2005 and as of
I've been busy working on a program that can solve Minesweeper puzzles (for no
I am busy working with an ASP.NET MVC 3 application and using Windows 7.
I am busy working on a project that needs a REST API to allow
I'm busy working on an iPad application and my web service returns pretty simple
I have a Visual Studio 2005 BIDS project that exports about 30 database tables
I'm busy working on a project that has a main page, on that main

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.