httpContext와 spContext의 차이점은 무엇입니까?
-
29-09-2020 - |
문제
우리는 항상 spcontext.current.web를 사용하지만 httpContext와 spContext의 차이점은 무엇입니까?
해결책
spcontext 및 매우 별개의 객체입니다.
spcontext Represents the context of an HTTP request in Microsoft SharePoint Foundation.
httpcontext Encapsulates all HTTP-specific information about an individual HTTP request.
회원 및 속성을 보면 SpContext가 SharePoint 객체 모델 (SPSite, SPWeb, Splist 등)에 액세스 할 수 있음을 알 수 있습니다.또한 SharePoint Ecosystem의 특정 클래스입니다.
다른 한편, httpContext는 SharePoint에서만 사용할 수있는 일반 클래스이지만 사용자의 세션, 캐시, 사용자 에이전트, 브라우저, 웹 컨텍스트의 속성을 가져올 수있는 .NET Frameworks입니다.그리고 다른 사람들.
제휴하지 않습니다 sharepoint.stackexchange