I faces a problem when try to upload file by API post method. In the debug mode it work fines but when I publish the solution to my local IIS it don't work. The front-end is implemented using HTML5, CSS3, JQuery so it is not possible to execute upload code
from here, from the form I call the POST API.
it is very small size it is less than 50KB, I think the problem is related to the API. Is it possible for the API to read the local path of the server.
B-) Gerry Lowry, Chief Training Architect, Paradigm Mentors Learning never ends... +1 705-999-9195 wasaga beach, ontario canada TIMTOWTDI =.there is more than one way to do it
None
0 Points
9 Posts
Upload file using MVC API
Dec 03, 2014 01:15 AM|elmozamil|LINK
Dear all,
I faces a problem when try to upload file by API post method. In the debug mode it work fines but when I publish the solution to my local IIS it don't work. The front-end is implemented using HTML5, CSS3, JQuery so it is not possible to execute upload code from here, from the form I call the POST API.
Regards,,,
api
Member
641 Points
166 Posts
Re: Upload file using MVC API
Dec 03, 2014 01:36 AM|virender|LINK
What's your file size, May be its problem with httpruntime you need to configure httpruntime in web.config.
http://www.codeproject.com/Articles/10842/Setting-up-Web-config-to-allow-uploading-of-large
api
www.nosqlninja.com nosql database resource
None
0 Points
9 Posts
Re: Upload file using MVC API
Dec 03, 2014 01:42 AM|elmozamil|LINK
Virender,
it is very small size it is less than 50KB, I think the problem is related to the API. Is it possible for the API to read the local path of the server.
api
Star
14297 Points
5797 Posts
Re: Upload file using MVC API
Dec 03, 2014 05:16 AM|gerrylowry|LINK
@elmozamil welcome to forums.asp.net
Whenever i need to upload files in ASP.NET MVC, moderator Mike's instructive article is the first place i start ... you'll find it here:
"ASP.NET MVC Uploading and Downloading Files" http://www.mikesdotnetting.com/article/125/asp-net-mvc-uploading-and-downloading-files
api
Star
9555 Points
2784 Posts
Re: Upload file using MVC API
Dec 03, 2014 06:12 PM|Paul Linton|LINK
Show your code.
"It don't work" - Can you provide a little more detail?
api
Contributor
6495 Points
1163 Posts
Re: Upload file using MVC API
Dec 03, 2014 08:44 PM|Summer - MSFT|LINK
Hi elmozamil,
Welcome to the ASP.NET forum.
Based on my understanding, I think maybe it is because of the publish IIS.
You could check the article and confirm that you have not missing anything when publish your solution.
http://www.asp.net/mvc/overview/deployment/visual-studio-web-deployment/deploying-to-iis
http://blogs.msdn.com/b/rickandy/archive/2011/04/22/test-you-asp-net-mvc-or-webforms-application-on-iis-7-in-30-seconds.aspx
Best Regards,
Summer
api