ASP.NET MVC4 路由
ASP.NET MVC4 routes
有人可以告诉我如何为这个控制器动作编写路由吗?
我收到此错误,但不确定原因或如何修复它:
The parameters dictionary contains a null entry for parameter 'PID' of non-nullable type 'System.Int32'
//
// GET: /Account/ExternalLogOn
// https://example.com/Account/ExternalLogOn?Ticket=c4020d4a1b8d4ea0f2c6320885d44ad4eec080fd75&PID=1127326&RUrl=/Home/Info
//
public ActionResult ExternalLogOn(string Ticket, int PID, string Name, string EC, String State, string RUrl)
参数 Name 、 EC 和 State 是可选的。另外,这是 GET。
将int PID
更改为int? PID
这将使它成为 nullable
,因此不需要。
编辑
我可能错了,但你能把字符串中的 /Home/Info 改成 %2fHome%2fInfo
我认为它可能在其中发挥作用。
有人可以告诉我如何为这个控制器动作编写路由吗?
我收到此错误,但不确定原因或如何修复它:
The parameters dictionary contains a null entry for parameter 'PID' of non-nullable type 'System.Int32'
//
// GET: /Account/ExternalLogOn
// https://example.com/Account/ExternalLogOn?Ticket=c4020d4a1b8d4ea0f2c6320885d44ad4eec080fd75&PID=1127326&RUrl=/Home/Info
//
public ActionResult ExternalLogOn(string Ticket, int PID, string Name, string EC, String State, string RUrl)
参数 Name 、 EC 和 State 是可选的。另外,这是 GET。
将int PID
更改为int? PID
这将使它成为 nullable
,因此不需要。
编辑
我可能错了,但你能把字符串中的 /Home/Info 改成 %2fHome%2fInfo
我认为它可能在其中发挥作用。