You must Sign In to post a response.
  • Category: ASP.Net MVC

    Session storing in webapi project and retrive in mvc project

    i am developer,I have developed my login page with webapi,after login i have stored my session["UserName"] in apiController,its is one project,
    after that i am redirected to mvc project,ie,,home controller,in this,when i am trying to retrive session["UserName"] then its becoming the null value,
    can any one help me pls,
  • #761411
    Hai Ramana,
    I think, its better to use the properties to handle the scenario.
    Once you get the value, store it in a property, and the pass through through controller so that you can retrieve it there the same value.
    Hope it will be helpful to you.

    Pawan Awasthi(DNS MVM)
    +91 8123489140 (whatsApp), +60 14365 1476(Malaysia)

  • #761412
    Hi ramana,

    it wont work because two contexts are different. creating session in one site and accessing in one both are different contexts.

    both should be in same context. if you want that username to transfer to other application please maintain state.

    please tell more details then we can figure out.

    Rayala HariKishore achieved it.

  • Sign In to post your comments