Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Method not allowed error
Message
 
 
General information
Forum:
ASP.NET
Category:
Other
Environment versions
Environment:
C# 5.0
OS:
Windows 10
Database:
MS SQL Server
Miscellaneous
Thread ID:
01649202
Message ID:
01649207
Views:
35
>Your code doesn't show any HttpGet attribute. But if the attribute is present then the method name should be irrelevant (assuming WebApi and attribute routing)
>
>>UPDATE. My colleague helped to solve this problem. For unknown reason the methods need to have Get in front of the method name. Although I also added explicit attribute HTTPGet just in case.
>>

I didn't have that attribute (I thought it's the default). My colleague suggested to add Get in front of the name (and I added the attribute at that same time as well). I think his suggestion was that made it work, but having attribute was probably helpful as well. I can try changing name again to see if that is indeed the case.

UPDATE. I changed the name and indeed it worked. So, as long as I explicitly add an attribute, the name doesn't matter. But the attribute needs to be present.
If it's not broken, fix it until it is.


My Blog
Previous
Reply
Map
View

Click here to load this message in the networking platform