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
selvi jp
NA
323
77.3k
Login page in wep api mvc
Apr 23 2021 12:37 PM
I want to create login page using authentication token.ApplicationOAuthProvider alread have functionality for login.but i dont know how to call the function in controller
This is i try
[HttpPost]
//[ValidateAntiForgeryToken]
public ActionResult Login(Login model)
{
HttpClient hc = new HttpClient();
hc.BaseAddress = new Uri("https://localhost:44357/Token");
var insertdata = hc.PostAsJsonAsync<Login>("Token", model);
insertdata.Wait();
var savedata = insertdata.Result;
if (savedata.IsSuccessStatusCode)
{
ViewBag.message = "The user" + model.UserName + "Is Saved Successfully ... !";
return View("Home");
}
return View();
}
Reply
Answers (
2
)
How to store multiple dropdown check box values in database in MVC C#
Multiselected view in dropdownlist using MVC