Re: how do you set a cookie for axshdocvw

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance

From: Teo Lachev (teo.lachev_at_nospam.prologika.com)
Date: 10/02/04

  • Next message: Teo Lachev: "Re: how do you set a cookie for axshdocvw"
    Date: Fri, 1 Oct 2004 22:59:08 -0400
    
    

    John,

    So, this thread really boils down to how to manually set a cookie in the
    WebBrowser control. I did some research on your behalf but couldn't find a
    definite answer. Some things you can try:

    http://support.microsoft.com/default.aspx?scid=http://support.microsoft.com:80/support/kb/articles/Q172/9/98.ASP&NoWebContent=1

    http://groups.google.com/groups?hl=en&lr=&ie=UTF-8&threadm=OUM94uiEBHA.500%40tkmsftngp07&rnum=19&prev=/groups%3Fq%3Dwebbrowser%2Bnavigate%2Bcookie%26start%3D10%26hl%3Den%26lr%3D%26ie%3DUTF-8%26selm%3DOUM94uiEBHA.500%2540tkmsftngp07%26rnum%3D19

    The BeforeNavigate event instead of Navigate
    http://groups.google.com/groups?hl=en&lr=&ie=UTF-8&threadm=a2u5oh%24chj%241%40nyheter.chalmers.se&rnum=33&prev=/groups%3Fq%3Dwebbrowser%2Bnavigate%2Bcookie%26start%3D30%26hl%3Den%26lr%3D%26ie%3DUTF-8%26selm%3Da2u5oh%2524chj%25241%2540nyheter.chalmers.se%26rnum%3D33

    If this doens't help post a question to the
    microsoft.public.inetsdk.programming.webbrowser_ctl. There must be a way :-)

    -- 
    Hope this helps.
    -----------------------------------------------------
    Teo Lachev, MCSD, MCT
    Author: "Microsoft Reporting Services in Action"
    Publisher website: http://www.manning.com/lachev
    Buy it from Amazon.com: http://shrinkster.com/eq
    Home page and blog: http://www.prologika.com/
    -----------------------------------------------------
    "John" <johnlee22@yahoo.com> wrote in message
    news:8dc88c74.0409271127.48eee8eb@posting.google.com...
    > I tried to put the cookie string in the header parameter of navigate.
    > The tcptrace tool shows that the cookie part of the header is being
    > filtered out before it reaches the report server. I tried playing
    > around with security zones and overriding the cookie handling for the
    > web site but couldn't get it to work.
    > It looks like I'll move the logon and report listing to the web
    > control and write something separate to set the common report
    > parameters.
    >
    > If anyone gets rs explorer to work with forms authentication, please
    > post the solution.
    >
    > John
    >
    > "Teo Lachev" <teo.lachev@nospam.prologika.com> wrote in message
    news:<#QW0waxoEHA.1992@TK2MSFTNGP09.phx.gbl>...
    > > I see. In this case you just need to figure out a way to pass the
    > > sqlAuthCookie to the WebBrowser control. I don't have much time to test
    this
    > > but it looks like the Navigate method of the control has headers
    argument
    > > which you can use to pass the cookie header.
    > >
    > > What I would do is use tcpTrace to see what the cookie looks like. It
    should
    > > be something like <the path to the report> (URL encoded) <cookie value>.
    > > Then, I would try to create this header and pass it to the control.
    Perhaps,
    > > there is a better way but you can use this a start.
    > >
    > >
    > > -- 
    > > Hope this helps.
    > >
    > > -----------------------------------------------------
    > > Teo Lachev, MCSD, MCT
    > > Author: "Microsoft Reporting Services in Action"
    > > Publisher website: http://www.manning.com/lachev
    > > Buy it from Amazon.com: http://shrinkster.com/eq
    > > Home page and blog: http://www.prologika.com/
    > > -----------------------------------------------------
    > >
    > > "John" <johnlee22@yahoo.com> wrote in message
    > > news:8dc88c74.0409240538.24b73dda@posting.google.com...
    > > > The application was based on the rs explorer sample. If forms
    > > > authentication is used, what needs to be done with the rs explorer
    > > > sample to get it working?
    > > >
    > > > John
    > > >
    > > > johnlee22@yahoo.com (John) wrote in message
    > >  news:<8dc88c74.0409230702.5edf531e@posting.google.com>...
    > > > > The winform does the initial login in order to display a list of
    > > > > reports available and allows some user input of parameters which are
    > > > > common to all reports. I specify the url for the report selected
    along
    > > > > with the parameters.
    > > > > When the report is displayed in the control, the user can fill in
    any
    > > > > report specific parameters and render the report.
    > > > >
    > > > > Another somewhat unrelated question. I was using integrated login to
    > > > > the database but when I used the custom form login, it tries to
    login
    > > > > as the Windows network user. How do I set the user?
    > > > >
    > > > > John
    > > > >
    > > > > "Teo Lachev" <Teo Lachev@discussions.microsoft.com> wrote in message
    > >  news:<B855B7D1-E946-44C7-8F6C-B1C9FF2D948E@microsoft.com>...
    > > > > > John,
    > > > > >
    > > > > > And why are you intiating the LogonUser call in your WinForm
    instead
    > >  of
    > > > > > letting axshdocvw do the job just like you would do it in the
    browser?
    > > > > >
    > > > > > 1. axshdocvw request the report.
    > > > > > 2. RS redirects to the login page which calls LogonUser.
    > > > > > 3. RS sends the cookie to axshdocvw
    > > > > > 4. axshdocvw caches it and sends it back happily with each
    subsequent
    > >  request.
    > > > > >
    > > > > > Am I missing something here?
    > > > > >
    > > > > >
    > > > > > "John" wrote:
    > > > > >
    > > > > > > Teo, thanks for your reponse. I did use the proxy class in your
    > >  sample
    > > > > > > to get the cookie, however I am not using render() call to
    render
    > >  the
    > > > > > > report. I am using the url and calling navigate in the axshdocvw
    > > > > > > browser control. I don't think the browser control would use the
    > >  proxy
    > > > > > > class when sending web requests.
    > > > > > > I tried adding the cookie as a part of the header in navigate
    call
    > >  but
    > > > > > > that didn't seem to work. The reporting service seemed to get
    the
    > > > > > > cookie but I still got redirected to the forms authentication
    page.
    > > > > > >
    > > > > > > Any help would be appreciated,
    > > > > > > thanks John
    > > > > > >
    > > > > > > "Teo Lachev" <teo.lachev@nospam.prologika.com> wrote in message
    > >  news:<OV8yT$DoEHA.3324@TK2MSFTNGP15.phx.gbl>...
    > > > > > > > John,
    > > > > > > >
    > > > > > > > I assume you are talking about WinForm app. If yes, you may
    find
    > >  my sample
    > > > > > > > useful. The idea is to store the cookie and pass it explicitly
    > >  with each
    > > > > > > > call to Render().
    > > > > > > >
    > > > > > > > http://prologika.com/blog/archive/2004/08/27/169.aspx
    > > > > > > >
    > > > > > > > -- 
    > > > > > > > Hope this helps.
    > > > > > > >
    > > > > > > > -----------------------------------------------------
    > > > > > > > Teo Lachev, MCSD, MCT
    > > > > > > > Author: "Microsoft Reporting Services in Action"
    > > > > > > > Publisher website: http://www.manning.com/lachev
    > > > > > > > Buy it from Amazon.com: http://shrinkster.com/eq
    > > > > > > > Home page and blog: http://www.prologika.com/
    > > > > > > > -----------------------------------------------------
    > > > > > > >
    > > > > > > > "John" <johnlee22@yahoo.com> wrote in message
    > > > > > > > news:8dc88c74.0409210738.263b3914@posting.google.com...
    > > > > > > > > I am using forms authentication in our reporting service.
    After
    > > > > > > > > authenticating, I get a cookie back and want to set that
    cookie
    > >  in the
    > > > > > > > > axshdocvw browser control to view the report so the user
    doesn't
    > >  have
    > > > > > > > > to log in again. How can I do this? I tried sending the
    session
    > >  id as
    > > > > > > > > a parameter in the render command but it looks like it only
    > >  applies to
    > > > > > > > > link together multiple render calls.
    > > > > > > > >
    > > > > > > > > Thanks John
    

  • Next message: Teo Lachev: "Re: how do you set a cookie for axshdocvw"

    Relevant Pages

    • Re: how do you set a cookie for axshdocvw
      ... I tried to put the cookie string in the header parameter of navigate. ... The tcptrace tool shows that the cookie part of the header is being ... > sqlAuthCookie to the WebBrowser control. ...
      (microsoft.public.dotnet.framework.windowsforms)
    • Re: [PHP] base64-encoding in cookies?
      ... The sender is in the driver's seat and the receiver must follow suite. ... PHP application is usually what set the cookie in the first place. ... You have control over the value you insert into the cookie. ...
      (php.general)
    • Re: how do you set a cookie for axshdocvw
      ... "Teo Lachev" wrote in message ... > WebBrowser control. ... >> I tried to put the cookie string in the header parameter of navigate. ...
      (microsoft.public.dotnet.framework.windowsforms)
    • Re: Multiple Instances of AxWebBrowser
      ... navigating, another control is not able to recognise the cookie. ... You set a cookie with InternetSetCookie. ...
      (microsoft.public.inetsdk.programming.webbrowser_ctl)
    • Is my logic correct on this page in terms of execute order?
      ... control 1 - reads a cookie and executes stuff based on that ... control 2 - reads the same cookie and can also set the value ... the issue is that the postback page reads the cookie ...
      (microsoft.public.dotnet.framework.aspnet)