A QUE SE DEBE ESTE ERROR

15/08/2006 - 19:30 por Franklin | Informe spam
Msg 6522, Level 16, State 1, Procedure PremiacionTickets, Line 0
A .NET Framework error occurred during execution of user defined routine or
aggregate 'PremiacionTickets':
System.Security.SecurityException: Request for the permission of type
'System.Data.SqlClient.SqlClientPermission, System.Data, Version=2.0.0.0,
Culture=neutral, PublicKeyToken=b77a5c561934e089' failed.
System.Security.SecurityException:
at System.Security.CodeAccessSecurityEngine.Check(Object demand,
StackCrawlMark& stackMark, Boolean isPermSet)
at System.Security.PermissionSet.Demand()
at System.Data.Common.DbConnectionOptions.DemandPermission()
at System.Data.SqlClient.SqlConnection.PermissionDemand()
at
System.Data.SqlClient.SqlConnectionFactory.PermissionDemand(DbConnection
outerConnection)
at
System.Data.ProviderBase.DbConnectionClosed.OpenConnection(DbConnection
outerConnection, DbConnectionFactory connectionFactory)
at System.Data.SqlClient.SqlConnection.Open()
at StoredProcedures.PremiacionTickets()
.

Estoy ejecuntado un procedimiento almacenado desarrollado con .Net atravez
de un asemblie.
 

Leer las respuestas

#1 Daniel Nogues
21/08/2006 - 14:20 | Informe spam
Hola,

Si el procedimiento almacenado trata de acceder a recursos fuera de SQL,
asegurate que la Assemblie tiene permiso Host puesto a EXTERNAL_ACCESS.

Si abres una nueva conexion, prueba a crearla context.

Estos articulos hablan sobre ambas propiedades:

The Context Connection
http://msdn2.microsoft.com/en-us/li...54981.aspx

CLR Integration Code Access Security
http://msdn2.microsoft.com/en-us/li...45101.aspx

Saludos!


"Franklin" wrote in message
news:
Msg 6522, Level 16, State 1, Procedure PremiacionTickets, Line 0
A .NET Framework error occurred during execution of user defined routine
or
aggregate 'PremiacionTickets':
System.Security.SecurityException: Request for the permission of type
'System.Data.SqlClient.SqlClientPermission, System.Data, Version=2.0.0.0,
Culture=neutral, PublicKeyToken·7a5c561934e089' failed.
System.Security.SecurityException:
at System.Security.CodeAccessSecurityEngine.Check(Object demand,
StackCrawlMark& stackMark, Boolean isPermSet)
at System.Security.PermissionSet.Demand()
at System.Data.Common.DbConnectionOptions.DemandPermission()
at System.Data.SqlClient.SqlConnection.PermissionDemand()
at
System.Data.SqlClient.SqlConnectionFactory.PermissionDemand(DbConnection
outerConnection)
at
System.Data.ProviderBase.DbConnectionClosed.OpenConnection(DbConnection
outerConnection, DbConnectionFactory connectionFactory)
at System.Data.SqlClient.SqlConnection.Open()
at StoredProcedures.PremiacionTickets()
.

Estoy ejecuntado un procedimiento almacenado desarrollado con .Net atravez
de un asemblie.

Preguntas similares