I have this code in ASP.net 2005:
Protected
Sub btnIniciar_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles btnIniciar.Click
Dim mensajeDeError As String = DatosValidos()
If Utilidades.EsCadenaVacia(mensajeDeError) Then
Try
Dim claveDeSolicitud As Integer = ObtenConsecutivo()
Call GuardaRegistro(claveDeSolicitud)
Context.Items("Ventanilla") = "Recepcion"
Context.Items("solicitud") = Ventanilla.ObtenSolicitud(claveDeSolicitud, lblClaveDeConstancia.Text)
Context.Items("trabajador") = Ventanilla.ObtenTrabajador(lblNumeroDeExpediente.Text)
Server.Transfer("~/Consulta/frmConsulta.aspx", False)
Catch ex As Exception
Throw New Exception(Utilidades.MENSAJE_ERROR)
End If
When I execute it, just after the try, when it tries to execute the "ObtenConsecutivo" (it does not even enters to the function) it throws the next SecurityException:
ex = {"Request for the permission of type 'System.Security.Permissions.StrongNameIdentityPermission, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' failed."}
This is a simple aspx web page, no assemblies imported or configuration files modified (not even web.config).
Any ideas?