473,508 Members | 2,079 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Security Exception on image upload

304 Contributor
hi,
I have a file upload control in one of my pages. whenever I try to upload an image(only images are allowed), I get a security exceptions error.(Only on my web host's server)

This is the exact error that I am getting - >

Exception Details: System.Security.SecurityException: Request for the permission of type 'System.Security.Permissions.FileIOPermission, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' failed.

What I am doing here is that , am resizing the image using a system.drawing.image object and saving it .

Initially when I had contacted my hosting company , they had told me that it had something to do with the folder settings. But I reviewed it and nothing seemed to be wrong.
Also, they told me that since its a shared hosting environment, they will not be able to make any modifications in the config settings.
So I would like to know as to how I could accomplish my task?
Am sure that there must be many guys around having a shared hosting account and still providing the facility for uploading images.

Thanks,
gomzi.
May 16 '07 #1
1 1135
gomzi
304 Contributor
SOLVED.
Saving the image before manipulating it prevented the error from occuring.
May 17 '07 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

3
7838
by: Philippe Lemmerling | last post by:
I have a question concerning security of my file upload script. I'm using the php upload routines (move_uploaded_file,...) and variables ($_FILES) to upload images to a webdirectory. Everything...
3
11737
by: dave | last post by:
Hello there, I am at my wit's end ! I have used the following script succesfully to upload an image to my web space. But what I really want to be able to do is to update an existing record in a...
5
1949
by: el_roachmeister | last post by:
I want to ask my web hosts to allow file uploads with php since it is currently turned off. I was wondering does this pose a security risk to the server? What kinds of things should I check in my...
6
3959
by: Dave | last post by:
Hello, all! I'm having a small problem displaying an ordinary GIF file on my web site. It's just a banner with a transparent background. When I have Norton Internet Security disabled, it...
4
1313
by: silvia.rafat | last post by:
Dear, i'm developping a web application that where clients may 1- upload images to DB (SQL Server). 2- view the image from DB. i store the images in DB through the data type 'image' to upload...
2
4488
by: rbanerji | last post by:
I am building a BHO that is meant to popup a IHtmlPopup window on a mouse over image event. All the code works fine if the image is in the main Window. However if the image is in a frame then I...
1
2803
by: loupet | last post by:
Hello all I am new here and this is my first post. I have tried several javascripts to preview an image on a web page using the "input type=file" to Browse and preview the image. Using IE...
7
2350
by: xx75vulcan | last post by:
Hi, I've got a PHP Upload Form that works great, unless that is, the image your uploading has been modified through a photo editing software. Example: if I upload the image straight from a...
7
17035
by: mishrarajesh44 | last post by:
hii all Truly telling i hav got this code from net & i am finding error while running the code below.. code:- <?php $idir = "photo/"; // Path To Images Directory $tdir =...
0
7226
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
7125
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
7328
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
1
7049
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
5631
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
1
5055
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
3186
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
1561
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
0
422
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.