在Godaddy 的window 空间总是报,No relevant source lines
在Godaddy 的window 空间总是报,No relevant source linesServer Error in '/richeen.com' Application.
--------------------------------------------------------------------------------
Security Exception
Description: The application attempted to perform an operation not allowed by the security policy. To grant this application the required permission please contact your system administrator or change the application's trust level in the configuration file.
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.
Source Error:
[No relevant source lines]
Source File: App_Web_0tzg2fnk.1.cs Line: 0
Stack Trace:
[SecurityException: Request for the permission of type 'System.Security.Permissions.FileIOPermission, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' failed.]
System.Security.CodeAccessSecurityEngine.Check(Object demand, StackCrawlMark& stackMark, Boolean isPermSet) +0
System.Security.CodeAccessPermission.Demand() +58
System.IO.FileStream.Init(String path, FileMode mode, FileAccess access, Int32 rights, Boolean useRights, FileShare share, Int32 bufferSize, FileOptions options, SECURITY_ATTRIBUTES secAttrs, String msgPath, Boolean bFromProxy) +644
System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, FileOptions options) +65
System.IO.StreamReader..ctor(String path, Encoding encoding, Boolean detectEncodingFromByteOrderMarks, Int32 bufferSize) +87
System.IO.StreamReader..ctor(String path, Encoding encoding) +15
Tools.Config.GetTextbyFileAndLang(String File, String lang) +99
_Diy.DiyEN.web.html.AboutUs.Header.Page_Load(Object sender, EventArgs e) +50
System.Web.UI.Control.OnLoad(EventArgs e) +99
System.Web.UI.Control.LoadRecursive() +50
System.Web.UI.Control.LoadRecursive() +141
System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +6785
System.Web.UI.Page.ProcessRequest(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +242
System.Web.UI.Page.ProcessRequest() +80
System.Web.UI.Page.ProcessRequestWithNoAssert(HttpContext context) +21
System.Web.UI.Page.ProcessRequest(HttpContext context) +49
ASP.diyen_web_html_aboutus_leaveword_aspx.ProcessRequest(HttpContext context) in App_Web_0tzg2fnk.1.cs:0
System.Web.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +181
System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +75
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
可以确定是文件读写权限问题,不知道怎么改.
GD的客服回的邮件是这样,请高手帮忙指点一下.
Dear lu ying,
Thank you for contacting Online Support.This message is due to the medium trust level set on our shared hosting accounts. Our ASP.NET 3.5 shared hosting servers use the default Medium trust level with thе additiоn of OlеDbРermiion, OdbcPermission, and a less-restrictive WebPermission.
Applications operating under a Medium trust level have no registry accеss, no аccеs to thе Wndows event log, and cannot use ReflectionPermission (but can use Reflection). Such applications can communicate only with a defined range of network addresses and file system access is limited to the application's virtual directory hierarchy.
Using a Medium trust level prеvents aрpliсаtion frоm accessing shared system resources and eliminates the potential for application interference. Adding OleDbPermission and OdbcPermission allows applications to use those data providers to access databases. WebPermission is modified to allow outbound http and https traffic.
Please let us know if we can assist you in any other way.
Regards,
Andrea P.
Online Support Representative
--------------------编程问答-------------------- up
--------------------编程问答-------------------- 请问lz。godday怎么使用自己的IP地址? --------------------编程问答-------------------- 会不会是相对路径在server.mappath以后指向了你的虚拟目录以外的地方了?。
补充:.NET技术 , C#