-
Notifications
You must be signed in to change notification settings - Fork 16
Description
- Asp.Net Core v2.x with Platform .Net 4.7
- Visual Studio 2017 15.5.6
- RouteJs.AspNet 2.2.0
I am using Attribute routing in my controller. When the attribute matches the IActionResult function name then all works well as follows:
[HttpGet("TestExcel")]
public IActionResult TestExcel()
{
...
)
When the attribute does not match the IActionResult function name then routing fails every time:
[HttpGet("TestExcel")]
public IActionResult TestExcelNew()
{
...
)
Here is the simple js which is just my own route class I use in all my js, all other routes work except for the above conditions:
static TestEPPLus()
{
return Router.action('Home', 'TestEPPlus');
}
When my code makes the ajax call using the above Router.action it gives this message:
ErrorcolumnNumber: 10
fileName: "http://localhost/CoreTest/_routejs/3c4b18a6dee39a5732c312c9dffa798f24cb66bf"
lineNumber: 314
message: "No route could be matched to route values: [object Object]"
stack: "route@http://localhost/CoreTest/_routejs/3c4b18a6dee39a5732c312c9dffa798f24cb66bf:314:10
action@http://localhost/CoreTest/_routejs/3c4b18a6dee39a5732c312c9dffa798f24cb66bf:299:11
Only when the Route attribute do NOT match the IActionResult function in the controller