惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

Simon Willison's Weblog
Simon Willison's Weblog
P
Privacy International News Feed
www.infosecurity-magazine.com
www.infosecurity-magazine.com
T
Troy Hunt's Blog
Hacker News - Newest:
Hacker News - Newest: "LLM"
Attack and Defense Labs
Attack and Defense Labs
S
Secure Thoughts
V2EX - 技术
V2EX - 技术
cs.AI updates on arXiv.org
cs.AI updates on arXiv.org
O
OpenAI News
Cloudbric
Cloudbric
Google Online Security Blog
Google Online Security Blog
Schneier on Security
Schneier on Security
cs.CV updates on arXiv.org
cs.CV updates on arXiv.org
Help Net Security
Help Net Security
Cyberwarzone
Cyberwarzone
G
GRAHAM CLULEY
L
Lohrmann on Cybersecurity
Threat Intelligence Blog | Flashpoint
Threat Intelligence Blog | Flashpoint
Spread Privacy
Spread Privacy
NISL@THU
NISL@THU
N
News and Events Feed by Topic
T
Tenable Blog
S
Security @ Cisco Blogs
N
News and Events Feed by Topic
The Hacker News
The Hacker News
C
CXSECURITY Database RSS Feed - CXSecurity.com
宝玉的分享
宝玉的分享
月光博客
月光博客
酷 壳 – CoolShell
酷 壳 – CoolShell
美团技术团队
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
Google DeepMind News
Google DeepMind News
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
T
Tailwind CSS Blog
V
Visual Studio Blog
P
Proofpoint News Feed
Webroot Blog
Webroot Blog
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
博客园 - 三生石上(FineUI控件)
cs.CL updates on arXiv.org
cs.CL updates on arXiv.org
Jina AI
Jina AI
雷峰网
雷峰网
T
The Blog of Author Tim Ferriss
Hugging Face - Blog
Hugging Face - Blog
腾讯CDC
L
LangChain Blog
The Register - Security
The Register - Security
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
博客园 - 聂微东

博客园 - newr2006

Android adb.exe 开发模试安装 HttpWebRequest 模拟浏览器访问网站 jquery check box symbol MC 3090 upgrade to symbol MC 3190 ALTER TABLE unable to add host to SCVMM 2008R2 Cannot generate SSPI context ASP.NET代码对页面输出进行清理 - newr2006 - 博客园 提前两天发邮件 线程 Thread 传参数 好的博客 Login failed for user 'NT AUTHORITY\NETWORK SERVICE'. 解决办法 - newr2006 Hashtable(HashSet),ListDictionary,HybridDictionary 和 NameValueCollection Pocket pc 与 Smartphone 开发的区别 XMl 文件属性的读取 USA 的网站终于把中国的名字排上去了. Menu 控件弹出窗口(popupwindow) 删除一些难删除的程序 Page_ClientValidate 用法
Fiddler Post Debug
newr2006 · 2014-05-20 · via 博客园 - newr2006

1. Post: http://localhost:11804/My/Comment   

 for plain html parameter submission, like the GET in URL:

Request Header:

User-Agent: Fiddler

 Content-Length: 33  

Host: localhost:11804  

Content-Type: application/x-www-form-urlencoded

Request Body:

url=go&url2=2&lese=sss

 public class MyController : Controller
{
       public class CommentInputModel
        {
            public string Url { get; set; }
            public string Url2 { get; set; }
          
        }
[HttpPost]
public ActionResult Comment(CommentInputModel model,string lese) { return null; } }

2.Post:http://localhost:11804/Account/Login   have  [ValidateAntiForgeryToken]

Request Header:

Content-Type: application/x-www-form-urlencoded
Cookie: __RequestVerificationToken=WAmjMYW6VXwFk21CU8zjfViWgKvW3703lBNcm7rij0cl2-Axh4_jiYkaZ_HcAmTMdca721sicaa2lAZmvYRe4IkS7shSydVTsRn7pB5EmCI1
Host: localhost:11804
Content-Length: 183

Request Body

__RequestVerificationToken=jqeqLyivYdNPWjlbLMAUf747vM1wdLcx5Xju5vbkv5S4k4kpin_z2KqbVMu07Vg2mOVLOt7ijhvOM4ranmZ73SpZwNxWfKlyOORSp8SDS7U1&UserName=admin&Password=111111&RememberMe=false

        [HttpPost]
        [AllowAnonymous]
        [ValidateAntiForgeryToken]
       // [OutputCache(NoStore = true, Duration = 0)]  
        public ActionResult Login(LoginModel model, string returnUrl)
        {
            if (ModelState.IsValid && WebSecurity.Login(model.UserName, model.Password, persistCookie: model.RememberMe))
            {
                return RedirectToLocal(returnUrl);
            }

            // If we got this far, something failed, redisplay form
            ModelState.AddModelError("", "The user name or password provided is incorrect.");
            return View(model);
        }


    public class LoginModel
    {
        [Required]
        [Display(Name = "User name")]
        public string UserName { get; set; }

        [Required]
        [DataType(DataType.Password)]
        [Display(Name = "Password")]
        public string Password { get; set; }

        [Display(Name = "Remember me?")]
        public bool RememberMe { get; set; }
    }

3. For JSON parameter submission:

Request Header:

User-Agent: Fiddler

 Host: localhost:4217

 Content-Type: application/json; charset=utf-8

Request Body

{“Number1″:”7″,”Number2″:”7″}

4.Get Authorize   http://localhost:52913/api/Tests/1

Hearder

User-Agent: Fiddler

Host: localhost:52913

Content-Length: 0

Authorization: Bearer fOtIuWy70pYnFZEfPgWrKjSXwbk5DXkNpuot2Psf4uZFcGkLHlDFSuJ1b4WvkjLwknIksUa9EMVA0w3b8YeYeeporLpimP6PfILj-WNco-2JwcN7cJc5WCT7LckqEQjdbJZRxYiOYyJo6EmNAo5F4gY0Jdpgx6veP2-

995vhIU2A1yorvNLBQDzYlVEoCymwOE8ZIp1ZOLJklAvDttOuAP5h150cUAVpwRavi8JIL3EI2kqNauY72_-

6qp916nDOrM1TIPS_HUElmWQMd31hLpB1UjJhb6vvVOdeQylToOJrATs8hrS5zOWLJPBrSV74llTSEO44XPsPorc8X9C6iUDZYoajz8wUDlbEccTenl41D2P5ui3ZG5ql5XYSoykbD9Ns44Nki_fVLLcuHfW-77d0ZmP9F5uORXHoRiLIfepU3tAXUHivTqJc0zX-hA9ZLYISHMR6zdpKx_3l0gbp23_E-

6hvu2d1FogI_TgxCm9T2e47r4lMeCNreaqD2cf6iUxlxG8sEpce8gTNK-8Le0xf709BtIzkFSaUekGDgPHVnwY6LsaWurjriB1rMyOQ

Bearer after is " access_token "

  // GET: api/Tests/5
        [ResponseType(typeof(Test))]
       // [Authorize(Roles = "Admin,User,Company,Counselor")]
       [Authorize]
        public IHttpActionResult GetTest(int id)
        {
            Test test = db.Tests.Find(id);
            if (test == null)
            {
                return NotFound();
            }

            return Ok(test);
        }

come from:

http://www.asp.net/web-api/overview/security/individual-accounts-in-web-api