TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
Guest User
Tech Writer
2.1k
473.6k
HttpContext does not contain definition of?
Feb 4 2020 2:34 AM
Hi Team
I have similiar error
using
Microsoft.Owin.Security;
// Assembly i have used for my MVC web project.
private
IAuthenticationManager AuthenticationManager
{
get
{
return
HttpContext.GetOwinContext().Authentication;
// Error is stating this object does not contain definition of GetOwninContext() for HttpContext
}
}
// Same below with this object below;
public
async Task ExternalLoginConfirmation(ExternalLoginConfirmationViewModel model, string returnUrl)
{
if
(User.Identity.IsAuthenticated)
{
return
RedirectToAction(
"Manage"
);
}
if
(ModelState.IsValid)
{
// Get the information about the user from the external login provider
var info = await AuthenticationManager.GetExternalLoginInfoAsync();
// Error state it does not have definition for GetExternalLoginInfoAsync method
if
(info == null)
{
return
View(
"ExternalLoginFailure"
);
}
var user =
new
ApplicationUser() { UserName = model.UserName };
var result = await UserManager.CreateAsync(user);
if
(result.Succeeded)
{
result = await UserManager.AddLoginAsync(user.Id, info.Login);
if
(result.Succeeded)
{
await SignInAsync(user, isPersistent:
false
);
return
RedirectToLocal(returnUrl);
}
}
AddErrors(result);
}
ViewBag.ReturnUrl = returnUrl;
return
View(model);
}
on my methods, i have correct assemblies for both. How can i fix this issue? please help
Reply
Answers (
4
)
Problem in onkeyup event
Page load events