Re: Question about strong-name dlls
- From: "Kevin Spencer" <kevin@xxxxxxxxxxxxxxxxxxxxxxxxxx>
- Date: Tue, 24 May 2005 06:23:56 -0400
> Well, I tried that. I added full control to Network Service on the project
> folder,
Well, Diego, in case you're still there, I have one observation: Is the
"project folder" the folder the app is trying to write a file to? If not,
you're barking up the wrong tree.
--
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:eL$GTIDYFHA.3164@xxxxxxxxxxxxxxxxxxxxxxx
> Well, I tried that. I added full control to Network Service on the project
> folder, but I get no results. And also with the Framework Policy tool, set
> full trust to all code, so I don't know what else to do.
>
> I'm leaving that because it's taking too long. Maybe in a few weeks I have
> the energy again...
>
> Thank you for your help
>
> --
> Regards,
>
> Diego F.
>
> "Kevin Spencer" <kevin@xxxxxxxxxxxxxxxxxxxxxxxxxx> escribió en el mensaje
> news:O4$9DJ8XFHA.3572@xxxxxxxxxxxxxxxxxxxxxxx
>> Hi Diego,
>>
>> You only want to set trust on ONE assembly, but really, you don't need
>> to. You're talking about 2 different issues, 2 different sets of code,
>> and 2 different resultant errors. I believe you want to go with the File
>> IO solution, as that is going to be the fastest. Anything using HTTP is
>> going to involve overhead and latency. So, let's see if we can straighten
>> out the IO issue.
>>
>> You should go to the directory that your Network_Service account is
>> trying to write to, and grant that user account permission to write to
>> that directory. If that doesn't work, check your Security Policy for that
>> OS.
>>
>> --
>> HTH,
>>
>> Kevin Spencer
>> Microsoft MVP
>> .Net Developer
>> Sometimes you eat the elephant.
>> Sometimes the elephant eats you.
>>
>> The IO issue is caused NOT by an assembly trust issue, but with a
>> permissions issue.
>> "Diego F." <diegofrNO@xxxxxxxx> wrote in message
>> news:%23KPSsv6XFHA.612@xxxxxxxxxxxxxxxxxxxxxxx
>>> OK, I post the complete error message. BTW, I don't know if it this is a
>>> trust theme; I set full trust in .NET Framework 2.0 Configuration tool.
>>> In Runtime Security Policy -> Machine -> Code Groups -> All Code, I set
>>> Full Trust, that should admit all kind of assemblies.
>>>
>>> Here is the error messages:
>>>
>>> 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:%239uYxf6XFHA.616@xxxxxxxxxxxxxxxxxxxxxxx
>>>> How about copying and pasting the EXACT error message?
>>>>
>>>> It may be an assembly trust issue, but if the computer is on a network
>>>> (LAN) you may need to log in as a network administrator, not as a local
>>>> machine administrator.
>>>>
>>>> --
>>>> 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:erBj%23T6XFHA.796@xxxxxxxxxxxxxxxxxxxxxxx
>>>>> Well, I log in as Administrator and I added permissions to many users,
>>>>> with full control. I tried directly in the folder and also from IIS.
>>>>>
>>>>> The error is always System.Security, and can be related to
>>>>> FileIOPermission, if I try to create the file, or a more strange
>>>>> "assembly does not allow partially trusted callers" if sending http.
>>>>>
>>>>> --
>>>>> Regards,
>>>>>
>>>>> Diego F.
>>>>>
>>>>>
>>>>>
>>>>> "Kevin Spencer" <kevin@xxxxxxxxxxxxxxxxxxxxxxxxxx> escribió en el
>>>>> mensaje news:Oi8vVN6XFHA.3716@xxxxxxxxxxxxxxxxxxxxxxx
>>>>>> Hi Diego,
>>>>>>
>>>>>> You probably need to check the Permissions on the specific folder
>>>>>> that the app is trying to write to. File System permissions can be
>>>>>> tricky. They exist in more than one place.
>>>>>>
>>>>>> Also, can you post the exact error message? And are you an
>>>>>> Administrator on the Windows 2003 server machine?
>>>>>>
>>>>>> --
>>>>>> HTH,
>>>>>>
>>>>>> Kevin Spencer
>>>>>> Microsoft MVP
>>>>>> .Net Developer
>>>>>> Sometimes you eat the elephant.
>>>>>> Sometimes the elephant eats you.
>>>>>>
>>>>>
>>>>>
>>>>
>>>>
>>>
>>>
>>
>>
>
>
.
- Follow-Ups:
- Re: Question about strong-name dlls
- From: Diego F.
- Re: Question about strong-name dlls
- References:
- 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: 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: 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: Kevin Spencer
- Re: Question about strong-name dlls
- From: Diego F.
- Re: Question about strong-name dlls
- Prev by Date: Page_load not fired after some time of inactivity
- Next by Date: Re: creating usercotrols from webcontrol
- Previous by thread: Re: Question about strong-name dlls
- Next by thread: Re: Question about strong-name dlls
- Index(es):
Relevant Pages
|