Click here to Skip to main content
14,301,066 members

Web Development

 
QuestionProblems Calling Asp.Net WebAPI 2 Pin
Kevin Marois11-Jun-19 12:07
professionalKevin Marois11-Jun-19 12:07 
AnswerRe: Problems Calling Asp.Net WebAPI 2 Pin
Richard Deeming12-Jun-19 0:45
mveRichard Deeming12-Jun-19 0:45 
GeneralRe: Problems Calling Asp.Net WebAPI 2 Pin
Kevin Marois12-Jun-19 4:02
professionalKevin Marois12-Jun-19 4:02 
GeneralRe: Problems Calling Asp.Net WebAPI 2 Pin
Richard Deeming12-Jun-19 4:25
mveRichard Deeming12-Jun-19 4:25 
GeneralRe: Problems Calling Asp.Net WebAPI 2 Pin
Kevin Marois12-Jun-19 5:26
professionalKevin Marois12-Jun-19 5:26 
GeneralRe: Problems Calling Asp.Net WebAPI 2 Pin
Kevin Marois12-Jun-19 6:34
professionalKevin Marois12-Jun-19 6:34 
GeneralRe: Problems Calling Asp.Net WebAPI 2 Pin
Richard Deeming12-Jun-19 8:10
mveRichard Deeming12-Jun-19 8:10 
QuestionEliminating External (Commercial) References/Creating my own design/Stylesheets Pin
Member 120802018-Jun-19 6:23
memberMember 120802018-Jun-19 6:23 
AnswerRe: Eliminating External (Commercial) References/Creating my own design/Stylesheets Pin
Afzaal Ahmad Zeeshan8-Jun-19 10:18
mveAfzaal Ahmad Zeeshan8-Jun-19 10:18 
AnswerRe: Eliminating External (Commercial) References/Creating my own design/Stylesheets Pin
jamieereynoldss9-Jun-19 23:51
memberjamieereynoldss9-Jun-19 23:51 
AnswerRe: Eliminating External (Commercial) References/Creating my own design/Stylesheets Pin
#realJSOP10-Jun-19 5:08
mve#realJSOP10-Jun-19 5:08 
QuestionHow to learn python numpy library easily, which functions are important Pin
Member 144829305-Jun-19 22:54
memberMember 144829305-Jun-19 22:54 
AnswerRe: How to learn python numpy library easily, which functions are important Pin
Vinod Jangle6-Jun-19 3:56
memberVinod Jangle6-Jun-19 3:56 
SuggestionRe: How to learn python numpy library easily, which functions are important Pin
Richard Deeming6-Jun-19 4:38
mveRichard Deeming6-Jun-19 4:38 
GeneralRe: How to learn python numpy library easily, which functions are important Pin
Vinod Jangle6-Jun-19 6:05
memberVinod Jangle6-Jun-19 6:05 
GeneralMessage Closed Pin
9-Jun-19 23:49
memberjamieereynoldss9-Jun-19 23:49 
AnswerMessage Closed Pin
15-Jun-19 3:55
memberRahul Khot15-Jun-19 3:55 
QuestionPass Guid To Controller Pin
Kevin Marois4-Jun-19 8:37
professionalKevin Marois4-Jun-19 8:37 
AnswerRe: Pass Guid To Controller Pin
Richard Deeming5-Jun-19 12:26
mveRichard Deeming5-Jun-19 12:26 
Have you tried making the request directly from Postman or a similar tool? That should at least narrow down whether the problem is the server or the client.

I've got several API endpoints using Guid parameters, and they just work. The only obvious difference I can see is that I'm using attribute routing:
Attribute Routing in ASP.NET Web API 2 | Microsoft Docs[^]

Eg:

Server:
[RoutePrefix("somePath")]
public class MyController : ApiController
{
    [HttpDelete]
    [Route("{id:guid}")]
    public async Task<IHttpActionResult> Delete(Guid id, CancellationToken cancellationToken) { ... }
}
Client:
private static readonly HttpClient httpClient = new HttpClient
{
    BaseAddress = new Uri("https://mysite/api/")
};

public async Task<bool> Delete(Guid id, CancellationToken cancellationToken = default)
{
    using (var request = new HttpRequestMessage(HttpMethod.Delete, $"somePath/{id:N}"))
    using (var response = await httpClient.SendAsync(request, cancellationToken).ConfigureAwait(false))
    {
        if (response.StatusCode == HttpStatusCode.NotFound) return false;
        response.EnsureSuccessStatusCode();
        return true;
    }
}




"These people looked deep within my soul and assigned me a number based on the order in which I joined."
- Homer

GeneralRe: Pass Guid To Controller Pin
Kevin Marois7-Jun-19 8:03
professionalKevin Marois7-Jun-19 8:03 
GeneralRe: Pass Guid To Controller Pin
Kevin Marois11-Jun-19 12:08
professionalKevin Marois11-Jun-19 12:08 
QuestionConfused about App secrets Pin
Super Lloyd30-May-19 19:32
memberSuper Lloyd30-May-19 19:32 
AnswerRe: Confused about App secrets Pin
Kornfeld Eliyahu Peter2-Jun-19 22:44
mveKornfeld Eliyahu Peter2-Jun-19 22:44 
AnswerRe: Confused about App secrets Pin
Eddy Vluggen2-Jun-19 23:04
mveEddy Vluggen2-Jun-19 23:04 
QuestionPowershell script not working suddenly Pin
Member 1447460730-May-19 12:15
memberMember 1447460730-May-19 12:15 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.