المساعد الشخصي الرقمي

مشاهدة النسخة كاملة : Webservice and proxy



C# Programming
10-15-2009, 12:11 AM
Hello all of you,

I made a webservice and I can't get this to run via proxy.

the basic procedure on the client side looks like this:


MyWebservice service = new MyWebservice();

WebProxy iProxy = new WebProxy(_proxyAdress, true);

service.Proxy = iProxy;

...

if(service.LogOn(user, pass))
{

...

data = service.GetMyData();


now what happens is that the session variables are lost on the GetMyData() call

on the server side:



[WebMethod (EnableSession = true)]
public bool Logon(string s, string p)
{
...

Context.Session.Add ("LoggedIn", true);

...

return
}

[WebMethod (EnableSession = true)]
public SomeData GetMyData()
{

...

if(Context.Session ["LoggedIn"]) //

...
}



Whitout proxy it goes but with proxy dosen't. Please drop some tips if you have some. Thx. http://www.barakasoft.com/script/Forums/Images/smiley_wink.gif