Hi,
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).
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.
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.
Better ideas?
I don't think I have made myself clear and I apologise about that. My english is properly the main cause for that.
I have:
My Silverlight app which runs on a website and out-of-browser
My WCF Service which is hosted in the same domain.
A cross-domain webservice (I can't get access to store a cross domain policy file)
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.
My webservice looks like this (in a abstract way):
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();
}
}
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.