Page Index Toggle Pages: 1 Send TopicPrint
Hot Topic (More than 10 Replies) Full Trust (Read 5661 times)
bkernan
YaBB Newbies
*
Offline


I love YaBB 1G - SP1!

Posts: 37
Joined: May 28th, 2009
Full Trust
Apr 13th, 2010 at 3:05pm
Print Post  
Hello,

sorry if this has already been addressed (my search through the forum returned no results).

Is it possible to run NetDiagram in JavaApplet mode with a custom trust level other than Full Trust?

I get the error: "System.Security.SecurityException:  That assembly does not allow partially trusted callers." When I try to run in Medium Trust.

Thanks
Brittney
  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: Full Trust
Reply #1 - Apr 13th, 2010 at 5:32pm
Print Post  
Hi,

Version 3.1 of the control can run with partial trust.

Stoyan
  
Back to top
 
IP Logged
 
bkernan
YaBB Newbies
*
Offline


I love YaBB 1G - SP1!

Posts: 37
Joined: May 28th, 2009
Re: Full Trust
Reply #2 - Apr 15th, 2010 at 1:19pm
Print Post  
Great! We will dl the new version, thank you!
  
Back to top
 
IP Logged
 
bkernan
YaBB Newbies
*
Offline


I love YaBB 1G - SP1!

Posts: 37
Joined: May 28th, 2009
Re: Full Trust
Reply #3 - May 11th, 2010 at 8:50pm
Print Post  
Partial trust working good  Grin
  
Back to top
 
IP Logged
 
bkernan
YaBB Newbies
*
Offline


I love YaBB 1G - SP1!

Posts: 37
Joined: May 28th, 2009
Re: Full Trust
Reply #4 - Jun 7th, 2010 at 3:37pm
Print Post  
Hello,

In our custom partial trust, I get a security error when PdfExporter.Export() is called.

[SecurityException: Request for the permission of type 'System.Security.Permissions.SecurityPermission, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' failed.]
   MindFusion.Pdf.MultilangTools.DetectOutgoingEncodings(String input, Int32[] preferedEncodings, Boolean preserveOrder) +0 ... rest of stack trace
 

In our trust file we allow write permissions to the directory we store pdfs, and that directory has its permissions set to writable. Any ideas as to what other permissions we need to add to export pdfs under partial trust?
  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: Full Trust
Reply #5 - Jun 7th, 2010 at 5:30pm
Print Post  
Hi,

PdfExporter uses some native Windows APIs to detect the encoding of the drawn text, so it won't run without a native code access permission. If you can't give it such permission, we could add some property to let you disable automatic detection.

Stoyan
  
Back to top
 
IP Logged
 
bkernan
YaBB Newbies
*
Offline


I love YaBB 1G - SP1!

Posts: 37
Joined: May 28th, 2009
Re: Full Trust
Reply #6 - Jun 7th, 2010 at 8:26pm
Print Post  
I beleive we can add this permission to our trust config file.

By any chance would you know or know where i could find some info on setting up the partial trust file to allow native code access?
Would the permission tag look something like this:

<IPermission class="SecurityPermission" version="1" Flags="UnmanagedCode"/>
  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: Full Trust
Reply #7 - Jun 8th, 2010 at 10:50am
Print Post  
Yes, it's the UnmanagedCode flag of the SecurityPermission attribute that controls this. You can find an example here:
http://www.west-wind.com/Weblog/posts/6344.aspx

I hope that helps,
Stoyan
  
Back to top
 
IP Logged
 
bkernan
YaBB Newbies
*
Offline


I love YaBB 1G - SP1!

Posts: 37
Joined: May 28th, 2009
Re: Full Trust
Reply #8 - Jun 8th, 2010 at 7:06pm
Print Post  
Okay, we added that permission to our testing sites, but we cannot use it on our live site. So, the property you mentioned you could add to disable the encoding detection would be very useful for us  Wink Thanks for your help!
  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: Full Trust
Reply #9 - Jun 17th, 2010 at 6:55pm
Print Post  
Ok, we've added the property, but it turned out the PDF code also uses native APIs to measure all character glyphs in a given font. We'll see if we can replace it with the .NET's MeasureString method, though it's not very accurate in general.
  
Back to top
 
IP Logged
 
bkernan
YaBB Newbies
*
Offline


I love YaBB 1G - SP1!

Posts: 37
Joined: May 28th, 2009
Re: Full Trust
Reply #10 - Jun 28th, 2010 at 4:22pm
Print Post  
okay, thank you
  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: Full Trust
Reply #11 - Aug 9th, 2010 at 3:02pm
Print Post  
Hi,

Check the SuppressUnmanagedCode and FontCachePath properties from the 3.1.1 release.

I hope that helps,
Stoyan
  
Back to top
 
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint