totoland / linqtoexcel

Automatically exported from code.google.com/p/linqtoexcel
0 stars 0 forks source link

Required permissions cannot be acquired. #26

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. Upload linq assembly along with Remotion assemblies to a web server 
with trustLevel set at least to medium.
2. try to access the app
3.

What is the expected output? What do you see instead?
I would expect to see my app working, what I see instead is IIS 
complaining about this and not even loading the app:

Required permissions cannot be acquired. 
[PolicyException: Required permissions cannot be acquired.]
   System.Security.SecurityManager.ResolvePolicy(Evidence evidence, 
PermissionSet reqdPset, PermissionSet optPset, PermissionSet denyPset, 
PermissionSet& denied, Boolean checkExecutionPermission) +7606579
   System.Security.SecurityManager.ResolvePolicy(Evidence evidence, 
PermissionSet reqdPset, PermissionSet optPset, PermissionSet denyPset, 
PermissionSet& denied, Int32& securitySpecialFlags, Boolean 
checkExecutionPermission) +57

[FileLoadException: Could not load file or assembly 'Remotion.Interfaces, 
Version=1.13.23.1, Culture=neutral, PublicKeyToken=fee00910d6e5f53b' or 
one of its dependencies. Failed to grant minimum permission requests. 
(Exception from HRESULT: 0x80131417)]

What version of the product are you using? On what operating system?
LinqToExcel 1.3.70 on Windows 2003 server

Please provide any additional information below.
LinqToExcel uses Remotion libraries but some of them can't run in 
controled settings which is a major disadvantage for this awesome project. 
If it won't run because of remotion assemblies on webhostings or controled 
environments another solution will be used instead of linqtoexcel

Original issue reported on code.google.com by miguel.m...@gmail.com on 25 May 2010 at 7:56

GoogleCodeExporter commented 8 years ago
I am working on recompiling the Remotion libraries to allow them to run in 
partially 
trusted environments.

Original comment by paulyo...@gmail.com on 26 May 2010 at 8:48

GoogleCodeExporter commented 8 years ago
Try replacing the remotion dll's with the ones attached here.

Let me know if they work for you, then I will add the updated dll's to source 
control.

Original comment by paulyo...@gmail.com on 26 May 2010 at 9:53

Attachments:

GoogleCodeExporter commented 8 years ago
Seems like LinqToExcel.dll still points to the other assemblies, could you 
recompile 
LinqToExcel.dll with reference to these new assemblies you created? new version 
for 
Remotion.Data.Linq is 1.13.52.2 and it is looking 1.13.23.1

getting these errors:
Error   2   The type 'Remotion.Data.Linq.QueryableBase`1<T0>' is defined in an 
assembly that is not referenced. You must add a reference to assembly 
'Remotion.Data.Linq, Version=1.13.23.1, Culture=neutral, 
PublicKeyToken=fee00910d6e5f53b'.   

Error   3   Could not find an implementation of the query pattern for source type 
'LinqToExcel.Query.ExcelQueryable<GlintWebValidator.Core.LayoutArchivosExcel.XLS
Archi
voValidacion>'.  'Select' not found.    

Error   4   The type arguments for method 
'System.Linq.Enumerable.ToList<TSource>(System.Collections.Generic.IEnumerable<T
Sourc
e>)' cannot be inferred from the usage. Try specifying the type arguments 
explicitly. 

Original comment by miguel.m...@gmail.com on 26 May 2010 at 10:16

GoogleCodeExporter commented 8 years ago
Here's the recompiled LinqToExcel.dll that references the new assemblies.

Original comment by paulyo...@gmail.com on 26 May 2010 at 10:31

Attachments:

GoogleCodeExporter commented 8 years ago
That did it! now LinqToExcel project is able to run in Partially trusted 
environments!

This is a great project, keep up the good work man! works like a charm :)

Original comment by miguel.m...@gmail.com on 27 May 2010 at 2:22

GoogleCodeExporter commented 8 years ago
This is fixed in revision 1.3.74 that is now published.

Original comment by paulyo...@gmail.com on 28 May 2010 at 12:02