[英]ASP.NET NameValueCollection Empty despite POST being visible in Wireshark
So I have run into a problem. 所以我遇到了一个问题。 This is my environment: Visual Studio 2015 ASP.NET Solution and using IIS Express for debugging purposes.
这是我的环境:Visual Studio 2015 ASP.NET解决方案,并使用IIS Express进行调试。
I am using Chrome's Postman to submit POST data to my application and despite seeing the form data in Wireshark, I am unable to see the data within my Request object in the Page.Load for the page that is being hit. 我正在使用Chrome的Postman将POST数据提交到我的应用程序,尽管在Wireshark中看到了表单数据,但是我无法在正在被点击的页面的Page.Load中的Request对象中看到这些数据。
What could I be missing? 我可能会缺少什么?
Paul 保罗
I am not sure why I got a negative vote for my question. 我不确定为什么我的问题投了反对票。 Would appreciate knowing why?
很想知道为什么吗?
However, I wanted to let you know that I did resolve my problem and it was specific to the RouteConfig.cs solution and how FriendURLs were implemented. 但是,我想告诉您我确实解决了问题,并且仅针对RouteConfig.cs解决方案以及FriendURL的实现方式。
My original Routconfig.cs was: 我最初的Routconfig.cs是:
public static void RegisterRoutes(RouteCollection routes)
{
var settings = new FriendlyUrlSettings();
settings.AutoRedirectMode = RedirectMode.Permanent;
routes.EnableFriendlyUrls(settings);
}
I was finally able to get post data using the following instead: 我终于可以使用以下内容获取帖子数据:
public static void RegisterRoutes(RouteCollection routes)
{
routes.EnableFriendlyUrls();
}
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.