routing

ASP.NET returns HTTP 500 instead of 404

隐身守侯 提交于 2020-04-27 07:31:02
问题 For some reason, my ASP.NET web application returns error 500 (apparently originating from handler "ExtensionlessUrlHandler-Integrated-4.0") when a non-existing route is accessed. This issue has started to occur after I had changed path="*." to path="*" in the <add name="ExtensionlessUrlHandler-Integrated-4.0" ... line of my Web.config file in order to solve another problem (failure to process routes with a dot after the last slash). I cannot change path back to "*." , even though exactly

ASP.NET returns HTTP 500 instead of 404

天大地大妈咪最大 提交于 2020-04-27 07:28:57
问题 For some reason, my ASP.NET web application returns error 500 (apparently originating from handler "ExtensionlessUrlHandler-Integrated-4.0") when a non-existing route is accessed. This issue has started to occur after I had changed path="*." to path="*" in the <add name="ExtensionlessUrlHandler-Integrated-4.0" ... line of my Web.config file in order to solve another problem (failure to process routes with a dot after the last slash). I cannot change path back to "*." , even though exactly

ASP.NET returns HTTP 500 instead of 404

落爺英雄遲暮 提交于 2020-04-27 07:28:54
问题 For some reason, my ASP.NET web application returns error 500 (apparently originating from handler "ExtensionlessUrlHandler-Integrated-4.0") when a non-existing route is accessed. This issue has started to occur after I had changed path="*." to path="*" in the <add name="ExtensionlessUrlHandler-Integrated-4.0" ... line of my Web.config file in order to solve another problem (failure to process routes with a dot after the last slash). I cannot change path back to "*." , even though exactly

ASP.NET returns HTTP 500 instead of 404

蓝咒 提交于 2020-04-27 07:26:42
问题 For some reason, my ASP.NET web application returns error 500 (apparently originating from handler "ExtensionlessUrlHandler-Integrated-4.0") when a non-existing route is accessed. This issue has started to occur after I had changed path="*." to path="*" in the <add name="ExtensionlessUrlHandler-Integrated-4.0" ... line of my Web.config file in order to solve another problem (failure to process routes with a dot after the last slash). I cannot change path back to "*." , even though exactly

Response and Error handling in Google Apps Scripts. doPost? withFailureHandler()?

风流意气都作罢 提交于 2020-04-15 15:43:43
问题 I hope everyone is safe and healthy given the current situation. I have a question in regards to a project with google apps script. I have a web app and I have been able to figure out routing with doGet() using links etc. //global variables const sheetId = "foo"; const Route = {}; Route.path = function(route, callback){ Route[route] = callback; } function doGet(e){ Route.path("newAccountForm",loadNewForm); Route.path("updateBrandForm", loadUpdateForm); if(Route[e.parameters.v]) { return Route

Response and Error handling in Google Apps Scripts. doPost? withFailureHandler()?

元气小坏坏 提交于 2020-04-15 15:43:42
问题 I hope everyone is safe and healthy given the current situation. I have a question in regards to a project with google apps script. I have a web app and I have been able to figure out routing with doGet() using links etc. //global variables const sheetId = "foo"; const Route = {}; Route.path = function(route, callback){ Route[route] = callback; } function doGet(e){ Route.path("newAccountForm",loadNewForm); Route.path("updateBrandForm", loadUpdateForm); if(Route[e.parameters.v]) { return Route

How to overload controller methods with same number of arguments in ASP.NET Core Web API?

断了今生、忘了曾经 提交于 2020-04-13 17:42:23
问题 I'm migrating a full .NET Framework Web API 2 REST project over to ASP.NET Core 2.2 and getting a bit lost in the routing. In Web API 2 I was able to overload routes with the same number of parameters based on the parameter type, e.g. I could have Customer.Get(int ContactId) and Customer.Get(DateTime includeCustomersCreatedSince) and incoming requests would be routed accordingly. I haven't been able to achieve the same thing in .NET Core, I either get a 405 error or a 404 and this error

Dynamic Routes with children and components from database

不想你离开。 提交于 2020-04-12 07:27:28
问题 USER 1 { path: 'dashboard', component: DashboardComponent, children: [ { path: 'users', component: UsersComponent }, ], canActivate: [AuthGuard], { path: '**', redirectTo: 'dashboard', pathMatch: 'full' } } USER 2 { path: 'dashboard', component: DashboardComponent, children: [ { path: 'reception', component: ReceptionComponent }, { path: 'restaurants', component: RestaurantsComponent }, ... ], canActivate: [AuthGuard], { path: '**', redirectTo: 'dashboard', pathMatch: 'full' } } How to

ASP.NET suddenly wants a trailing slash

若如初见. 提交于 2020-04-07 09:29:29
问题 In an ASP.NET application, we have plenty (think, several dozen) of controller classes like this: [RoutePrefix("some/thing/1.0")] public class SomeController : ApiController { [HttpGet] [Route("")] public string GetInfo() { return "hello world"; } [HttpPut] [Route("")] public void StoreInfo(string info) { // ... } } This has been working fine for some weeks, without any issues. We could call those endpoints as follows: GET https://myWebApp/client/some/thing/1.0 Now, with yesterday's nightly

ASP.NET suddenly wants a trailing slash

↘锁芯ラ 提交于 2020-04-07 09:28:08
问题 In an ASP.NET application, we have plenty (think, several dozen) of controller classes like this: [RoutePrefix("some/thing/1.0")] public class SomeController : ApiController { [HttpGet] [Route("")] public string GetInfo() { return "hello world"; } [HttpPut] [Route("")] public void StoreInfo(string info) { // ... } } This has been working fine for some weeks, without any issues. We could call those endpoints as follows: GET https://myWebApp/client/some/thing/1.0 Now, with yesterday's nightly