Last post Aug 01, 2007 11:07 AM by Srheal
Jul 29, 2007 04:47 AM|Srenvas|LINK
I am trying to upload an image from asp.net 2.0 application using a file upload control. this works fine in my local development machine , but once i have deployed on to the web server, its jus crashing giving "Security Exception" the detailed error msg
is something like this
Line 32: End If
Line 34: Dim fi As New IO.FileInfo(fuImage.PostedFile.FileName)
Line 35: objServices.ServiceImage = fi.Extension
Line 36: Dim PhotoId As Integer = objServicesBO.InsertMrservices(objServices)
Line 32: End If
I am given write permission to the folder where i am trying to save my file but still does not work..i one more option i tried is to give acces to ASPNET and NetworkServices users with full control but i dnt see any create user option on the control panel
of the web server.. I am using GoDaddy.com webserver..
Please can any one help me out in this issue. This issue is being reposted by me, i am really not getting any idea on how to get rid of this issue, pls all the tech savvy's out there can some one help me out,
Thanks in advance
Jul 30, 2007 01:50 AM|ongj|LINK
I suppose GoDaddy runs on medium trust?
I notice in the code (lines 34 and 35), a FileInfo instance is created out of the client file path in order to extract the file extension. Perhaps try using
Also, if it's medium trust, ensure that the file is saved to a location inside the web app directory structure (assuming the ACLs are already set correctly).
Aug 01, 2007 11:07 AM|Srheal|LINK
someone on the server side probably reconfigured the settings not allowing uploads, contact server administrator and see if any configuration had been modified or make sure the file location is correctly read.
Even though you can upload locally doesnt mean the permission to upload file is allowed on the server, alot of people get errors because ethier they dont have access to do what they could do initially on a local machine.