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.

Preguntas similare

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.
Respuesta Responder a este mensaje
#2 Daniel Nogues
12/10/2006 - 10:11 | Informe spam
To resolve this problem, set permissions for the assembly that uses the
System.Data namespace to FullTrust . To do this, follow these steps: 1. On
the taskbar, click Start, point to Settings, and then click Control Panel.
2. Double-click Administrative Tools, and then double-click Microsoft
.NET Framework Configuration.
3. Expand Runtime Security Policy.
4. Right-click your Code Group, and then click Properties.
5. Click the Permission Set tab, and in the Permission Set list, click
to select FullTrust.
6. Click OK.



"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.
email Siga el debate Respuesta Responder a este mensaje
Ads by Google
Help Hacer una preguntaRespuesta Tengo una respuesta
Search Busqueda sugerida