locked
Exception while calling HttpWebRequest.GetRequestStream() RRS feed

  • Question

  • User-677046274 posted

    From my windows mobile application, i want to connect to the server which resides on my local machine. I want to use HTTPS.

    SSL certificates have been implemented and they dont cause any problems.

    However, i get an exception at the code line

     Stream requestStream = webrequest.GetRequestStream(); ----> webrequest is an object of HttpWebRequest class

    The exception message is "Could not establish connection to network." InnerException is null.

    What could be the reason? Can someone help me?

    Wednesday, March 17, 2010 8:03 AM

Answers

  • User-525215917 posted

    It seems like your application is not allowed to make external connections. Check out your firewall as the first thing.

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Sunday, March 21, 2010 5:39 AM
  • User-677046274 posted

    I could establish a connection when i added my local machine's IP in the "Exceptions" lists under connections. The following thread

    helped me to resolve the issue...

    http://social.msdn.microsoft.com/Forums/en/netfxcompact/thread/231d117c-df2f-4a6a-9ca7-e33b6b200b1d



    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Thursday, April 1, 2010 6:43 AM

All replies

  • User-525215917 posted

    It seems like your application is not allowed to make external connections. Check out your firewall as the first thing.

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Sunday, March 21, 2010 5:39 AM
  • User-677046274 posted

    I could establish a connection when i added my local machine's IP in the "Exceptions" lists under connections. The following thread

    helped me to resolve the issue...

    http://social.msdn.microsoft.com/Forums/en/netfxcompact/thread/231d117c-df2f-4a6a-9ca7-e33b6b200b1d



    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Thursday, April 1, 2010 6:43 AM