1

i have created web browser control in c#. I used to open .net website into this control. Once page is completely loaded.i was using cookies of this browser control to create httprequest and used to execute request. I used to get data which was needed for me.

But all of sudden this stopped working. I checkd to see what happened then i found that issues are with cookies are being formed throught browser control.For example, if i use page url on IE browser and then get cookie and supply it to httprequest. It works good. But same thing with web browser control is not working now.

Another thing, Forget about httprequest, Download from webbrowser control itselft is also failing. But its working in IE. What could be stopping it to download fail in web browser control and work in IE.

Dont understand how.please help.

Sam4Code
  • 541
  • 5
  • 9
  • This might help: http://stackoverflow.com/a/19025793/1768303 – noseratio Mar 24 '15 at 20:32
  • no its not working yet. Another thing is that download from webbrowser control also failing. But its working in IE. What could be stopping it to download fail in web browser control and work in IE – Sam4Code Mar 26 '15 at 12:04
  • That worked for me. You haven't provided specific details/source code to take it any further. – noseratio Mar 26 '15 at 19:49
  • i made changes in registry to emulate IE from my application. Now i am emulating latest version of IE from my webbrowser control.And it started working for me. – Sam4Code Mar 27 '15 at 13:44
  • If the cookies are HttpOnly cookies then the webbrowser will not store them. See [IEGetProtectedModeCookie](https://msdn.microsoft.com/en-us/library/cc196998(v=vs.85).aspx) – Jason Harrison Apr 13 '16 at 18:34

2 Answers2

1

This issue is not with the cookies. it is with the browser emulation. By default webbrowser control take IE emulation. but if you need to mention which browser version you want control to use. By using registry.

0

I emulated IE to my application by changing registry information. and it started working.

Sam4Code
  • 541
  • 5
  • 9