WebService and cookies

Discussion in 'ASP .Net Web Services' started by Manso, Apr 26, 2005.

  1. Manso

    Manso Guest

    Hi all,

    We have two ASP.NET applications (App A & B) in two different sites. App B
    is consuming a webservice exposed by App A and state is kept using

    =========================
    If HttpContext.Current.Session("CookieAppB") Is Nothing Then
    HttpContext.Current.Session("CookieAppB") = New System.Net.CookieContainer
    End If

    objWebSvcAppA.CookieContainer = HttpContext.Current.Session("CookieAppB")
    .....
    =========================

    We keep session state in App B because App A uses an authentication
    mechanism that can be quite slow perfoming.

    Now to the problem. The webservice in App A returns data that is used to
    render img tags with the src-attribute pointing back to a page in App A. Is
    there anyway I can change the code above so the subsequent requests from the
    browser (for the img tag) uses the session information from the first (and
    already authenticated) request? This is the flow:

    1. App B authenticates and request data from App A.
    2. App B renders a page with <img> tags pointing to App A
    3. The requests from the browser are not authenticated for the src tags to
    App A.

    I can't seem to figure out a way to tell App A that the browser is
    authenticated. I don't want to store information in the querystring in the
    src attribute for security reasons.

    Does anyone have any ideas on this? I can't seem to find a good way to
    transfer the session container from one application to another.

    Thanks in advance!

    - MÃ¥ns
     
    Manso, Apr 26, 2005
    #1
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Alex Nitulescu

    Response.Cookies vs Request.Cookies

    Alex Nitulescu, Feb 3, 2005, in forum: ASP .Net
    Replies:
    1
    Views:
    8,619
    Hans Kesting
    Feb 3, 2005
  2. Andy Fish
    Replies:
    3
    Views:
    6,603
    Fredrik Lindner
    Nov 6, 2003
  3. user
    Replies:
    3
    Views:
    695
    =?ISO-8859-1?Q?G=F6ran_Andersson?=
    Mar 31, 2007
  4. archana
    Replies:
    1
    Views:
    536
  5. _Who
    Replies:
    7
    Views:
    2,772
Loading...

Share This Page