|
|
Sharon
发表于 2008-4-9 20:06:36
|
显示全部楼层
可以点添加产品,但是上传图片后不能保存。
可以点添加产品,但是上传图片后不能保存。Request for the permission of type 'System.Security.Permissions.FileIOPermission, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' failed. Stack Trace System.Security.SecurityException: Request for the permission of type 'System.Security.Permissions.FileIOPermission, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' failed. at System.Security.CodeAccessSecurityEngine.Check(Object demand, StackCrawlMark& stackMark, Boolean isPermSet) at System.Security.CodeAccessPermission.Demand() at System.IO.FileInfo..ctor(String fileName) at Any168.Common.UploadHelper.UploadFile(FileUpload FU1, String _SavePath, Int32 _MaxSize, String _FileType, Boolean _bMonth, Boolean _bReName) at Any168.Common.UploadHelper.UploadFile(FileUpload FU1, String SavePath, Int32 _MaxSize, String _FileType, Boolean IsMakeThumbnail, Int32 _SmallW, Int32 _SmallH, String _SmallType, Int32 _WaterType, String _WaterText, String _WaterPhoto) at AyWeb.WebUI.Admin.UploadPicForm.btnSave_ServerClick(Object sender, EventArgs e) at System.EventHandler.Invoke(Object sender, EventArgs e) at System.Web.UI.HtmlControls.HtmlButton.OnServerClick(EventArgs e) at System.Web.UI.HtmlControls.HtmlButton.RaisePostBackEvent(String eventArgument) at System.Web.UI.HtmlControls.HtmlButton.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String eventArgument) at System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument) at System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData) at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) 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 这些就是那些出错的代码,但是我所有的文件包都是可写可读的。我在GOOGLE 上找了。有这样的方法。1.请把你的文件夹权限设一下吧,添加ASP.NET这个账号.
2.请把web.config文件中的: <trust level="Medium" originUrl=".*" />改为
<trust level="Full" originUrl="" />或者把他注解掉.第二个问题我已经解决了,但是第一个我不会。怎么样添加ASP。NET这个账号?对于像我这样不懂得人,真是满头的雾水。 |
|