Click here to Skip to main content
15,887,485 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
Receiver error; System.Net.WebException: 'The remote server returned an error: (405) Method Not Allowed.'

What I have tried:

I have tried the following code in VS2022 .NET 8.0 Windows Forms;

WebClient webClient = new WebClient();
webClient.QueryString.Add("image", "\\\\LS210D314\\share\\Files\\Photos\\My Pictures\\Critters\\Heron\\Blue Heron\\Photos\\3_2024-01-20_07-46-23_large.jpg");
string result = webClient.DownloadString("http://localhost:32168/v1/vision/detection");

ResultsBox.Text = result;

What is the correct C# method for the server?
Posted
Comments
Richard MacCutchan 7-Feb-24 15:16pm    
What server are you referring to?
Member 14643016 7-Feb-24 16:03pm    
CodeProject.AI server, I am trying to pass the image path like the CodeProject.AI.Explorer. Tried to extract the CodeProject.AI.Explorer project to a standalone project from the CodeProject.AI solution but never could get it to work.
Richard MacCutchan 8-Feb-24 3:32am    
See the answer by OriginalGriff below.

1 solution

This would be better posted in the dedicated forum: CodeProject.AI Discussions[^]
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900