G
Guest
hello, I need to add cookie support to webservice client on PocketPC (not
smartphone),
something similar to the sample from here (at the bottom):
http://www.ondotnet.com/pub/a/dotnet/2004/02/23/mobilewebserviceapps.html
i.e.
public class WebServiceWithCookies : WebService
{
private static string cookie = null;
protected override WebRequest GetWebRequest(Uri uri) {
HttpWebRequest req = (HttpWebRequest) base.GetWebRequest(uri);
if (cookie != null)
{
req.Headers.Add("Cookie", cookie);
}
return req;
}
protected override WebResponse GetWebResponse(WebRequest req) {
HttpWebResponse rep = (HttpWebResponse) base.GetWebResponse(req);
if (rep.Headers["Set-Cookie"] != null)
{
cookie = rep.Headers["Set-Cookie"];
}
return rep;
}
}
the site says I need CF SP1, so I downloaded and installed it (but I could
not find CF SP1 SDK), unfortunately VS does not compile my test app with this
error:
"webserviceclienttest.WebServiceWithCookies.GetWebRequest(System.Uri)': no
suitable method found to override"
I don't know what to do as there is no SDK for the SP1 or SP2 of CF, I read
somewhere that it is possible to copy dll's from one directory to another but
it didn't say which directories or which dll's
smartphone),
something similar to the sample from here (at the bottom):
http://www.ondotnet.com/pub/a/dotnet/2004/02/23/mobilewebserviceapps.html
i.e.
public class WebServiceWithCookies : WebService
{
private static string cookie = null;
protected override WebRequest GetWebRequest(Uri uri) {
HttpWebRequest req = (HttpWebRequest) base.GetWebRequest(uri);
if (cookie != null)
{
req.Headers.Add("Cookie", cookie);
}
return req;
}
protected override WebResponse GetWebResponse(WebRequest req) {
HttpWebResponse rep = (HttpWebResponse) base.GetWebResponse(req);
if (rep.Headers["Set-Cookie"] != null)
{
cookie = rep.Headers["Set-Cookie"];
}
return rep;
}
}
the site says I need CF SP1, so I downloaded and installed it (but I could
not find CF SP1 SDK), unfortunately VS does not compile my test app with this
error:
"webserviceclienttest.WebServiceWithCookies.GetWebRequest(System.Uri)': no
suitable method found to override"
I don't know what to do as there is no SDK for the SP1 or SP2 of CF, I read
somewhere that it is possible to copy dll's from one directory to another but
it didn't say which directories or which dll's