Error accessing mscorlib.dll

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hola amigos,

Me he creado una biblioteca de clases y dentro una clase (Class1)
que hereda de System.EnterpriseServices.ServicedComponent.
En la clase he creado una función de tipo System.Guid y
en el return le pongo: ContextUtil.ContexId.

En la misma solución me he creado otro proyecto
(Aplicaciones Windows) y en el formulario (en el evento
Load) le pongo:
Try
Dim obj As New Class1
Me.Label1.Text = obj.GetContextID.ToString
Catch ex As System.UnauthorizedAccessException
Me.Label1.Text = "El mensaje de error es: " &
ex.Message
End Try

Cuando ejecuta la instanciación de obj me da un error:
Acceso denegado. Se refiere a la librería mscorlib.dll.

¿Me podéis contar cómo solucionarlo?.

Muchas gracias.
 
No Habol Espaneol

--

OHM ( Terry Burns )
. . . One-Handed-Man . . .
If U Need My Email ,Ask Me

Time flies when you don't know what you're doing
 
Alonso,

Please do this in this newsgroup in English, a very important part of the
visitors of this newsgroup have not English as native language, so you will
not be the only one who makes mistakes.

About your problem: I would add what I wrote inline in your situatuation,
because you are now not catching the general exeptions.
Try
Dim obj As New Class1
Me.Label1.Text = obj.GetContextID.ToString
Catch ex As System.UnauthorizedAccessException
Me.Label1.Text = "El mensaje de error es: " &
ex.Message

Catch ex as Exception
me.label1.text = ex.tostring
End Try
I hope this helps?

Cor
 
I am sorry. I repeat the question in English with the subject: Error
accessing mscorlib.dll (2).

Thank you for your answer.

Alonso
 
I am sorry. I repeat the question in English with the subject: Error
accessing mscorlib.dll (2).

Thank you for your answer.

Alonso
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top