sql-server - 应用程序中的服务器错误

标签 sql-server visual-studio-2010 web-hosting

每当我通过浏览器查看文件(文件位于共享驱动器中)时,都会收到此错误:

Server Error in '/Test' Application.

安全异常

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.Web.AspNetHostingPermission, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' failed.

来源错误:

An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.

我联系了系统管理员,他说他已经授予我电脑的完全访问权限。这里出了什么问题?

最佳答案

默认情况下,您无法从共享驱动器托管 ASP.NET 页面,因为这是不受信任的位置。您需要编辑 .NET 配置以允许此位置。您可以在这里找到快速指南(第一个答案):http://forums.asp.net/t/1371394.aspx

在此之前的一个快速测试是在本地复制项目并运行它。如果一切正常,那就是你的问题了。如果将项目保留在共享驱动器上很重要,则必须按照上述步骤将其设为受信任位置。

关于sql-server - 应用程序中的服务器错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/5221707/

相关文章:

c++ - 在颜色空间之间转换图像

node.js - 在 Linux 网格服务器中安装 Node

sql - 从日期中减去一个月但确保它是该月的第一个工作日

python - 如何使用 Windows 身份验证通过 sqlalchemy 连接到 SQL Server?

sql - 如何将嵌套的 JSON 导入到 SQL Server 表中?

c++ - 运行 Opencv 示例代码时出错

SQL 服务器 : check boolean can only occur once as true

c - 如何设置我的代码/VS10 以识别 .c 文件中的 CUDA 函数调用?

java - 如何将 Eclipse 动态 Web 项目上传到实时服务器?

php - 在没有 htaccess 的情况下用 PHP 重写 URL