上载Web应用程序时出现错误 [英] Getting an error when I am uploading the web application

查看:112
本文介绍了上载Web应用程序时出现错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述


我正在使用ASP.NET,c#.NET.使用mysql作为数据库,试图通过Mysql连接器连接数据库,到目前为止一切都很好,并且在localhost中它可以正常工作,Mysql的用户名和密码是正确的.

但是在将Web应用程序上载到godaddy服务器之后却产生了问题.当我使用时,像con.open()那样传递语句,然后我得到类似
的错误

Hi
I am using the ASP.NET,c#.NET.using mysql as database ,trying to connect the Database by using the Mysql connector, upto now every thing is fine and In localhost it was working fine , Username and passwords of Mysql was Correct.

But creating problem after the uploading the Webapplication to godaddy server. When i am using,Passing through the statement like the con.open(), then i am getting the error like

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.Net.DnsPermission, System, 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.Net.DnsPermission, System, 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.Net.Dns.GetHostEntry(String hostNameOrAddress) +71
   MySql.Data.Common.StreamCreator.GetDnsHostEntry(String hostname) +69
   MySql.Data.Common.StreamCreator.GetStream(UInt32 timeout) +491
   MySql.Data.MySqlClient.NativeDriver.Open() +243



我通过使用< trust level ="High" originurl ="> ;,
尝试了很多 < trust level ="Full" originurl =">没有解决

可以解决这个问题吗,
在Advance中致谢



I had tried a lot by using the <trust level="High" originurl="">,
<trust level="Full" originurl=""> It was not solved

can any please Solve This,
Thanks in Advance

推荐答案

如果看到此消息,则意味着您需要使用EXTERNAL_ACCESS或UNSAFE作为PERMISSION_SET值来创建程序集.在使用EXTERNAL_ACCESS或UNSAFE创建程序集之前,必须存在两个条件:

1.数据库必须由管理员(sysadmin固定服务器角色的成员)标记为TRUSTWORTHY,或者该程序集已使用证书或非对称密钥签名
2.创建装配的用户必须具有EXTERNAL ACCESS ASSEMBLY或UNSAFE ASSEMBLY权限.
If you see this message it means you need to create your assembly with either EXTERNAL_ACCESS or UNSAFE as the PERMISSION_SET value. Before you can create an assembly with EXTERNAL_ACCESS or UNSAFE two conditions must exist:

1. Database must be marked as TRUSTWORTHY by an administrator (member of sysadmin fixed server role) or the assembly has been signed with a certificate or asymmetric key
2. User creating the assembly must have EXTERNAL ACCESS ASSEMBLY or UNSAFE ASSEMBLY permissions.


这篇关于上载Web应用程序时出现错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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