0

Got a simple form, posting to an action... the action takes the data and creates a record in the DB, and copies the image to a directory. Works great on my local dev box.

Upload the form to my host, and the image uploading doesn't work. The form acts as if it's failing the UpdateModel(), but doesn't show any validation messages.

Anyone else experience this? I can post code if you need it...

2
  • The problem seems to be arising from the GDI+ library. When I comment out my try/catch, I get the following exception: A generic error occurred in GDI+ I set the permissions on the destination folder to "777"... still no workie. ;/ Commented Feb 4, 2009 at 14:04
  • Would be easier to help you out, if you could post a snippet of the code that is failing, specifically from the method that has the failing GDI+ code. This might be related to the trust level enforced by your host, but I need a little more to work with to confirm that. Commented Feb 4, 2009 at 14:34

2 Answers 2

1

Turns out it was permissions. Setting folder permissions through Filezilla doesn't work. Had to go through my hosts control panel to set permissions.

Working fine now!

Sign up to request clarification or add additional context in comments.

Comments

0

I had issues with file upload in ASP.NET MVC until I set the "enctype" attribute of the form to "multipart/form-data".

See this blog post form more info.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.