我正在上传数据库中的图像在这里我得到一个错误 [英] i am uploading the images in database Here I amGetting a error

查看:73
本文介绍了我正在上传数据库中的图像在这里我得到一个错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,



i上传数据库中的图像我在做的是图像路径保存在数据库中,图像保存在文件夹中,所以我在这里错误Plz看看并给我解决方案





Hi All,

i am uploading the images in database Here i am doing is image path is saved in database and image is saved in folder so Here I am Geting error Plz Take a look And Give me the Solution


System.Security.SecurityException: Request for the permission of type 'System.Security.Permissions.FileIOPermission, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' failed. 
at System.Security.CodeAccessSecurityEngine.Check(Object demand, StackCrawlMark& stackMark, Boolean isPermSet) at System.Security.CodeAccessSecurityEngine.Check(CodeAccessPermission cap, StackCrawlMark& stackMark) at System.Security.CodeAccessPermission.Demand() 
at System.IO.FileInfo.Init(String fileName, Boolean checkHost) at System.IO.FileInfo..ctor(String fileName) at MoreCarImages.btn_submit_Click(Object sender, EventArgs e) 

The action that failed was: Demand The type of the first permission that failed was: System.Security.Permissions.FileIOPermission 
The Zone of the assembly that failed was: MyComputer





谢谢



Thank you

推荐答案

在asp.net论坛中查看此链接,希望对您有所帮助:

http://forums.asp.net/t/1142387.aspx [ ^ ]
Check this link in asp.net forum, hope it helps you:
http://forums.asp.net/t/1142387.aspx[^]


您好b $ b

请检查您是否已授予aspnet用户写入/修改上传文件保存所需位置的权限。如果没有提供这些权限。右键单击要提供权限的文件夹,转到属性/安全设置,然后向用户提供权限。



如果仍然无效,那么我就是害怕它是CAS(代码访问安全性)级别检查,其中您的程序集未被授予权限。看看这个 http://social.msdn.microsoft .com / forums / en-US / asmxandxml / thread / b1db5b9f-50a4-4a21-aba1-afeb30957efd [ ^ ]





希望它能解决你的问题

Pawan
Hi
Please check whether you have given permissions to aspnet user to write/modify the desired location where your uploaded file gets save. If not do provide these permissions. Right click the folder you want to provide permissions to go to Properties/Security settings and then provide the permissions to the user.

If it still does not work then I am afraid it is CAS (code access security) level check wherein your assembly is not granted the permissions. check this out http://social.msdn.microsoft.com/forums/en-US/asmxandxml/thread/b1db5b9f-50a4-4a21-aba1-afeb30957efd[^]


Hope it solves your problem
Pawan


这篇关于我正在上传数据库中的图像在这里我得到一个错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆