1

SharePoint 2007 we can able to use the Httpcontext.current object But in SharePoint 2010 we are unable to get the httpcontext.current object. It will return the values.

How can i get the or Create the HttpContext.current object in SharePoint 2010. Even in Sharepoint 2007 we can able to access the SPContext.Current.Web object but in SharePoint 2010 we willn't able to do that why?

I need to Access either HttpContext.Current object or SpContext.Current.Web Object in Side the custom Membership provider.

I will be very thank full to you if you able to solve my problem.

I am implementing this on Custom Membership Provider.

Thanks in advance.

2 Answers 2

2

In SharePoint 2010, custom membership providers must use claims-based auth. The reason you cannot access the current context is that your code is actually being executed by the Security Token Service, which is in a different web application than the content web application that where the request was received. You will need to look for a different solution to pass the state information.

0

I don't think it's possible to get a context object in your provider.
Maybe you could create a method in your provider with a parameter for the context. In your code-behind from the page, you should be possible to get the context-object and pass it through to the method in the provider. Don't know why you would need this though...

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.