The remote server returned an error: (404) Not Found.
4 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
Hi there,
I recently compiled my code using a matlab production server R2016 and gave it to software developers for the deployment purpose. But they are getting the following error; The remote server returned an error: (404) Not Found. Fyi, my code doesn't contain any URL inside and never had such an issue before. Can you please give me some ideas why they are getting the error? My guess is 1) the URL is wrong in some forms 2) they are not calling RESTful API only by HTTP supported request. I am not sure though. Please help me out to resolve this issue. Their deployment platform is based on C#. It would be very helpful.
0 commentaires
Réponses (1)
Kojiro Saito
le 3 Juil 2018
As this document says 404 error code means function or component not found or URL is not in correct format.
If I compile addmatrix.m to addmatrix.ctf, both the archive (component) name and function name is "addmatrix". I'm not sure how do you call MATLAB Production Server from C#, but if you're using WebRequest, the following will get "The remote server returned an error: (404) Not Found" error.
var httpWebRequest = (HttpWebRequest)WebRequest.Create("http://localhost:9910/addmatrix/");
In this case, I specified only archive (component) name, but didn't include function name. So, the following will work. First addmatrix is a component name and the second addmatrix is a function name.
var httpWebRequest = (HttpWebRequest)WebRequest.Create("http://localhost:9910/addmatrix/addmatrix");
Please take a look that you have specified /archive/function names in C#, and archive name matches your ctf file.
0 commentaires
Voir également
Catégories
En savoir plus sur Java Client Programming dans Help Center et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!