c# - Unable to upload random file to RESTFUL web service -
i'm creating kind of file manager company product, , i'm having method post files. files, e.g. .jpg working, it's not.
problem not handling uploaded file, method upload not executing files, have tried many solution, googled, , nothing works. believe related validation have tried remove validation methods , still doesn't work.
this method
[operationcontract, webinvoke(uritemplate = "uploadfile/{coursename}")] public stream uploadfile(string coursename) { var _files = httpcontext.current.request.files; string path = string.format(appdomain.currentdomain.basedirectory + @"resources\{0}\{1}\", coursename, "{0}"); list<finfo> li = filemanagerhelper.uploadfile(coursename, path, _files); messagetypes.instance.setjsonmessage(); return jsonconvert.serializeobject(li).stringtostream(); }
don't bother custom methods , custom objects, problem method not called.
thanks in advance ever answers, , solution welcome.
don't bother test, solution found on microsoft site, bug , can solved upgrading wcf 4.5, cause in version 4.0 max size 65kb
thanks microsoft, have lost 2 days of life trying solve it.
Comments
Post a Comment