Why I can't use HttpContext or HttpCookie? (Asp.Net Core 1.0)

前端 未结 2 902
甜味超标
甜味超标 2021-01-19 04:34

Why can\'t I use HttpContext or HttpCookie? Is there a special using?

My actual usings:

using System;
using System.Collecti         


        
相关标签:
2条回答
  • 2021-01-19 05:17

    The namespace for HttpContext and HttpCookie is System.Web which is part of the System.Web.dll library.

    Go right click the projects References and select Add References.... In the newly opened window click on Assemblies and then search (via the search bar in the upper right) for System.Web.

    Then you should be able to use it via

    using System.Web;
    
    0 讨论(0)
  • 2021-01-19 05:37

    So Hello guys

    I found a solution, try to use this wonderful blog entry.

    Note: Make sure you install the nuget-packages via the nuget installer and make also sure you checked the checkbox “include prerelease”.

    Hope my poste was helpful

    0 讨论(0)
提交回复
热议问题