Click here to Skip to main content
14,240,610 members

Web Development

 
GeneralRe: "The requested resource does not support http method 'GET" Pin
Kevin Marois7-Feb-19 11:05
professionalKevin Marois7-Feb-19 11:05 
QuestionAsp.Net MVC Delete Method Not Allowed Pin
Kevin Marois6-Feb-19 6:53
professionalKevin Marois6-Feb-19 6:53 
I'm working on a WPF app against an ASP.Net MVC Web API.

I'm trying to implement a delete in my Operator controller. I'm getting
System.Exception: 'An error occured calling the WebAPI. 
 The status code is 'MethodNotAllowed'. 
 The error message is {"Message":"The requested resource does not support http method 'DELETE'."}'

Client Side Proxy
public async Task DeleteOperatorAsync(Guid id)
{
    await Task.Factory.StartNew(() =>
    {
        var webAPIExecutor = new WebAPIExecutor(ServerUrl, "/Operator/Delete/", Method.DELETE);
        webAPIExecutor.AddParameter(id, "id");
        webAPIExecutor.Execute();
    });
}
Controller
[HttpDelete]
public void Delete(Guid id)
{
    IBusinessLayer bl = new BusLayer();
    bl.DeleteOperator(id);
}

The class WebAPIExecutor is working fine for all other calls so it's most likely not the problem, but I can post it if someone wants to see it.

Fiddler shows this info
DELETE <a href="http://localhost:53175/api/Operator/Delete/">http://localhost:53175/api/Operator/Delete/</a> HTTP/1.1
Accept: application/json, text/json, text/x-json, text/javascript, application/xml, text/xml, text/plain
User-Agent: RestSharp/106.6.7.0
Content-Type: application/json
Host: localhost:53175
Content-Length: 38
Accept-Encoding: gzip, deflate

"77932bef-1b12-4204-9bd7-9a50f854a72a"

All other Web API calls are working. Canyone know what's wrong?
If it's not broken, fix it until it is.
Everything makes sense in someone's mind.
Ya can't fix stupid.

AnswerRe: Asp.Net MVC Delete Method Not Allowed Pin
Richard Deeming6-Feb-19 7:12
mveRichard Deeming6-Feb-19 7:12 
GeneralRe: Asp.Net MVC Delete Method Not Allowed Pin
Kevin Marois6-Feb-19 10:18
professionalKevin Marois6-Feb-19 10:18 
GeneralRe: Asp.Net MVC Delete Method Not Allowed Pin
Richard Deeming7-Feb-19 0:44
mveRichard Deeming7-Feb-19 0:44 
GeneralRe: Asp.Net MVC Delete Method Not Allowed Pin
Kevin Marois7-Feb-19 8:35
professionalKevin Marois7-Feb-19 8:35 
QuestionASP.NET CORE AUTHENTICATION AGAINST ADFS Pin
_dk66072-Feb-19 6:18
member_dk66072-Feb-19 6:18 
AnswerRe: ASP.NET CORE AUTHENTICATION AGAINST ADFS Pin
Mycroft Holmes2-Feb-19 13:33
memberMycroft Holmes2-Feb-19 13:33 
GeneralRe: ASP.NET CORE AUTHENTICATION AGAINST ADFS Pin
_dk66073-Feb-19 2:52
member_dk66073-Feb-19 2:52 
AnswerRe: ASP.NET CORE AUTHENTICATION AGAINST ADFS Pin
Kornfeld Eliyahu Peter3-Feb-19 3:38
mveKornfeld Eliyahu Peter3-Feb-19 3:38 
QuestionDiscussion - MVC vs Core Razor Pages (Core 2.1) and other CRaP stuff Pin
#realJSOP28-Jan-19 3:51
mve#realJSOP28-Jan-19 3:51 
AnswerRe: Discussion - MVC vs Core Razor Pages (Core 2.1) and other CRaP stuff Pin
Richard Deeming28-Jan-19 6:19
mveRichard Deeming28-Jan-19 6:19 
GeneralRe: Discussion - MVC vs Core Razor Pages (Core 2.1) and other CRaP stuff Pin
#realJSOP28-Jan-19 7:27
mve#realJSOP28-Jan-19 7:27 
QuestionCore 2.1 Razor Pages Solution Pin
#realJSOP22-Jan-19 1:52
mve#realJSOP22-Jan-19 1:52 
QuestionBS Carousel local images Pin
Member 1097549721-Jan-19 7:46
memberMember 1097549721-Jan-19 7:46 
AnswerRe: BS Carousel local images Pin
Pete O'Hanlon22-Jan-19 2:03
protectorPete O'Hanlon22-Jan-19 2:03 
GeneralRe: BS Carousel local images Pin
Member 1097549723-Jan-19 8:55
memberMember 1097549723-Jan-19 8:55 
QuestionCreating a 'design your own' feature on my website Pin
Member 1411577011-Jan-19 17:27
memberMember 1411577011-Jan-19 17:27 
AnswerRe: Creating a 'design your own' feature on my website Pin
Nathan Minier16-Jan-19 1:45
professionalNathan Minier16-Jan-19 1:45 
QuestionCreating PIVOT data not producing correct result Pin
samflex10-Jan-19 20:31
membersamflex10-Jan-19 20:31 
AnswerRe: Creating PIVOT data not producing correct result Pin
Richard Deeming11-Jan-19 2:01
mveRichard Deeming11-Jan-19 2:01 
General(Solved) Re: Creating PIVOT data not producing correct result Pin
samflex11-Jan-19 4:14
membersamflex11-Jan-19 4:14 
QuestionObject Type and HTTP JSON Gets Pin
cjb1107-Jan-19 22:04
membercjb1107-Jan-19 22:04 
QuestionWordpress Website Showing Error Pin
Jack_Calder5-Jan-19 0:48
professionalJack_Calder5-Jan-19 0:48 
AnswerRe: Wordpress Website Showing Error Pin
Afzaal Ahmad Zeeshan5-Jan-19 1:51
mveAfzaal Ahmad Zeeshan5-Jan-19 1:51 

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.