我已经从这里 (演示)下载了示例,但是当我将它部署到我的Godady服务器上时,会出现错误。
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.SecurityPermission, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' failed.有人能告诉我Godady怎么了吗?这个样品在本地机器上工作得很好。
发布于 2010-08-12 03:29:02
我写信给戈达迪,但不知道现在该问些什么.
支援人员回应
感谢您联系在线支持。 这看起来像是信任issue.Trust级别指的是在Web.config文件中设置的权限,这些权限决定了哪些操作可以由Web应用程序执行,哪些操作不能执行。我们的ASP.NET 3.5共享主机使用默认的中等信任级别,并添加了OleDbPermission、OdbcPermission和限制较少的WebPermission。在中等信任级别下操作的应用程序没有注册表访问权限,无法访问Windows事件日志,也不能使用ReflectionPermission (但可以使用反射)。此类应用程序只能与定义的网络地址进行通信,并且文件系统访问仅限于应用程序的虚拟目录层次结构。 使用中等信任级别可以防止应用程序访问共享系统资源,并消除应用程序干扰的可能性。添加OleDbPermission和OdbcPermission允许应用程序使用这些数据提供程序访问数据库。WebPermission被修改以允许出站http和https流量。 如果我们能以其他方式帮助你,请告诉我们。
客户查询
我已经上传了我的网站(http://www.pinchofbliss.com/anything) 但我错了: ====================================================================== 说明:应用程序试图执行安全策略不允许的操作。若要授予此应用程序所需的权限,请与系统管理员联系,或更改该应用程序在配置文件中的信任级别。 异常详细信息: System.Security.SecurityException:请求System.Security.SecurityException、Version=2.0.0.0、Culture=neutral类型的许可 ======================================================================== 关于更多细节,让我更多地说明这个示例应用程序在本地机器上工作得很好,即使我将应用程序与源代码放在一起,这个示例应用程序也可以从这里下载http://chriscavanagh.wordpress.com/2008/03/11/aspnet-routing-goodbye-url-rewriting/。
https://stackoverflow.com/questions/3463784
复制相似问题