Welcome Guest! To enable all features, please Login or Register.

Notification

Icon
Error

Options
View
Last Go to last post Unread Go to first unread post
#1 Posted : Sunday, March 16, 2008 11:29:17 AM(UTC)
mikesoft

Groups: Registered
Posts: 6


We're trying to create an Internet Explorer hosted .NET object that utilizes LeadTools to interact with JPEG 2000 images. We do all of our interaction with LeadTools using its in-memory methods and intentionally don't attempt to access the file system, since we have no access to it in this context. Unfortunately, LeadTools is requiring file system access just to load (see below error). Is there a known fix/workaround for this?

Thanks!

mike

System.IO.FileLoadException: Could not load file or assembly 'Leadtools, Version=15.0.0.0, Culture=neutral, PublicKeyToken=9cf889f53ea9b907' or one of its dependencies. Failed to grant minimum permission requests. (Exception from HRESULT: 0x80131417)
File name: 'Leadtools, Version=15.0.0.0, Culture=neutral, PublicKeyToken=9cf889f53ea9b907' ---> System.Security.Policy.PolicyException: Required permissions cannot be acquired.
at System.Security.SecurityManager.ResolvePolicy(Evidence evidence, PermissionSet reqdPset, PermissionSet optPset, PermissionSet denyPset, PermissionSet& denied, Boolean checkExecutionPermission)
at System.Security.SecurityManager.ResolvePolicy(Evidence evidence, PermissionSet reqdPset, PermissionSet optPset, PermissionSet denyPset, PermissionSet& denied, Int32& securitySpecialFlags, Boolean checkExecutionPermission)
 

Try the latest version of LEADTOOLS for free for 60 days by downloading the evaluation: https://www.leadtools.com/downloads

Wanna join the discussion? Login to your LEADTOOLS Support accountor Register a new forum account.

#2 Posted : Monday, March 17, 2008 12:55:43 AM(UTC)

Yasir Alani  
Guest

Groups: Guests
Posts: 3,034

Was thanked: 1 time(s) in 1 post(s)


Mike,


 


There are multiple .NET assemblies and dependency DLLs in
LEADTOOLS 15. Try to remove all LEADTOOLS code from your project and only keep Leadtools.DLL, and add this code:


Leadtools.RasterImage img =


  new Leadtools.RasterImage(


  Leadtools.RasterMemoryFlags.Conventional,


  800, 600, 24, Leadtools.RasterByteOrder.Bgr,


  Leadtools.RasterViewPerspective.TopLeft,


  null, IntPtr.Zero, 0);


int w = img.Width, h = img.Height;


 


This creates a blank LEAD image in memory that is 24 bits
per pixel with size 800 x 600 pixels. This does not require any other LEADTOOLS assemblies.


If this code works, but other features fail, it could be
because other assemblies are needed. For example, to load or save JPEG2000 images (from file or memory), you will need Leadtools.Codecs.dll and Leadtools.Codecs.J2k.dll.

 
#3 Posted : Wednesday, March 19, 2008 5:18:43 PM(UTC)
mikesoft

Groups: Registered
Posts: 6


Yasir,

Thanks for responding. I tried what you requested, and I still encounter the error. It would appears that it's Leadtools.dll itself that is requesting file access permissions for some reason. I have attached the project files if you wanted to test it out yourself. Do you know if there is a workaround or fix for this issue?

Thanks,

mie
File Attachment(s):
LeadTest.zip (862kb) downloaded 17 time(s).
 
#4 Posted : Monday, March 24, 2008 8:08:49 AM(UTC)

Yasir Alani  
Guest

Groups: Guests
Posts: 3,034

Was thanked: 1 time(s) in 1 post(s)

I'm not sure if I tested the same way you did. I
built the user control and web projects and created a virtual directory for the
ASP.NET project. I tried to access the ASPX web form from the same PC and from
another PC, and in both cases it worked. How exactly are you configuring your setup to restrict local disk access?

 
#5 Posted : Monday, March 24, 2008 5:40:27 PM(UTC)
mikesoft

Groups: Registered
Posts: 6


Yasir,

Thanks again for the reply. I should have been more descriptive. Do you see a blank white page or do you get a little icon in the upper left corner? You should see a little bitmap-style icon, meaning the control failed to load. You need to enable IE Host Debugging (http://support.microsoft.com/kb/313892), exit IE, and try again. You'll also need to make sure that you have the control DLL (LeadTest.dll) and LeadTools.dll in the root of the Web site, in addition to the bin directory. Under this scenario, you should see the error that I mentioned in the IE Host log file.
 
#6 Posted : Tuesday, March 25, 2008 3:02:22 AM(UTC)

Yasir Alani  
Guest

Groups: Guests
Posts: 3,034

Was thanked: 1 time(s) in 1 post(s)

I did not get the error icon. It seems to have loaded
successfully, as shown in the attached screenshot. I got the same result in 3 different ways:


1. Using IIS from the same PC


2. Using IIS from another PC on the network (shown image)


3. Using the Visual Studio ASP.NET development server on the same PC.


 


Since no LEADTOOLS files are loaded on the client PC, the
problem could be related to permissions on the server side. You mentioned
before that you cannot give disk access to the control. Is there a way to restrict such access on my server to simulate the same issue here?

Guest attached the following image(s):
screenshot.jpg
 
#7 Posted : Thursday, March 27, 2008 5:27:07 PM(UTC)
mikesoft

Groups: Registered
Posts: 6


Yasir,

The user control that I wrote does actually download to IE, along with its LeadTools.dll dependency and run on the client machine. I can see by your screenshots that you're running an earlier version of IE. I'm running on a system with IE7 installed, all released versions of the .NET Framework, and all the latest updates. Do you have the .NET Framework 2.0 installed on your client machine? You must if you're running the ASP.NET application on the same machine. I wouldn't have expected a security difference in the old versions of IE, nor do I have access to any of them. If you have access to IE7, you might try it to see if you don't encounter the error. I'd also try the IEHost log approach, just to ensure that IE isn't logging an error there, even though it appears to load the control properly.

Thanks very much for continuing to look into this,

mike
 
#8 Posted : Sunday, March 30, 2008 3:03:03 AM(UTC)

Yasir Alani  
Guest

Groups: Guests
Posts: 3,034

Was thanked: 1 time(s) in 1 post(s)


I tested the project on IE7 and again I was not able to
reproduce the error. The display I got was similar to the screenshot I sent you for IE6.


 


I then used a freshly installed Windows XP SP2 with .NET
framework 2 (no LEAD products were installed). And again it worked correctly, and no debug log file was produced.


 


Was I testing correctly? How can I check if the control was downloaded to this fresh machine or not?

 
#9 Posted : Thursday, April 10, 2008 6:42:28 PM(UTC)
mikesoft

Groups: Registered
Posts: 6


Yasir,

Again, thank you for your continued support on this issue. Might it be that you're running a more recent build of 15.x than I that has had the issue corrected? The file version on my LeadTools.dll is 15.0.0.2.

Thanks,

mike
 
#10 Posted : Sunday, April 13, 2008 6:00:47 AM(UTC)

Yasir Alani  
Guest

Groups: Guests
Posts: 3,034

Was thanked: 1 time(s) in 1 post(s)


You are using old DLLs.


 


Please send your serial number to support@leadtools.com and mention this forum post so I can send you download instructions to the latest build.


 


Do NOT post your serial number here.
 
#11 Posted : Sunday, April 20, 2008 6:23:46 AM(UTC)
mikesoft

Groups: Registered
Posts: 6


Yasir,

Looks like we've identified the problem.

Thanks for all the help!

mike
 
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.

Powered by YAF.NET | YAF.NET © 2003-2020, Yet Another Forum.NET
This page was generated in 0.501 seconds.