Click here to Skip to main content
15,904,652 members
Home / Discussions / WPF
   

WPF

 
QuestionHow to call javascript functions in silverlight. Pin
Nekkantidivya3-Dec-09 23:44
Nekkantidivya3-Dec-09 23:44 
AnswerRe: How to call javascript functions in silverlight. Pin
Abhinav S4-Dec-09 0:08
Abhinav S4-Dec-09 0:08 
AnswerRe: How to call javascript functions in silverlight. Pin
Mark Salsbery4-Dec-09 10:17
Mark Salsbery4-Dec-09 10:17 
AnswerRe: How to call javascript functions in silverlight. Pin
Kunal Chowdhury «IN»11-Dec-09 3:36
professionalKunal Chowdhury «IN»11-Dec-09 3:36 
QuestionUsing WPF C# dll in vc++ Pin
Anu_Bala3-Dec-09 18:30
Anu_Bala3-Dec-09 18:30 
AnswerRe: Using WPF C# dll in vc++ Pin
dan!sh 3-Dec-09 19:21
professional dan!sh 3-Dec-09 19:21 
QuestionAccess to a public object on a mainpage from a navigation page Pin
javi.ys2-Dec-09 12:24
javi.ys2-Dec-09 12:24 
AnswerRe: Access to a public object on a mainpage from a navigation page Pin
Mark Salsbery2-Dec-09 17:53
Mark Salsbery2-Dec-09 17:53 
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 

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.