C# Cookie Error by Response
Hello i made a website who returns a serialized object. then i start a Request from a Fatclient who get the object and deserialize it. When i start my page at the localhost i can easy get my serialized object and deserialize it. But if i publish it to the server i cant get back my object, i just get back a html page who says that i have to accept cookies. I was searching for help about 6 hours.
My Serialization:
Response.ContentType = "application/octet-stream";
var binaryFormatter = new BinaryFormatter();
binaryFormatter.Serialize(Response.OutputStream, ud);
Response.End();
Deserialisation:
WebClient wb = new WebClient();
String test = wb.DownloadString(url);
byte[] b = wb.DownloadData(url);
var mystream = new MemoryStream开发者_JAVA百科(b);
BinaryFormatter binaryRead = new BinaryFormatter();
Userdata userdata = (Userdata)binaryRead.Deserialize(mystream);;
mystream.Close();
HTML error page content:
Cookie Error Your browser does not accept cookies. Please enable cookies in your browser settings and try to access the application again.
because of a special component we use in the company to identify users its not possible to use a webservice for this appointment
精彩评论