Note that there are some explanatory texts on larger screens.

plurals
  1. POPreserving state in Silverlight 3
    primarykey
    data
    text
    <p>I'm developing a Silverlight 3 Application which I want to connect to a webservice with a provided .dll or with SOAP. But the .dll is not suited for Silverlight so I can not do that. And I can't access the SOAP service because of cross-domain issues (I do not host it so a clientpolicy xml will not do).</p> <p>So my solution is the include the .dll in a WCF enabled webservice in my own domain and let the Silverlight application call the webservice. This works.</p> <p>Now to my problem: The client provided from the .dll referenced by my webservice has a .Connect() method so I have to save the state of the object. But can I do that? Proberly not because Silverlight is not supporting wsHttpBinding. I know I can access ASP Session variables but can I also do that out-of-browser? I can only figure out one solution to my problem and that is saving username/password in ASP Session and call the .Connect() method in each method. But that is really a bad solution.</p> <p>Better ideas?</p> <hr> <p>I don't think I have made myself clear and I apologise about that. My english is properly the main cause for that.</p> <p>I have:</p> <p>My Silverlight app which runs on a website and out-of-browser</p> <p>My WCF Service which is hosted in the same domain.</p> <p>A cross-domain webservice (I can't get access to store a cross domain policy file)</p> <p>My WCF webservice provides a layer between my app and the cross-domain webservice because you can't add cross domain webservices without the policy file.</p> <p>My webservice looks like this (in a abstract way):</p> <pre><code>class MyWebService { CrossDomainWebServiceClient client = new CrossDomainWebServiceClient(); public void Connect(string username, string password) { client.Connect(username, password); } public object Foo() { //GetEmployees() do only work if I'm connected return client.GetEmployees(); } } </code></pre> <p>The Foo() method do not work because it is session per call and not session per instance. I want this to work. So the client object need to be preserved for the next call. Session.required do not work in Silverlight because wsHttpBinding apparently is not supported.</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload