How to save Profile Properties in Cookie?

Discussion in 'ASP .Net' started by shapper, Sep 17, 2006.

  1. shapper

    shapper Guest

    Hello,

    I have only one property in my profile and I want it to be saved in a
    cookie.

    However, when I run my web site a database named ASPNETDB.MDF is
    generated instead of using a Cookie.

    How can I solve this?

    I have the following in my Web.Config file:

    <!-- Anonymous Identification -->
    <anonymousIdentification
    enabled = "True"
    cookieless = "UseCookies"
    cookieName = ".MyWebSiteCookie"
    cookiePath = "/"
    cookieProtection = "None"
    cookieRequireSSL = "False"
    cookieSlidingExpiration = "True"
    cookieTimeout = "100000" />

    ...

    <!-- Profile -->
    <profile>

    <!-- Profile Properties -->
    <properties>
    <add
    name = "LanguagePreference"
    type = "System.String"
    defaultValue = "Auto"
    allowAnonymous = "True" />
    </properties>

    Thanks,

    Miguel
     
    shapper, Sep 17, 2006
    #1
    1. Advertising

  2. Ahhh, *that* is the language option you want in your other thread.

    You don't need to use a profile to set that.

    See :
    http://msdn2.microsoft.com/en-us/library/bz9tc508.aspx

    And, please, don't ask the same question in 2, or more, different threads.
    Thanks.



    Juan T. Llibre, asp.net MVP
    aspnetfaq.com : http://www.aspnetfaq.com/
    asp.net faq : http://asp.net.do/faq/
    foros de asp.net, en espaƱol : http://asp.net.do/foros/
    ===================================
    "shapper" <> wrote in message
    news:...
    > Hello,
    >
    > I have only one property in my profile and I want it to be saved in a
    > cookie.
    >
    > However, when I run my web site a database named ASPNETDB.MDF is
    > generated instead of using a Cookie.
    >
    > How can I solve this?
    >
    > I have the following in my Web.Config file:
    >
    > <!-- Anonymous Identification -->
    > <anonymousIdentification
    > enabled = "True"
    > cookieless = "UseCookies"
    > cookieName = ".MyWebSiteCookie"
    > cookiePath = "/"
    > cookieProtection = "None"
    > cookieRequireSSL = "False"
    > cookieSlidingExpiration = "True"
    > cookieTimeout = "100000" />
    >
    > ...
    >
    > <!-- Profile -->
    > <profile>
    >
    > <!-- Profile Properties -->
    > <properties>
    > <add
    > name = "LanguagePreference"
    > type = "System.String"
    > defaultValue = "Auto"
    > allowAnonymous = "True" />
    > </properties>
    >
    > Thanks,
    >
    > Miguel
    >
     
    Juan T. Llibre, Sep 17, 2006
    #2
    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. Brad
    Replies:
    1
    Views:
    1,177
    Roedy Green
    Jul 19, 2005
  2. =?Utf-8?B?Sm9lRnVzaW9u?=

    SQL Connection Error on Profile.Save()

    =?Utf-8?B?Sm9lRnVzaW9u?=, Aug 22, 2006, in forum: ASP .Net
    Replies:
    2
    Views:
    2,898
    Kevin Jones
    Aug 22, 2006
  3. Andy B
    Replies:
    0
    Views:
    556
    Andy B
    May 3, 2008
  4. milop

    Profile.Save()

    milop, May 23, 2008, in forum: ASP .Net
    Replies:
    0
    Views:
    428
    milop
    May 23, 2008
  5. Steven
    Replies:
    5
    Views:
    514
    Steven
    Oct 24, 2008
Loading...

Share This Page