Accessing cookies from DLL

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • nathan_blakley@hotmail.com

    Accessing cookies from DLL

    Hi,
    I am not able to read or write cookies from DLLs both locally and on
    Godaddy's web hosting site. I have ASP.NET 2 set up in both locations.
    There must be a trick. My code looks as follows:

    return (HttpContext.Cu rrent.Request.C ookies[m_strCookieName] != null);

    I have unchecked the "Allow Unsafe Code" box in VS.

    Many thanks
    Nathan
  • George Ter-Saakov

    #2
    Re: Accessing cookies from DLL

    To reqad a cookie you use Request.Cookies ...
    to write a cookie you use Response.Cookie s....
    I see code yo try to read Cookie but do not see code to write Cookie..


    George.




    <nathan_blakley @hotmail.comwro te in message
    news:5765d743-e541-44be-aa89-41d41c21ee95@c2 3g2000hsa.googl egroups.com...
    Hi,
    I am not able to read or write cookies from DLLs both locally and on
    Godaddy's web hosting site. I have ASP.NET 2 set up in both locations.
    There must be a trick. My code looks as follows:
    >
    return (HttpContext.Cu rrent.Request.C ookies[m_strCookieName] != null);
    >
    I have unchecked the "Allow Unsafe Code" box in VS.
    >
    Many thanks
    Nathan

    Comment

    • nathan_blakley@hotmail.com

      #3
      Re: Accessing cookies from DLL

      Thank you, George. Yes, I do use the request and response objects as
      you say. I apologize for not saying so.
      The dll resides in the web site's bin directory and can both read and
      write to a directory (after I set permissions). Cannot read or write a
      cookie though.
      Hate to have to rely on IP addresses but am considering it.
      Nathan

      On Feb 8, 4:36 am, "George Ter-Saakov" <gt-...@cardone.com wrote:
      To reqad a cookie you use Request.Cookies ...
      to write a cookie you use Response.Cookie s....
      I see code yo try to read Cookie but do not see code to write Cookie..
      >
      George.
      >
      <nathan_blak... @hotmail.comwro te in message
      >
      news:5765d743-e541-44be-aa89-41d41c21ee95@c2 3g2000hsa.googl egroups.com...
      >
      Hi,
      I am not able to read or write cookies from DLLs both locally and on
      Godaddy's web hosting site. I have ASP.NET 2 set up in both locations.
      There must be a trick. My code looks as follows:
      >
      return (HttpContext.Cu rrent.Request.C ookies[m_strCookieName] != null);
      >
      I have unchecked the "Allow Unsafe Code" box in VS.
      >
      Many thanks
      Nathan

      Comment

      • nathan_blakley@hotmail.com

        #4
        Re: Accessing cookies from DLL

        I should have mentioned, this dll contains a CompositeContro l.
        Nathan

        On Feb 9, 7:26 am, nathan_blak...@ hotmail.com wrote:
        Thank you, George. Yes, I do use the request and response objects as
        you say. I apologize for not saying so.
        The dll resides in the web site's bin directory and can both read and
        write to a directory (after I set permissions). Cannot read or write a
        cookie though.
        Hate to have to rely on IP addresses but am considering it.
        Nathan
        >
        On Feb 8, 4:36 am, "George Ter-Saakov" <gt-...@cardone.com wrote:
        >
        To reqad a cookie you use Request.Cookies ...
        to write a cookie you use Response.Cookie s....
        I see code yo try to read Cookie but do not see code to write Cookie..
        >
        George.
        >
        <nathan_blak... @hotmail.comwro te in message
        >
        news:5765d743-e541-44be-aa89-41d41c21ee95@c2 3g2000hsa.googl egroups.com...
        >
        Hi,
        I am not able to read or write cookies from DLLs both locally and on
        Godaddy's web hosting site. I have ASP.NET 2 set up in both locations.
        There must be a trick. My code looks as follows:
        >
        return (HttpContext.Cu rrent.Request.C ookies[m_strCookieName] != null);
        >
        I have unchecked the "Allow Unsafe Code" box in VS.
        >
        Many thanks
        Nathan

        Comment

        Working...