gpt4 book ai didi

mysql - MVC3 + EF4 + MySQL System.Security.SecurityException : Request failed

转载 作者:行者123 更新时间:2023-11-29 04:53:55 25 4
gpt4 key购买 nike

我正在开发一个 ASP.NET MVC3 Web 应用程序,它使用 Entity Framework 4.1 和 MySQL。

在本地一切正常,但是当我将解决方案部署到 Web 主机时,它会给我以下错误消息:

System.Security.SecurityException: Request failed. at System.Security.CodeAccessSecurityEngine.ThrowSecurityException(RuntimeAssembly asm, PermissionSet granted, PermissionSet refused, RuntimeMethodHandleInternal rmh, SecurityAction action, Object demand, IPermission permThatFailed) at System.Security.CodeAccessSecurityEngine.ThrowSecurityException(Object assemblyOrString, PermissionSet granted, PermissionSet refused, RuntimeMethodHandleInternal rmh, SecurityAction action, Object demand, IPermission permThatFailed) at System.Security.CodeAccessSecurityEngine.CheckSetHelper(PermissionSet grants, PermissionSet refused, PermissionSet demands, RuntimeMethodHandleInternal rmh, Object assemblyOrString, SecurityAction action, Boolean throwException) at System.Security.PermissionSetTriple.CheckSetDemand(PermissionSet demandSet, PermissionSet& alteredDemandset, RuntimeMethodHandleInternal rmh) at System.Security.PermissionListSet.CheckSetDemand(PermissionSet pset, RuntimeMethodHandleInternal rmh) at System.Security.PermissionListSet.DemandFlagsOrGrantSet(Int32 flags, PermissionSet grantSet) at System.Security.CodeAccessSecurityEngine.ReflectionTargetDemandHelper(Int32 permission, PermissionSet targetGrant, CompressedStack securityContext) at System.Security.CodeAccessSecurityEngine.ReflectionTargetDemandHelper(Int32 permission, PermissionSet targetGrant) The action that failed was: Demand The type of the first permission that failed was: System.Security.PermissionSet

我的 Web.Config:

<connectionStrings>
<add name="MySqlMembershipConnection" connectionString="Data Source=localhost;userid=userName;password=passw0rd;database=tv;" providerName="MySql.Data.MySqlClient,Version=6.3.6.0, Culture=neutral, PublicKeyToken=c5687fc88969c44d"/>
<add name="TvEntities" connectionString="metadata=res://*/Entities.Model.csdl|res://*/Entities.Model.ssdl|res://*/Entities.Model.msl;provider=MySql.Data.MySqlClient;provider connection string=&quot;server=127.0.0.1;port=3351;User Id=userName;password=passw0rd;Persist Security Info=True;database=tv&quot;" providerName="System.Data.EntityClient" />
</connectionStrings>

<system.data>
<DbProviderFactories>
<clear />
<add name="MySQL Data Provider" invariant="MySql.Data.MySqlClient" description=".Net Framework Data Provider for MySQL"
type="MySql.Data.MySqlClient.MySqlClientFactory, MySql.Data,Version=6.3.6.0, Culture=neutral, PublicKeyToken=c5687fc88969c44d" />
</DbProviderFactories>
</system.data>

TruSTLevel 处于中等水平。

有什么想法吗?

最佳答案

您总是可以完全信任地切换到另一个托管服务提供商吗?

关于mysql - MVC3 + EF4 + MySQL System.Security.SecurityException : Request failed,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/8615986/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com