分享

写回答

发帖

[提问] GD 程序发送邮件

GoDaddy GoDaddy 1403 人阅读 | 5 人回复

发表于 2011-1-12 11:04:41 | 显示全部楼层 |阅读模式

本地测试是好的。 放在空间就出错了。帮忙分析下

Server Error in '/' 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:

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.  

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) +66
   System.Configuration.Internal.InternalConfigHost.StaticOpenStreamForRead(String streamName) +85
   System.Configuration.Internal.InternalConfigHost.System.Configuration.Internal.IInternalConfigHost.OpenStreamForRead(String streamName, Boolean assertPermissions) +124
   System.Configuration.Internal.InternalConfigHost.System.Configuration.Internal.IInternalConfigHost.OpenStreamForRead(String streamName) +10
   System.Configuration.Internal.DelegatingConfigHost.OpenStreamForRead(String streamName) +13
   System.Configuration.UpdateConfigHost.OpenStreamForRead(String streamName) +46
   System.Configuration.BaseConfigurationRecord.InitConfigFromFile() +293




--------------------------------------------------------------------------------
Version Information: Microsoft .NET Framework Version:2.0.50727.4206; ASP.NET Version:2.0.50727.4016

回答|共 5 个

add.c

发表于 2011-1-12 11:07:11 | 显示全部楼层

貌似你的程序访问了不被允许的权限, 是asp.net的程序吧, GoDaddy的信任等级是normal, 非full trust level ,
所以可能某些程序不能运行

mysean

发表于 2011-1-12 11:12:06 | 显示全部楼层

恩.ASP.NET的。别人注册就给用户发封邮件。 这个权限能设置吗?

mysean

发表于 2011-1-12 11:15:45 | 显示全部楼层

GD支持 jmail 发送邮件吗

add.c

发表于 2011-1-12 11:26:50 | 显示全部楼层

回复 4# 的帖子

不支持的.
支持如下:http://bbs.idcspy.com/thread-25356-1-1.html

mysean

发表于 2011-1-12 14:09:01 | 显示全部楼层

非常感谢。按照第一种方式弄好了。只是QQ邮箱的话就报错。
您需要登录后才可以回帖 登录 | 注册

本版积分规则