Click here to Skip to main content
15,887,214 members
Home / Discussions / WPF
   

WPF

 
GeneralRe: Access to a public object on a mainpage from a navigation page Pin
javi.ys2-Dec-09 21:37
javi.ys2-Dec-09 21:37 
GeneralRe: Access to a public object on a mainpage from a navigation page Pin
Mark Salsbery3-Dec-09 6:38
Mark Salsbery3-Dec-09 6:38 
QuestionMessage Removed Pin
2-Dec-09 3:56
professionalN_tro_P2-Dec-09 3:56 
QuestionHttpWebRequest in Silverlight Application Pin
Thi**012-Dec-09 3:20
Thi**012-Dec-09 3:20 
AnswerRe: HttpWebRequest in Silverlight Application Pin
Mark Salsbery2-Dec-09 8:51
Mark Salsbery2-Dec-09 8:51 
AnswerRe: HttpWebRequest in Silverlight Application Pin
Abhinav S2-Dec-09 23:44
Abhinav S2-Dec-09 23:44 
GeneralRe: HttpWebRequest in Silverlight Application Pin
Thi**013-Dec-09 1:29
Thi**013-Dec-09 1:29 
GeneralRE: Re: HttpWebRequest in Silverlight Application [Solved] Pin
Thi**013-Dec-09 6:53
Thi**013-Dec-09 6:53 
The tip with the WebClient worked for me. Big Grin | :-D

I will explain what the point was.

You have to know this:
http://msdn.microsoft.com/en-us/library/cc645032(VS.95).aspx[^]

What this text says is, that the Silverlight-Runtime looks first for a certain security-file when a resource is called from a server: the clientaccesspolicy.xml. When this file is not correct or not there at all then a security exception is thrown.

The problem was:
This file was not there so i had to put i manually on my localhost.
(I have apache. The clientaccesspolicy.xml has to be put in the htdocs folder.)
clientaccesspolicy.xml :
<?xml version="1.0" encoding="utf-8"?>
<access-policy>
  <cross-domain-access>
    <policy>
      <allow-from>      
        <domain uri="*"/>
      </allow-from>      
      <grant-to>      
        <resource path="/" include-subpaths="true"/>
      </grant-to>      
    </policy>
  </cross-domain-access>
</access-policy>


This is my Silverlight App :
public void client_DownloadStringCompleted(object sender, DownloadStringCompletedEventArgs e)
        {
                Debug.WriteLine(e.Result);
        }

        public void XmlReadTest()
        {
            Uri url = new Uri("http://localhost/stage2.xml",UriKind.Absolute);
            WebClient client = new WebClient();
            client.DownloadStringCompleted += new DownloadStringCompletedEventHandler(client_DownloadStringCompleted);
            client.DownloadStringAsync(url);
          
        }


Nice Closing Time
QuestionExecutes a delegate on the thread that owns the control's underlying window handle Pin
cppwxwidgetsss2-Dec-09 2:41
cppwxwidgetsss2-Dec-09 2:41 
AnswerRe: Executes a delegate on the thread that owns the control's underlying window handle Pin
Ian Shlasko2-Dec-09 5:06
Ian Shlasko2-Dec-09 5:06 
GeneralRe: Executes a delegate on the thread that owns the control's underlying window handle Pin
cppwxwidgetsss2-Dec-09 18:23
cppwxwidgetsss2-Dec-09 18:23 
QuestionMenuItem like the Sort menuitem in Firefox 3's Organize Bookmarks ... ? Pin
Mohammad Dayyan1-Dec-09 23:01
Mohammad Dayyan1-Dec-09 23:01 
AnswerRe: MenuItem like the Sort menuitem in Firefox 3's Organize Bookmarks ... ? Pin
Ashfield2-Dec-09 1:32
Ashfield2-Dec-09 1:32 
QuestionShould I use Silverlight Pin
Mycroft Holmes1-Dec-09 19:26
professionalMycroft Holmes1-Dec-09 19:26 
AnswerRe: Should I use Silverlight Pin
Mark Salsbery2-Dec-09 8:28
Mark Salsbery2-Dec-09 8:28 
GeneralRe: Should I use Silverlight Pin
Mycroft Holmes2-Dec-09 12:05
professionalMycroft Holmes2-Dec-09 12:05 
QuestionWPF Data Grid Auto Height problem Pin
wasimsharp30-Nov-09 21:44
wasimsharp30-Nov-09 21:44 
AnswerRe: WPF Data Grid Auto Height problem Pin
Super Lloyd2-Dec-09 14:43
Super Lloyd2-Dec-09 14:43 
Question[Message Deleted] Pin
noufal200930-Nov-09 21:05
noufal200930-Nov-09 21:05 
AnswerRe: textbox validation in silverlight Pin
Abhinav S30-Nov-09 21:57
Abhinav S30-Nov-09 21:57 
GeneralRe: textbox validation in silverlight Pin
noufal200930-Nov-09 23:08
noufal200930-Nov-09 23:08 
AnswerRe: textbox validation in silverlight Pin
Abhinav S30-Nov-09 23:15
Abhinav S30-Nov-09 23:15 
GeneralRe: textbox validation in silverlight Pin
noufal200930-Nov-09 23:35
noufal200930-Nov-09 23:35 
AnswerRe: textbox validation in silverlight [modified] Pin
Abhinav S30-Nov-09 23:45
Abhinav S30-Nov-09 23:45 
GeneralRe: textbox validation in silverlight Pin
Mark Salsbery1-Dec-09 8:08
Mark Salsbery1-Dec-09 8:08 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.