473,395 Members | 1,797 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 software developers and data experts.

Silverlight 4.0 Beta : HttpWebRequest.GetResponse()

Two questions:

1) In Silverlight 4.0 Beta, I cannot find HttpWebRequest.GetResponse() ... any ideas where the functionality may be? I have found the Async form, but not the Sync form.

2) Within that same environment, I'd like to configure calling to a different server through the call, HttpWebRequest.BeginGetResponse( "http://localhost:8080/J2EE/index.jsp" ) ... the security will not permit this because it is a call to a different server. Where do I configure allowing this?

All the Best,

FreddyMack


Microsoft Visual Studio 2010
Version 10.0.21006.1 B2Rel
Microsoft .NET Framework
Version 4.0.21006 B2Rel

Installed Version: Professional
Microsoft Visual C# 2010
Microsoft Visual Web Developer 2010
Jan 18 '10 #1
3 7329
Frinavale
9,735 Expert Mod 8TB
Silverlight is developed as an asynchronous enviroment. Therefore you cannot use synchronous methods in this environment. You have to work with the Asynchronous version of the HttpWebRequest.BeginResponse

In order to prevent the application from potential security problems, Silverlight
does not allow you to access information for URLs that are cross-zone, cross-domain, and cross-scheme (see the MSDN article on URL Access Restrictions in Silverlight).

-Frinny
Jan 18 '10 #2
Hi Frinny. I accept the async-only answer. I'm new to Silverlight, and I swear I've seen, copied and pasted sync-examples for previous versions of Silverlight.

However, I see this note in the page you referred me to:

"You can access resources with a cross-scheme URL (allowed between HTTP and HTTPS) on Silverlight, but you need to explicitly enable this with a security policy file. See Network Security Access Restrictions in Silverlight topic for more information."

I was looking for information about how to note that security policy.
Jan 18 '10 #3
Frinavale
9,735 Expert Mod 8TB
I only have limited experience using Silverlight.

Silverlight has been developed on an asynchronous platform...it may be possible to call synchronous methods but these methods would be difficult to call and would likely cause more problems. If there is an asynchronous version of the thing that you want to use I'd use it since it'll just make your life easier.

As for the cross domain thing. I'm glad that you can do it! When I was looking into Silverlight this wasn't possible (I should have read the article instead of glancing through it!)


This article looks like a winner regarding the security policy: Network Security Access Restrictions in Silverlight (edit: ahh, it's the one in the Note that you were referring to)

-Frinny
Jan 18 '10 #4

Sign in to post your reply or Sign up for a free account.

Similar topics

10
by: Brian Brown | last post by:
I have code which works as an asp.net page that posts an xml file to web page and gets a response back. When the the calls GetResponse() it goes into the page it's posting to to and works fine....
10
by: Gregory A Greenman | last post by:
I'm trying to write a program in vb.net to automate filling out a series of forms on a website. There are three forms I need to fill out in sequence. The first one is urlencoded. My program is...
1
by: Jeff B | last post by:
I'm trying to create a simple screen scraping application and I kept getting a System.Net.WebException thrown back with a message of "The operation has timed-out." At first I thought it was some...
2
by: Steve Richter | last post by:
I have a page that uses simple HTTP GET to do an ISBN lookup via Amazon.com. The page works when I run it from //localhost. But I have moved it to my godaddy.com shared hoster site, and I get...
2
by: GlennLanier | last post by:
Hello, I've searched the forums and can't find an answer -- if it i there, kindly point me in that direction. I would like to simulate a browser POSTing a FORM and be able to pars the response....
2
by: microdevsolutions | last post by:
Hello I've seen examples to read a file from somewhere into a HttpWebRequest object then write it to a HttpWebResponse object then stream it into a Stream object, very similar to the following...
5
by: mr.newsgroupguy | last post by:
I am working in C# .NET 1.1. My app has a button on its main form that checks to see if it has access to a file on our server, just an XML file. On our server we are running W2K IIS with a...
7
by: Marc Bartsch | last post by:
Hi, I have a background worker in my C# app that makes a synchronous HttpWebRequest.GetResponse() call. The idea is to POST a file to a server on the internet. When I call HttpWebRequest.Abort()...
2
by: Vinnie | last post by:
ok, thanks for the help. Some of you, was right: too many words, to much marketing without identifying the final user. Smithers gave the easiest answer. Now, as i wasn't enough confused, on the...
1
by: Faisal Shafiq | last post by:
I want to upload a file direct to the Silverlight Streaming Service from a Web Client such as silverlight application. As per our product requirement we want to upload a .WMV file directly from...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.