Error accessing mscorlib.dll

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Alonso

    Error accessing mscorlib.dll

    Hola amigos,

    Me he creado una biblioteca de clases y dentro una clase (Class1)
    que hereda de System.Enterpri seServices.Serv icedComponent.
    En la clase he creado una función de tipo System.Guid y
    en el return le pongo: ContextUtil.Con texId.

    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.GetContextI D.ToString
    Catch ex As System.Unauthor izedAccessExcep tion
    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.



  • One Handed Man \( OHM - Terry Burns \)

    #2
    Re: Error accessing mscorlib.dll

    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" <Alonso@discuss ions.microsoft. com> wrote in message
    news:66FF44C1-82C6-453F-8A84-B2C4EB3A877B@mi crosoft.com...[color=blue]
    > Hola amigos,
    >
    > Me he creado una biblioteca de clases y dentro una clase (Class1)
    > que hereda de System.Enterpri seServices.Serv icedComponent.
    > En la clase he creado una función de tipo System.Guid y
    > en el return le pongo: ContextUtil.Con texId.
    >
    > 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.GetContextI D.ToString
    > Catch ex As System.Unauthor izedAccessExcep tion
    > 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.
    >
    >
    >[/color]


    Comment

    • Cor Ligthert

      #3
      Re: Error accessing mscorlib.dll

      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.
      [color=blue]
      > Try
      > Dim obj As New Class1
      > Me.Label1.Text = obj.GetContextI D.ToString
      > Catch ex As System.Unauthor izedAccessExcep tion
      > Me.Label1.Text = "El mensaje de error es: " &
      > ex.Message[/color]

      Catch ex as Exception
      me.label1.text = ex.tostring
      End Try[color=blue]
      >[/color]

      I hope this helps?

      Cor


      Comment

      • Alonso

        #4
        Re: Error accessing mscorlib.dll

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

        Thank you for your answer.

        Alonso

        "One Handed Man ( OHM - Terry Burns )" wrote:
        [color=blue]
        > 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" <Alonso@discuss ions.microsoft. com> wrote in message
        > news:66FF44C1-82C6-453F-8A84-B2C4EB3A877B@mi crosoft.com...[color=green]
        > > Hola amigos,
        > >
        > > Me he creado una biblioteca de clases y dentro una clase (Class1)
        > > que hereda de System.Enterpri seServices.Serv icedComponent.
        > > En la clase he creado una función de tipo System.Guid y
        > > en el return le pongo: ContextUtil.Con texId.
        > >
        > > 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.GetContextI D.ToString
        > > Catch ex As System.Unauthor izedAccessExcep tion
        > > 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.
        > >
        > >
        > >[/color]
        >
        >
        >[/color]

        Comment

        • Alonso

          #5
          Re: Error accessing mscorlib.dll

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

          Thank you for your answer.

          Alonso

          "Cor Ligthert" wrote:
          [color=blue]
          > 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.
          >[color=green]
          > > Try
          > > Dim obj As New Class1
          > > Me.Label1.Text = obj.GetContextI D.ToString
          > > Catch ex As System.Unauthor izedAccessExcep tion
          > > Me.Label1.Text = "El mensaje de error es: " &
          > > ex.Message[/color]
          >
          > Catch ex as Exception
          > me.label1.text = ex.tostring
          > End Try[color=green]
          > >[/color]
          >
          > I hope this helps?
          >
          > Cor
          >
          >
          >[/color]

          Comment

          Working...