Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9155963
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T12:41:16+00:00 2026-06-17T12:41:16+00:00

This is a really annoying issue and i don’t know where to start to

  • 0

This is a really annoying issue and i don’t know where to start to look to resolve it.

This issue does not happen when i run the code locally, only when i run it on the live environment. I know i am missing something, and its probably obvious i just can figure it out.

Okay I have an MVC 4 application where i have overridden MembershipProvider. I am pretty sure this is not the issue as the login does work. Login works on IE, Firefox, Safari but fails on Chrome Desktop (Windows 7), and Chrome IOS (on the Ipad).

On Chrome the user is required to log in twice. On the first attempt the ASPXAUTH element of the cookie is not being set. BUT it is set on the second attempt. (Reviewed in Fiddler)

I have looked around and found this suggestion and i have implemented it but i still have the issue. (This does not detail my issue completely but it was close)

http://www.hanselman.com/blog/FormsAuthenticationOnASPNETSitesWithTheGoogleChromeBrowserOnIOS.aspx

(I have 4.5 installed so i knew this was a very long shot)

I have no idea where to start to look to resolve this. Here is the code where i create the cookie.

    private void SignIn(string userName, bool RememberMe)
    {
        MyMembershipProvider provider = (MyMembershipProvider)System.Web.Security.Membership.Provider;
        MyMembershipUser user = (MyMembershipUser)provider.GetUser(userName, false);

        FormsAuthenticationTicket ticket = new FormsAuthenticationTicket(1,
          user.UserName,
          DateTime.Now,
          DateTime.Now.AddMinutes(30),
          true,
          user.UserID.ToString(),
          FormsAuthentication.FormsCookiePath);

        // Encrypt the ticket.
        string encTicket = FormsAuthentication.Encrypt(ticket);

        // Create the cookie.
        HttpCookie authCookie = new HttpCookie(FormsAuthentication.FormsCookieName, encTicket);

        Response.Cookies.Add(authCookie);
    }

After the cookie has been created i Redirect

    return Redirect("Https://www.sitehome.local");

Please note i am running the whole site under HTTPS in case this is causing the issue

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-17T12:41:17+00:00Added an answer on June 17, 2026 at 12:41 pm

    As we figured out in the comments, the cookie was not being forwarded upon redirect and was fixed by creating the cookie in this manner:

    var authCookie = new HttpCookie(FormsAuthentication.FormsCookieName, ticketString) 
        { 
           Secure = FormsAuthentication.RequireSSL, 
           Path = FormsAuthentication.FormsCookiePath, 
           HttpOnly = true, 
           Domain = FormsAuthentication.CookieDomain 
        };
    
    Response.Cookies.Add(authCookie);
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

So, I've been programming in python and I've run into this really annoying issue.
This is not really a issue but it is a sometimes annoying thing during
Im getting this really annoying error in when I run this Haskell code. For
I've been having this really annoying thing happen the past few days, that has
I have ran into a really annoying issue which gives me this error: The
I'm seeing a very annoying bug that I don't really know how to deal
I come to you because I have this really annoying issue. In Xcode, I
I am having this really annoying problem on a php-site I am programming and
This has been annoying me for a while yet the solution must be really
This has been annoying me for a while in several XCode projects. I really

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.