locked
Cookies are not working after publishing Azure RRS feed

  • Question

  • Hi,

    Our project was working perfectly on a hosting plan.

    We wanted to migrate Azure, then deployed the web application and sql to Azure account.

    Now when we try to test the application we got this error;

    Server cannot modify cookies after HTTP headers have been sent.

    on the line;

    HttpContext.Response.SetCookie(myCookie);

    This is code block for session state after azure publish

    <sessionState mode="Custom" customProvider="MySessionStateStore">
          <providers>
            <add name="MySessionStateStore" type="Microsoft.Web.Redis.RedisSessionStateProvider" host="xxx" accessKey="yyy" ssl="false" port="6379" />
          </providers>
        </sessionState>

    We have spent hours to solve the issue, but we could not find a solution yet.

    Any help is appreciated.

    Regards

    Wednesday, July 26, 2017 12:18 PM

All replies

  • We would like to know few things, do confirm on the same:

    Also, make sure you have not used async content before your cookies are written.
    -----------------------------------------------------------------------------------------------------------------
    Do click on "Mark as Answer" on the post that helps you, this can be beneficial to other community members.


    • Edited by Nayana A S Wednesday, July 26, 2017 2:39 PM
    Wednesday, July 26, 2017 2:39 PM