1-) C# MVC - AntiForgeryToken LİNK GÜVENLİĞİ İÇİN KULLAN
açıklama :
aşağıdaki linke doğrudan erişimi engellemek için kullanırız.
http://localhost:53262/Departman/Kaydet/?Ad=1234
2-)
.cshtml kısmı
@using (Html.BeginForm("Kaydet", "Departman", FormMethod.Post))
{
@Html.AntiForgeryToken()
...
.cs Kısmı
[ValidateAntiForgeryToken]
public ActionResult Kaydet(departman dep)