c# WebRequest using WebBrowser cookie

前端 未结 3 1156
失恋的感觉
失恋的感觉 2020-12-03 12:17

I am logging into a site using a WebBrowser, then i want use regex to get some data , but webRequest didnt use web Browse cookie ,

my webBrowser is in public , is

3条回答
  •  谎友^
    谎友^ (楼主)
    2020-12-03 12:50

    is this silverlight? if so, since silverlight 3 if you use the browser network stack than you should get cookies for free. By default you get the browser stack when you create n HttpWebrequest using the WebRequest.Create() method. note if you use CreateHTTP method, you get a client stack, which does not include browser cookies by default (you have to do trickery to get them, as described previously)

    see http://msdn.microsoft.com/en-us/library/dd920295(VS.95).aspx about the network stacks in silverlight since version 3

提交回复
热议问题