Re: Question about strong-name dlls
- From: "Diego F." <diegofrNO@xxxxxxxx>
- Date: Fri, 20 May 2005 12:44:49 +0200
from which file?
--
Regards,
Diego F.
"Egghead" <robertlo_NO_SPAM@xxxxxxx> escribió en el mensaje
news:%23oxbQPJXFHA.3248@xxxxxxxxxxxxxxxxxxxxxxx
> Can we see the "file" name in full path?
> Egghead
> "Diego F." <diegofrNO@xxxxxxxx> wrote in message
> news:%23rlmdkIXFHA.2796@xxxxxxxxxxxxxxxxxxxxxxx
>> Here is the error when trying to save to disk::
>>
>> Security Exception
>> Description: The application attempted to perform an operation not
>> allowed
>> by the security policy. To grant this application the required permission
>> please contact your system administrator or change the application's
>> trust
>> level in the configuration file.
>>
>> Exception Details: System.Security.SecurityException: Request for the
>> permission of type 'System.Security.Permissions.FileIOPermission,
> mscorlib,
>> Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b77a5c561934e089'
>> failed.
>>
>> Source Error:
>>
>>
>> Line 256: //try
>> Line 257: //{
>> Line 258: fs=new FileStream(file,FileMode.Create,FileAccess.Write);
>> Line 259:Line
>> 260: //}
>>
>>
>>
>> and this one when sending via http:
>>
>> Security Exception
>> Description: The application attempted to perform an operation not
>> allowed
>> by the security policy. To grant this application the required permission
>> please contact your system administrator or change the application's
>> trust
>> level in the configuration file.
>>
>> Exception Details: System.Security.SecurityException: That assembly does
> not
>> allow partially trusted callers.
>>
>> Source Error:
>>
>>
>> Line 79: outStream.Close();
>> Line 80: ms.Close();
>> Line 81: return result;
>> Line 82: }
>> Line 83: internal static string xRefFormatting(long xValue)
>>
>>
>>
>> --
>>
>> Regards,
>>
>> Diego F.
>>
>> "Kevin Spencer" <kevin@xxxxxxxxxxxxxxxxxxxxxxxxxx> escribió en el mensaje
>> news:ehbM6YIXFHA.632@xxxxxxxxxxxxxxxxxxxxxxx
>> > Are you doing this ON the server?
>> >
>> > --
>> > HTH,
>> >
>> > Kevin Spencer
>> > Microsoft MVP
>> > .Net Developer
>> > Sometimes you eat the elephant.
>> > Sometimes the elephant eats you.
>> >
>> > "Diego F." <diegofrNO@xxxxxxxx> wrote in message
>> > news:%23BRP2QIXFHA.796@xxxxxxxxxxxxxxxxxxxxxxx
>> >>I tried that, but when I try to select the dll in the server with Trust
>> >>dll, I get an error: Unable to load dll.
>> >>
>> >> --
>> >>
>> >> Regards,
>> >>
>> >> Diego F.
>> >>
>> >>
>> >> "Kevin Spencer" <kevin@xxxxxxxxxxxxxxxxxxxxxxxxxx> escribió en el
> mensaje
>> >> news:uRw5ecHXFHA.2740@xxxxxxxxxxxxxxxxxxxxxxx
>> >>> Sure thing, Diego.
>> >>>
>> >>> Apparently there is a trust issue with one or more DLLs (the library
>> >>> includes the SharpZiupLib DLL, as well as the DLL it generates). This
>> >>> can easily be remedied by using the .Net "Trust an Assembly" tool in
>> >>> ".Net Wizards" found in Administrative Tools on the server, to grant
>> >>> full trust to the assembly that is not trusted. Of course, you will
> want
>> >>> to know which one is causing the issue.
>> >>>
>> >>> --
>> >>> HTH,
>> >>>
>> >>> Kevin Spencer
>> >>> Microsoft MVP
>> >>> .Net Developer
>> >>> Sometimes you eat the elephant.
>> >>> Sometimes the elephant eats you.
>> >>>
>> >>>
>> >>> "Diego F." <diegofrNO@xxxxxxxx> wrote in message
>> >>> news:O9BzKeGXFHA.2740@xxxxxxxxxxxxxxxxxxxxxxx
>> >>>> OK, I'll try to explain a bit more. BTW, I'm sorry for the date, I'm
>> >>>> having problems with my computer and sometimes it changes the date
> and
>> >>>> time.
>> >>>>
>> >>>> I need a library to export a datagrid to a pdf file and I found a c#
>> >>>> library (gios pdf) with the source code. I compile and generate the
>> >>>> dll. If I run in a local project, it works OK, but if I move it to a
>> >>>> server project it gives me a Security exception:
>> >>>>
>> >>>> System.Security.SecurityException: that assembly does not allow
>> >>>> partially trusted callers
>> >>>>
>> >>>> and
>> >>>>
>> >>>> System.Security.SecurityException: request for the permission type
>> >>>> 'System.Security.Permissions.FileIOPermission'
>> >>>>
>> >>>> depending if I send the file via http or save to disk.
>> >>>>
>> >>>> Can you help me?
>> >>>>
>> >>>> --
>> >>>>
>> >>>> Regards,
>> >>>>
>> >>>> Diego F.
>> >>>> "Kevin Spencer" <kevin@xxxxxxxxxxxxxxxxxxxxxxxxxx> escribió en el
>> >>>> mensaje news:%234GF0LGXFHA.796@xxxxxxxxxxxxxxxxxxxxxxx
>> >>>>> Good heavens, Diego!
>> >>>>>
>> >>>>>> I get Security.Exception errors when I move it to the server.
>> >>>>>
>> >>>>> That's almost as non-specific as it gets. It narrows down the
>> >>>>> possibilities to a single NAMESPACE.
>> >>>>>
>> >>>>>> Someone told me to strong-name it and install in the GAC. I don't
>> >>>>>> know if it will solve that, but I'm trying it.
>> >>>>>
>> >>>>> <SCREEEEEEECH!!!> DANGER WILL ROBINSON!
>> >>>>>
>> >>>>> If I told you that you should slaughter a chicken and drink its
> blood,
>> >>>>> would you? Just because "somebody" tells you that you should do
>> >>>>> something doesn't make it right.
>> >>>>>
>> >>>>>> I read some stuff and I create a keyFile.snk and then add the
>> >>>>>> assembly attribute.
>> >>>>>
>> >>>>> Okay, now you're showing some sense. You read some stuff. That's a
>> >>>>> good start. My advice to you is to read some more stuff, but not
> about
>> >>>>> how to strong-name an assembly. You need to back WAY up to the
>> >>>>> exception you received when you moved the app to the server. THAT's
>> >>>>> where the trouble started. And that is where you'll find the
> solution
>> >>>>> to your real problem, which is "what caused the exception?"
>> >>>>>
>> >>>>> Now, we can help you solve that problem, and I would be most happy
> to.
>> >>>>> Can you reproduce the exception, get a stack trace on it, and post
>> >>>>> both the exception message and the code that threw the exception on
>> >>>>> this board? If so, we can move forward to a diagnosis and solution
>> >>>>> from there.
>> >>>>>
>> >>>>> --
>> >>>>> HTH,
>> >>>>>
>> >>>>> Kevin Spencer
>> >>>>> Microsoft MVP
>> >>>>> .Net Developer
>> >>>>> Sometimes you eat the elephant.
>> >>>>> Sometimes the elephant eats you.
>> >>>>>
>> >>>>> "Diego F." <diegofrNO@xxxxxxxx> wrote in message
>> >>>>> news:%23b0x8$EXFHA.2540@xxxxxxxxxxxxxxxxxxxxxxx
>> >>>>>> I'm having security problems running a dll on a network. The dll
> runs
>> >>>>>> ok locally but I get Security.Exception errors when I move it to
> the
>> >>>>>> server.
>> >>>>>>
>> >>>>>> Someone told me to strong-name it and install in the GAC. I don't
>> >>>>>> know if it will solve that, but I'm trying it.
>> >>>>>>
>> >>>>>> I read some stuff and I create a keyFile.snk and then add the
>> >>>>>> assembly attribute. I compile the dll and I can install it in the
>> >>>>>> GAC. Should I do that part in the server? The server has not
>> >>>>>> installed the framework SDK. Anyway, if I try to add the reference
> in
>> >>>>>> the project, it does not add anything. Doesn't give me errors at
> all,
>> >>>>>> but it just don't add anything.
>> >>>>>>
>> >>>>>> Can you help me?
>> >>>>>>
>> >>>>>
>> >>>>>
>> >>>>
>> >>>>
>> >>>
>> >>>
>> >>
>> >>
>> >
>> >
>>
>>
>
>
.
- References:
- Re: Question about strong-name dlls
- From: Kevin Spencer
- Re: Question about strong-name dlls
- From: Diego F.
- Re: Question about strong-name dlls
- From: Kevin Spencer
- Re: Question about strong-name dlls
- From: Diego F.
- Re: Question about strong-name dlls
- From: Kevin Spencer
- Re: Question about strong-name dlls
- From: Diego F.
- Re: Question about strong-name dlls
- From: Egghead
- Re: Question about strong-name dlls
- Prev by Date: Authorization
- Next by Date: Application blocks
- Previous by thread: Re: Question about strong-name dlls
- Next by thread: Re: Question about strong-name dlls
- Index(es):
Relevant Pages
|