2010-07-06 37 views
0

我部署了一个asp.net mvc应用程序,除了使用flickr api流式传输图片的我的图库页面外,其他所有工作都正常运行。我收到以下错误。asp.net信任级别错误

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

异常详细信息:System.Security.SecurityException:对'System.Security.Permissions.FileIOPermission,mscorlib,Version = 2.0.0.0,Culture = neutral,PublicKeyToken = b77a5c561934e089'类型权限的请求失败。

源错误:

在当前web请求的执行过程中生成未处理的异常。关于异常的来源和位置的信息可以使用下面的异常堆栈跟踪来标识。

我走进我的web.config文件,并更改

<location allowOverride="true"> 
<system.web>  
    <trust level="Full"> 

然后网站将根本无法运行,我收到以下错误

配置错误 说明:在发生错误处理服务此请求所需的配置文件。请查看下面的具体错误细节并适当修改您的配置文件。

解析器错误消息:此配置节不能用于此路径。当站点管理员使用
位置allowOverride =“false” 从继承的配置文件锁定对此部分的访问权限时,会发生这种情况。

源错误:

</customErrors>--> 

<trust level="Full" /> 
    <pages> 
<controls> 

的网页是oneotacycles.com

有什么想法?非常感谢!!

+0

它看起来像Flickr是试图使服务器上的高速缓存,你检查特定的文件夹有写的权限? – LiamB 2010-07-06 17:57:51

回答

0

如上所述,它看起来像Flickr试图在服务器上做一个缓存,你有没有检查特定的文件夹有写权限?

这可能会帮助,http://flickrnet.codeplex.com/Thread/View.aspx?ThreadId=24550

Inside the constructor for the Flickr class there is a call that tries to load the default settings from the configuration file (i.e. web.config).

If you are running in a restricted security environment (such as a hosted web site with an ISP) then you might not be allowed to put new config sections inside a web.config file so when it parses the file a security exception is thrown. It will do this anytime you create an instance of the Flickr class.

+0

我没有在web.config文件中看到任何对Flickr的引用?我在哪里编辑设置? – Lars 2010-07-06 19:16:53

+0

嗯,我不太了解API只使用过一次。但看看它的缓存,看看是否有一个缓存文件夹被创建,如果确实有写权限。 – LiamB 2010-07-07 08:28:19