Api controller post method returns 404 - not found
I have these controller methods in my web api, both of them accept HttpPost.
The Process() method receives a complex type parameter in the body.
The Install method receives a string parameter in the body.
The Process method is called successfully, but the Install method fails with error 404 - not found, I assume the routing is failing, but I just can't figure out what am I doing wrong...
[HttpPost]
[ResponseType(typeof(IProcessableObject))]
[Route("Workflow/Process")]
public IHttpActionResult Process([FromBody]SerializedObject request)
{
try
{
Type objectType = ResolveType(request.ObjectType);
IProcessableObject obj = (IProcessableObject)JsonSerializer.Deserialize(request.RawObject, objectType);
log.DebugFormat("Processing {0} with workflow {1}", objectType.Name, obj.WorkflowId);
var workflow = workflowController.Get(obj.WorkflowId, true);
var workflowProcessor = new WorkflowProcessor(obj, workflow);
if (workflowProcessor.Process())
return Ok(obj);
return InternalServerError();
}
catch (Exception ex)
{
log.Error(string.Format("Failed processing object {0}", request.ObjectType), ex);
return InternalServerError();
}
}
[HttpPost]
[ResponseType(typeof(int))]
[Route("Workflow/Install/{userName}")]
public IHttpActionResult Install(string userName, [FromBody]string xmlTemplate)
{
try
{
log.DebugFormat("User {0} is installing new workflow:{1}{2}", userName, Environment.NewLine, xmlTemplate);
var wf = workflowController.Install(xmlTemplate, userName);
if (wf == null)
return BadRequest();
return Ok(wf.WorkflowId);
}
catch (Exception ex)
{
log.Error("Failed installing workflow", ex);
return InternalServerError();
}
}
And from my MVC application I call them like this:
public static IProcessableObject Process(IProcessableObject obj, bool isProxy = false)
{
string requestURL = string.Concat(wfServiceUrl, "Workflow/Process");
var requestData = new SerializedObject
{
RawObject = JsonSerializer.Serialize(obj),
ObjectType = isProxy ? obj.GetType().BaseType.AssemblyQualifiedName : obj.GetType().AssemblyQualifiedName
};
using (var client = new WebClient())
{
client.Headers[HttpRequestHeader.ContentType] = "application/json";
var result = client.UploadString(requestURL, JsonSerializer.Serialize(requestData));
return (IProcessableObject)JsonSerializer.Deserialize(result, isProxy ? obj.GetType().BaseType : obj.GetType());
}
}
public static int Install(string workflowTemplate, string userName)
{
string requestURL = string.Concat(wfServiceUrl, "Workflow/Install/", userName);
using (var client = new WebClient())
{
client.Headers[HttpRequestHeader.ContentType] = "application/json";
var result = client.UploadString(requestURL, JsonSerializer.Serialize(workflowTemplate));
return JsonSerializer.Deserialize<int>(result);
}
}
public static class WebApiConfig
{
public static void Register(HttpConfiguration config)
{
// Web API configuration and services
// Web API routes
config.MapHttpAttributeRoutes();
config.Routes.MapHttpRoute(
name: "DefaultApi",
routeTemplate: "api/{controller}/{id}",
defaults: new { id = RouteParameter.Optional }
);
config.Formatters.JsonFormatter.SupportedMediaTypes.Add(new MediaTypeHeaderValue("text/html"));
}
}
c# json asp.net-web-api
|
show 4 more comments
I have these controller methods in my web api, both of them accept HttpPost.
The Process() method receives a complex type parameter in the body.
The Install method receives a string parameter in the body.
The Process method is called successfully, but the Install method fails with error 404 - not found, I assume the routing is failing, but I just can't figure out what am I doing wrong...
[HttpPost]
[ResponseType(typeof(IProcessableObject))]
[Route("Workflow/Process")]
public IHttpActionResult Process([FromBody]SerializedObject request)
{
try
{
Type objectType = ResolveType(request.ObjectType);
IProcessableObject obj = (IProcessableObject)JsonSerializer.Deserialize(request.RawObject, objectType);
log.DebugFormat("Processing {0} with workflow {1}", objectType.Name, obj.WorkflowId);
var workflow = workflowController.Get(obj.WorkflowId, true);
var workflowProcessor = new WorkflowProcessor(obj, workflow);
if (workflowProcessor.Process())
return Ok(obj);
return InternalServerError();
}
catch (Exception ex)
{
log.Error(string.Format("Failed processing object {0}", request.ObjectType), ex);
return InternalServerError();
}
}
[HttpPost]
[ResponseType(typeof(int))]
[Route("Workflow/Install/{userName}")]
public IHttpActionResult Install(string userName, [FromBody]string xmlTemplate)
{
try
{
log.DebugFormat("User {0} is installing new workflow:{1}{2}", userName, Environment.NewLine, xmlTemplate);
var wf = workflowController.Install(xmlTemplate, userName);
if (wf == null)
return BadRequest();
return Ok(wf.WorkflowId);
}
catch (Exception ex)
{
log.Error("Failed installing workflow", ex);
return InternalServerError();
}
}
And from my MVC application I call them like this:
public static IProcessableObject Process(IProcessableObject obj, bool isProxy = false)
{
string requestURL = string.Concat(wfServiceUrl, "Workflow/Process");
var requestData = new SerializedObject
{
RawObject = JsonSerializer.Serialize(obj),
ObjectType = isProxy ? obj.GetType().BaseType.AssemblyQualifiedName : obj.GetType().AssemblyQualifiedName
};
using (var client = new WebClient())
{
client.Headers[HttpRequestHeader.ContentType] = "application/json";
var result = client.UploadString(requestURL, JsonSerializer.Serialize(requestData));
return (IProcessableObject)JsonSerializer.Deserialize(result, isProxy ? obj.GetType().BaseType : obj.GetType());
}
}
public static int Install(string workflowTemplate, string userName)
{
string requestURL = string.Concat(wfServiceUrl, "Workflow/Install/", userName);
using (var client = new WebClient())
{
client.Headers[HttpRequestHeader.ContentType] = "application/json";
var result = client.UploadString(requestURL, JsonSerializer.Serialize(workflowTemplate));
return JsonSerializer.Deserialize<int>(result);
}
}
public static class WebApiConfig
{
public static void Register(HttpConfiguration config)
{
// Web API configuration and services
// Web API routes
config.MapHttpAttributeRoutes();
config.Routes.MapHttpRoute(
name: "DefaultApi",
routeTemplate: "api/{controller}/{id}",
defaults: new { id = RouteParameter.Optional }
);
config.Formatters.JsonFormatter.SupportedMediaTypes.Add(new MediaTypeHeaderValue("text/html"));
}
}
c# json asp.net-web-api
Are you using .net Core framework ?
– Rahul
Nov 15 '18 at 16:00
I guess check your parameters order for Install method.
– Rorschach
Nov 15 '18 at 16:08
I'm not using .Net Core, it's .Net standard. Tried to change the order of the parameters in the controller method, but no success, the same thing keeps happening. It seems my post methods only work when there is only a complex type argument posted (See Process() method). If the argument is string as in the Install() method, it fails
– Gratziani V.
Nov 15 '18 at 16:24
@GratzianiV. show the WebApiConfig and also show if there are any prefixes on the controller.
– Nkosi
Nov 15 '18 at 16:49
I have updated the post with the web api config. What do you mean by prefixes on the controller? I have no atrributes on the controller class...
– Gratziani V.
Nov 15 '18 at 17:01
|
show 4 more comments
I have these controller methods in my web api, both of them accept HttpPost.
The Process() method receives a complex type parameter in the body.
The Install method receives a string parameter in the body.
The Process method is called successfully, but the Install method fails with error 404 - not found, I assume the routing is failing, but I just can't figure out what am I doing wrong...
[HttpPost]
[ResponseType(typeof(IProcessableObject))]
[Route("Workflow/Process")]
public IHttpActionResult Process([FromBody]SerializedObject request)
{
try
{
Type objectType = ResolveType(request.ObjectType);
IProcessableObject obj = (IProcessableObject)JsonSerializer.Deserialize(request.RawObject, objectType);
log.DebugFormat("Processing {0} with workflow {1}", objectType.Name, obj.WorkflowId);
var workflow = workflowController.Get(obj.WorkflowId, true);
var workflowProcessor = new WorkflowProcessor(obj, workflow);
if (workflowProcessor.Process())
return Ok(obj);
return InternalServerError();
}
catch (Exception ex)
{
log.Error(string.Format("Failed processing object {0}", request.ObjectType), ex);
return InternalServerError();
}
}
[HttpPost]
[ResponseType(typeof(int))]
[Route("Workflow/Install/{userName}")]
public IHttpActionResult Install(string userName, [FromBody]string xmlTemplate)
{
try
{
log.DebugFormat("User {0} is installing new workflow:{1}{2}", userName, Environment.NewLine, xmlTemplate);
var wf = workflowController.Install(xmlTemplate, userName);
if (wf == null)
return BadRequest();
return Ok(wf.WorkflowId);
}
catch (Exception ex)
{
log.Error("Failed installing workflow", ex);
return InternalServerError();
}
}
And from my MVC application I call them like this:
public static IProcessableObject Process(IProcessableObject obj, bool isProxy = false)
{
string requestURL = string.Concat(wfServiceUrl, "Workflow/Process");
var requestData = new SerializedObject
{
RawObject = JsonSerializer.Serialize(obj),
ObjectType = isProxy ? obj.GetType().BaseType.AssemblyQualifiedName : obj.GetType().AssemblyQualifiedName
};
using (var client = new WebClient())
{
client.Headers[HttpRequestHeader.ContentType] = "application/json";
var result = client.UploadString(requestURL, JsonSerializer.Serialize(requestData));
return (IProcessableObject)JsonSerializer.Deserialize(result, isProxy ? obj.GetType().BaseType : obj.GetType());
}
}
public static int Install(string workflowTemplate, string userName)
{
string requestURL = string.Concat(wfServiceUrl, "Workflow/Install/", userName);
using (var client = new WebClient())
{
client.Headers[HttpRequestHeader.ContentType] = "application/json";
var result = client.UploadString(requestURL, JsonSerializer.Serialize(workflowTemplate));
return JsonSerializer.Deserialize<int>(result);
}
}
public static class WebApiConfig
{
public static void Register(HttpConfiguration config)
{
// Web API configuration and services
// Web API routes
config.MapHttpAttributeRoutes();
config.Routes.MapHttpRoute(
name: "DefaultApi",
routeTemplate: "api/{controller}/{id}",
defaults: new { id = RouteParameter.Optional }
);
config.Formatters.JsonFormatter.SupportedMediaTypes.Add(new MediaTypeHeaderValue("text/html"));
}
}
c# json asp.net-web-api
I have these controller methods in my web api, both of them accept HttpPost.
The Process() method receives a complex type parameter in the body.
The Install method receives a string parameter in the body.
The Process method is called successfully, but the Install method fails with error 404 - not found, I assume the routing is failing, but I just can't figure out what am I doing wrong...
[HttpPost]
[ResponseType(typeof(IProcessableObject))]
[Route("Workflow/Process")]
public IHttpActionResult Process([FromBody]SerializedObject request)
{
try
{
Type objectType = ResolveType(request.ObjectType);
IProcessableObject obj = (IProcessableObject)JsonSerializer.Deserialize(request.RawObject, objectType);
log.DebugFormat("Processing {0} with workflow {1}", objectType.Name, obj.WorkflowId);
var workflow = workflowController.Get(obj.WorkflowId, true);
var workflowProcessor = new WorkflowProcessor(obj, workflow);
if (workflowProcessor.Process())
return Ok(obj);
return InternalServerError();
}
catch (Exception ex)
{
log.Error(string.Format("Failed processing object {0}", request.ObjectType), ex);
return InternalServerError();
}
}
[HttpPost]
[ResponseType(typeof(int))]
[Route("Workflow/Install/{userName}")]
public IHttpActionResult Install(string userName, [FromBody]string xmlTemplate)
{
try
{
log.DebugFormat("User {0} is installing new workflow:{1}{2}", userName, Environment.NewLine, xmlTemplate);
var wf = workflowController.Install(xmlTemplate, userName);
if (wf == null)
return BadRequest();
return Ok(wf.WorkflowId);
}
catch (Exception ex)
{
log.Error("Failed installing workflow", ex);
return InternalServerError();
}
}
And from my MVC application I call them like this:
public static IProcessableObject Process(IProcessableObject obj, bool isProxy = false)
{
string requestURL = string.Concat(wfServiceUrl, "Workflow/Process");
var requestData = new SerializedObject
{
RawObject = JsonSerializer.Serialize(obj),
ObjectType = isProxy ? obj.GetType().BaseType.AssemblyQualifiedName : obj.GetType().AssemblyQualifiedName
};
using (var client = new WebClient())
{
client.Headers[HttpRequestHeader.ContentType] = "application/json";
var result = client.UploadString(requestURL, JsonSerializer.Serialize(requestData));
return (IProcessableObject)JsonSerializer.Deserialize(result, isProxy ? obj.GetType().BaseType : obj.GetType());
}
}
public static int Install(string workflowTemplate, string userName)
{
string requestURL = string.Concat(wfServiceUrl, "Workflow/Install/", userName);
using (var client = new WebClient())
{
client.Headers[HttpRequestHeader.ContentType] = "application/json";
var result = client.UploadString(requestURL, JsonSerializer.Serialize(workflowTemplate));
return JsonSerializer.Deserialize<int>(result);
}
}
public static class WebApiConfig
{
public static void Register(HttpConfiguration config)
{
// Web API configuration and services
// Web API routes
config.MapHttpAttributeRoutes();
config.Routes.MapHttpRoute(
name: "DefaultApi",
routeTemplate: "api/{controller}/{id}",
defaults: new { id = RouteParameter.Optional }
);
config.Formatters.JsonFormatter.SupportedMediaTypes.Add(new MediaTypeHeaderValue("text/html"));
}
}
c# json asp.net-web-api
c# json asp.net-web-api
edited Nov 15 '18 at 17:00
Gratziani V.
asked Nov 15 '18 at 15:29
Gratziani V.Gratziani V.
6239
6239
Are you using .net Core framework ?
– Rahul
Nov 15 '18 at 16:00
I guess check your parameters order for Install method.
– Rorschach
Nov 15 '18 at 16:08
I'm not using .Net Core, it's .Net standard. Tried to change the order of the parameters in the controller method, but no success, the same thing keeps happening. It seems my post methods only work when there is only a complex type argument posted (See Process() method). If the argument is string as in the Install() method, it fails
– Gratziani V.
Nov 15 '18 at 16:24
@GratzianiV. show the WebApiConfig and also show if there are any prefixes on the controller.
– Nkosi
Nov 15 '18 at 16:49
I have updated the post with the web api config. What do you mean by prefixes on the controller? I have no atrributes on the controller class...
– Gratziani V.
Nov 15 '18 at 17:01
|
show 4 more comments
Are you using .net Core framework ?
– Rahul
Nov 15 '18 at 16:00
I guess check your parameters order for Install method.
– Rorschach
Nov 15 '18 at 16:08
I'm not using .Net Core, it's .Net standard. Tried to change the order of the parameters in the controller method, but no success, the same thing keeps happening. It seems my post methods only work when there is only a complex type argument posted (See Process() method). If the argument is string as in the Install() method, it fails
– Gratziani V.
Nov 15 '18 at 16:24
@GratzianiV. show the WebApiConfig and also show if there are any prefixes on the controller.
– Nkosi
Nov 15 '18 at 16:49
I have updated the post with the web api config. What do you mean by prefixes on the controller? I have no atrributes on the controller class...
– Gratziani V.
Nov 15 '18 at 17:01
Are you using .net Core framework ?
– Rahul
Nov 15 '18 at 16:00
Are you using .net Core framework ?
– Rahul
Nov 15 '18 at 16:00
I guess check your parameters order for Install method.
– Rorschach
Nov 15 '18 at 16:08
I guess check your parameters order for Install method.
– Rorschach
Nov 15 '18 at 16:08
I'm not using .Net Core, it's .Net standard. Tried to change the order of the parameters in the controller method, but no success, the same thing keeps happening. It seems my post methods only work when there is only a complex type argument posted (See Process() method). If the argument is string as in the Install() method, it fails
– Gratziani V.
Nov 15 '18 at 16:24
I'm not using .Net Core, it's .Net standard. Tried to change the order of the parameters in the controller method, but no success, the same thing keeps happening. It seems my post methods only work when there is only a complex type argument posted (See Process() method). If the argument is string as in the Install() method, it fails
– Gratziani V.
Nov 15 '18 at 16:24
@GratzianiV. show the WebApiConfig and also show if there are any prefixes on the controller.
– Nkosi
Nov 15 '18 at 16:49
@GratzianiV. show the WebApiConfig and also show if there are any prefixes on the controller.
– Nkosi
Nov 15 '18 at 16:49
I have updated the post with the web api config. What do you mean by prefixes on the controller? I have no atrributes on the controller class...
– Gratziani V.
Nov 15 '18 at 17:01
I have updated the post with the web api config. What do you mean by prefixes on the controller? I have no atrributes on the controller class...
– Gratziani V.
Nov 15 '18 at 17:01
|
show 4 more comments
1 Answer
1
active
oldest
votes
Try changing this:
[Route("Workflow/Install/{userName}")]
For this:
[Route("api/Workflow/Install/{userName}")]
And do the same with your other routes, add api/ and that should work.
doesn't work, same result
– Gratziani V.
Nov 15 '18 at 16:19
did change here to? string requestURL = string.Concat(wfServiceUrl, "Workflow/Install/", userName);
– Enrique González
Nov 15 '18 at 16:24
Yes I did, but no luck
– Gratziani V.
Nov 15 '18 at 16:57
What's the value of this variable: wfServiceUrl?
– Enrique González
Nov 15 '18 at 16:59
its: localhost:62855
– Gratziani V.
Nov 15 '18 at 17:02
|
show 1 more comment
Your Answer
StackExchange.ifUsing("editor", function () {
StackExchange.using("externalEditor", function () {
StackExchange.using("snippets", function () {
StackExchange.snippets.init();
});
});
}, "code-snippets");
StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "1"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});
function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});
}
});
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53322734%2fapi-controller-post-method-returns-404-not-found%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
Try changing this:
[Route("Workflow/Install/{userName}")]
For this:
[Route("api/Workflow/Install/{userName}")]
And do the same with your other routes, add api/ and that should work.
doesn't work, same result
– Gratziani V.
Nov 15 '18 at 16:19
did change here to? string requestURL = string.Concat(wfServiceUrl, "Workflow/Install/", userName);
– Enrique González
Nov 15 '18 at 16:24
Yes I did, but no luck
– Gratziani V.
Nov 15 '18 at 16:57
What's the value of this variable: wfServiceUrl?
– Enrique González
Nov 15 '18 at 16:59
its: localhost:62855
– Gratziani V.
Nov 15 '18 at 17:02
|
show 1 more comment
Try changing this:
[Route("Workflow/Install/{userName}")]
For this:
[Route("api/Workflow/Install/{userName}")]
And do the same with your other routes, add api/ and that should work.
doesn't work, same result
– Gratziani V.
Nov 15 '18 at 16:19
did change here to? string requestURL = string.Concat(wfServiceUrl, "Workflow/Install/", userName);
– Enrique González
Nov 15 '18 at 16:24
Yes I did, but no luck
– Gratziani V.
Nov 15 '18 at 16:57
What's the value of this variable: wfServiceUrl?
– Enrique González
Nov 15 '18 at 16:59
its: localhost:62855
– Gratziani V.
Nov 15 '18 at 17:02
|
show 1 more comment
Try changing this:
[Route("Workflow/Install/{userName}")]
For this:
[Route("api/Workflow/Install/{userName}")]
And do the same with your other routes, add api/ and that should work.
Try changing this:
[Route("Workflow/Install/{userName}")]
For this:
[Route("api/Workflow/Install/{userName}")]
And do the same with your other routes, add api/ and that should work.
answered Nov 15 '18 at 16:06
Enrique GonzálezEnrique González
13412
13412
doesn't work, same result
– Gratziani V.
Nov 15 '18 at 16:19
did change here to? string requestURL = string.Concat(wfServiceUrl, "Workflow/Install/", userName);
– Enrique González
Nov 15 '18 at 16:24
Yes I did, but no luck
– Gratziani V.
Nov 15 '18 at 16:57
What's the value of this variable: wfServiceUrl?
– Enrique González
Nov 15 '18 at 16:59
its: localhost:62855
– Gratziani V.
Nov 15 '18 at 17:02
|
show 1 more comment
doesn't work, same result
– Gratziani V.
Nov 15 '18 at 16:19
did change here to? string requestURL = string.Concat(wfServiceUrl, "Workflow/Install/", userName);
– Enrique González
Nov 15 '18 at 16:24
Yes I did, but no luck
– Gratziani V.
Nov 15 '18 at 16:57
What's the value of this variable: wfServiceUrl?
– Enrique González
Nov 15 '18 at 16:59
its: localhost:62855
– Gratziani V.
Nov 15 '18 at 17:02
doesn't work, same result
– Gratziani V.
Nov 15 '18 at 16:19
doesn't work, same result
– Gratziani V.
Nov 15 '18 at 16:19
did change here to? string requestURL = string.Concat(wfServiceUrl, "Workflow/Install/", userName);
– Enrique González
Nov 15 '18 at 16:24
did change here to? string requestURL = string.Concat(wfServiceUrl, "Workflow/Install/", userName);
– Enrique González
Nov 15 '18 at 16:24
Yes I did, but no luck
– Gratziani V.
Nov 15 '18 at 16:57
Yes I did, but no luck
– Gratziani V.
Nov 15 '18 at 16:57
What's the value of this variable: wfServiceUrl?
– Enrique González
Nov 15 '18 at 16:59
What's the value of this variable: wfServiceUrl?
– Enrique González
Nov 15 '18 at 16:59
its: localhost:62855
– Gratziani V.
Nov 15 '18 at 17:02
its: localhost:62855
– Gratziani V.
Nov 15 '18 at 17:02
|
show 1 more comment
Thanks for contributing an answer to Stack Overflow!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53322734%2fapi-controller-post-method-returns-404-not-found%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Are you using .net Core framework ?
– Rahul
Nov 15 '18 at 16:00
I guess check your parameters order for Install method.
– Rorschach
Nov 15 '18 at 16:08
I'm not using .Net Core, it's .Net standard. Tried to change the order of the parameters in the controller method, but no success, the same thing keeps happening. It seems my post methods only work when there is only a complex type argument posted (See Process() method). If the argument is string as in the Install() method, it fails
– Gratziani V.
Nov 15 '18 at 16:24
@GratzianiV. show the WebApiConfig and also show if there are any prefixes on the controller.
– Nkosi
Nov 15 '18 at 16:49
I have updated the post with the web api config. What do you mean by prefixes on the controller? I have no atrributes on the controller class...
– Gratziani V.
Nov 15 '18 at 17:01