Re: Question about strong-name dlls

Tech-Archive recommends: Fix windows errors by optimizing your registry



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?
>>>>>
>>>>
>>>>
>>>
>>>
>>
>>
>
>


.



Relevant Pages

  • Re: Question about strong-name dlls
    ... File System permissions can be tricky. ... the Windows 2003 server machine? ... > The error is that if I create a dll that writes to disk and use that dll ... >> Sometimes the elephant eats you. ...
    (microsoft.public.dotnet.framework.aspnet)
  • Re: Trouble Deploying ASP.NET Application
    ... ..Net Developer ... Sometimes the elephant eats you. ... > server after a user fills in the form. ... > though I change the XML, recompile the code and FTP it to the server. ...
    (microsoft.public.dotnet.framework.aspnet)
  • Many, many thanks
    ... Assuming that you instantiate the object in the dll on a .asp page, ... if you want to keep a dll loaded in IIS you have a couple ... my ole server dll was exposed. ...
    (microsoft.public.inetserver.iis)
  • Re: Please help
    ... Unable to open the Server service. ... DLL files to display messages from a remote computer. ... The NVIDIA Driver Helper Service service hung on starting. ... have the necessary registry information or message DLL ...
    (microsoft.public.windowsxp.perform_maintain)
  • Re: Win2k3 SP1 error: New transaction cannot enlist in the specifi
    ... What we came upon was the fact that Windows Server 2003 requires roles to ... Do you use SQL Username and password, or SSPI to logon to the database (if ... >> This dll supports transactions, but does not initiate transaction calls. ...
    (microsoft.public.windows.server.general)