Security.Exception [英] Security.Exception

查看:109
本文介绍了Security.Exception的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想我永远不会遇到这个错误。当从一个试图写入磁盘的DLL运行代码时,会发生这种情况。我在项目中添加了权限

文件夹,wwwroot和IIS中的NETWORK_SERVICE和Everyone,带有Full

控制以查看它是否是权限问题。


该项目托管在Windows 2003 Server中,并使用Visual Studio 2005 Beta 1开发,在一个

域中的PC上开发。


-

问候,


迭戈F.

I think I''ll never come across that error. It happens when running code from
a DLL that tries to write to disk. I added permissions in the project
folder, the wwwroot and in IIS to NETWORK_SERVICE and Everyone, with Full
Control to see if it''s a permissions problem.

The project is hosted in a Windows 2003 Server and developed from PCs in a
domain, developing with Visual Studio 2005 Beta 1.

--
Regards,

Diego F.

推荐答案

你看到的确切异常是什么? (如果可能的话,你能不能请求
提供异常'ToString方法的完整输出?)

Diego F. <二******* @ terra.es>在留言中写道

news:uM ************** @ TK2MSFTNGP12.phx.gbl ...
What is the exact exception you are seeing? (If possible, could you please
provide the full output from the exception''s ToString method?)
"Diego F." <di*******@terra.es> wrote in message
news:uM**************@TK2MSFTNGP12.phx.gbl...
我想我是''永远不会遇到这个错误。从尝试写入磁盘的DLL运行代码时会发生这种情况。我在项目
文件夹,wwwroot和IIS中添加了对NETWORK_SERVICE和Everyone的权限,并使用Full
Control来查看它是否是权限问题。

项目是托管在Windows 2003 Server中,并从
域中的PC开发,使用Visual Studio 2005 Beta 1进行开发。

-
问候,

Diego F.
I think I''ll never come across that error. It happens when running code
from a DLL that tries to write to disk. I added permissions in the project
folder, the wwwroot and in IIS to NETWORK_SERVICE and Everyone, with Full
Control to see if it''s a permissions problem.

The project is hosted in a Windows 2003 Server and developed from PCs in a
domain, developing with Visual Studio 2005 Beta 1.

--
Regards,

Diego F.



完整的错误信息:


安全例外

描述:应用程序试图通过安全策略执行不允许的操作

。要授予此应用程序所需的权限

请联系您的系统管理员或在配置文件中更改应用程序的信任

级别。


异常详细信息:System.Security.SecurityException:该程序集没有

允许部分信任的调用者。


源错误:

第54行:fichero))

第55行:HttpContext.Current.Response.ContentType =

" application / pdf"

第56行:

myPdfDocument.SaveToStream(HttpContext.Current.Res ponse.OutputStream)

第57行:HttpContext.Current.Response.End()

第58行:

源文件:

\\Mantelnorserv \Proyectos \ Mantelnor \ Bampimor \Code \ Aplicacion \ Gestores\GestorPDF .vb

行:56

-

问候,


迭戈F.


" Nicole Calinoiu" < calinoiu REMOVETHIS AT gmail DOT com> escribiónelel

mensaje新闻:%2 **************** @ TK2MSFTNGP10.phx.gbl ...
The complete error message:

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: That assembly does not
allow partially trusted callers.

Source Error:
Line 54: fichero))
Line 55: HttpContext.Current.Response.ContentType =
"application/pdf"
Line 56:
myPdfDocument.SaveToStream(HttpContext.Current.Res ponse.OutputStream)
Line 57: HttpContext.Current.Response.End()
Line 58:
Source File:
\\Mantelnorserv\Proyectos\Mantelnor\Bampimor\Code\ Aplicacion\Gestores\GestorPDF.vb
Line: 56

--
Regards,

Diego F.

"Nicole Calinoiu" <calinoiu REMOVETHIS AT gmail DOT com> escribió en el
mensaje news:%2****************@TK2MSFTNGP10.phx.gbl...
什么你看到的确切例外是什么? (如果可能的话,你能否提供异常'ToString方法的完整输出?)

Diego F. <二******* @ terra.es>在消息中写道
新闻:uM ************** @ TK2MSFTNGP12.phx.gbl ...
What is the exact exception you are seeing? (If possible, could you
please provide the full output from the exception''s ToString method?)
"Diego F." <di*******@terra.es> wrote in message
news:uM**************@TK2MSFTNGP12.phx.gbl...
我想我永远不会遇到那个错误。从尝试写入磁盘的DLL运行代码时会发生这种情况。我在项目
文件夹,wwwroot和IIS中添加了对NETWORK_SERVICE和Everyone的权限,并使用Full
Control来查看它是否是权限问题。

项目是托管在Windows 2003 Server中,并从域中的PC开发,使用Visual Studio 2005 Beta 1开发。

-
问候,

迭戈F.
I think I''ll never come across that error. It happens when running code
from a DLL that tries to write to disk. I added permissions in the project
folder, the wwwroot and in IIS to NETWORK_SERVICE and Everyone, with Full
Control to see if it''s a permissions problem.

The project is hosted in a Windows 2003 Server and developed from PCs in
a domain, developing with Visual Studio 2005 Beta 1.

--
Regards,

Diego F.




信息非常清楚。你的代码调用了一个不受信任的程序集

方法,你的asp.net安全策略说这是不允许的。在

machine.config中检查trustLevel为web应用程序设置的位置。


- bruce(sqlwork.com)



" Diego F." <二******* @ terra.es>在消息中写道

news:OB ************** @ TK2MSFTNGP10.phx.gbl ...
the message is pretty clear. your code is calling a untrusted assembly
method, and your asp.net security policy says this is not allowed. in
machine.config check what the location trustLevel is set to for web apps.

-- bruce (sqlwork.com)


"Diego F." <di*******@terra.es> wrote in message
news:OB**************@TK2MSFTNGP10.phx.gbl...
完整的错误信息:

安全例外
描述:应用程序试图执行安全策略不允许的操作。授予此应用程序所需的权限
请联系您的系统管理员或更改配置文件中应用程序的信任级别。

异常详细信息:System.Security.SecurityException :那个程序集确实不允许部分信任的调用者。

源错误:

第54行:fichero))
第55行:HttpContext.Current。 Response.ContentType =
" application / pdf"
第56行:
myPdfDocument.SaveToStream(HttpContext.Current.Res ponse.OutputStream)
第57行:HttpContext.Current.Response .End()
第58行:

源文件:
\\Mantelnorserv \ Proyectos \ Mantelnor \ Bampimor \Code \ Aplicacion\Gestores \\ \\ GestorPDF.vb
线路:56

问候,

迭戈F.

Nicole Calinoiu ; < calinoiu REMOVETHIS AT gmail DOT com> escribiónelel
mensaje新闻:%2 **************** @ TK2MSFTNGP10.phx.gbl ...
The complete error message:

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: That assembly does
not allow partially trusted callers.

Source Error:
Line 54: fichero))
Line 55: HttpContext.Current.Response.ContentType =
"application/pdf"
Line 56:
myPdfDocument.SaveToStream(HttpContext.Current.Res ponse.OutputStream)
Line 57: HttpContext.Current.Response.End()
Line 58:
Source File:
\\Mantelnorserv\Proyectos\Mantelnor\Bampimor\Code\ Aplicacion\Gestores\GestorPDF.vb
Line: 56

--
Regards,

Diego F.

"Nicole Calinoiu" <calinoiu REMOVETHIS AT gmail DOT com> escribió en el
mensaje news:%2****************@TK2MSFTNGP10.phx.gbl...
确切的例外是什么你看到了吗? (如果可能的话,你能否提供异常'ToString方法的完整输出?)

Diego F. <二******* @ terra.es>在消息中写道
新闻:uM ************** @ TK2MSFTNGP12.phx.gbl ...
What is the exact exception you are seeing? (If possible, could you
please provide the full output from the exception''s ToString method?)
"Diego F." <di*******@terra.es> wrote in message
news:uM**************@TK2MSFTNGP12.phx.gbl...
我想我永远不会遇到那个错误。从尝试写入磁盘的DLL运行代码时会发生这种情况。我在
项目文件夹,wwwroot和IIS中添加了权限到NETWORK_SERVICE和Everyone,
with Full Control,看看它是否是权限问题。

项目是托管在Windows 2003 Server中,并从域中的PC开发,使用Visual Studio 2005 Beta 1开发。

-
问候,

Diego F.
I think I''ll never come across that error. It happens when running code
from a DLL that tries to write to disk. I added permissions in the
project folder, the wwwroot and in IIS to NETWORK_SERVICE and Everyone,
with Full Control to see if it''s a permissions problem.

The project is hosted in a Windows 2003 Server and developed from PCs in
a domain, developing with Visual Studio 2005 Beta 1.

--
Regards,

Diego F.





这篇关于Security.Exception的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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