How go to authorize method ASP.NET
I'm testing Basic Http Authentication. I try go to a page, But when I go
to "books/get", I see nothing. Why? What I should add?
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;
using System.Net.Http.Headers;
using System.Security.Principal;
using System.Text;
using System.Threading;
namespace WebApiTest.Controllers
{
public class BooksController : Controller
{
[Authorize]
public String Get()
{
String res = "Hello";
return res;
}
public ActionResult Index()
{
return View();
}
}
}
No comments:
Post a Comment