Jump to content
Software FX Community

Partial trust


hhravn
 Share

Recommended Posts

I recently inherited an application using an alpha ( 0.8.2543.6920 ) of Chart FX for WPF in an xbap application. When i upgrade to the newest beta, i need to change the trust level to full trust, or else i get an ReflectionPermission exception. How do i get around this?

Regards

Hans-Henrik

Link to comment
Share on other sites

After build 2543 we have made several changes to our default styles, some of those changes include the use of bitmapeffects which do not work in low trust.

You should modify the reference in your project to ChartFX.XBAP.dll, because you were using a very old version it is likely that some API have changed.

Regards,

JuanC

Link to comment
Share on other sites

  • 5 months later...

Hi

In http://community.softwarefx.com/blogs/wpf/archive/2009/07/01/security-issues-using-charts-in-a-wpf-browser-application-xbap.aspx
you are talking about build 3467. We recently bought the component and
our build number (and the one that cane be downloaded from your site) is
version 8.0.3422.28509. I'm guessing this means build 3422? If so,
where do we get the newer build?

We still get an exception on initialization of the chart component when running the application in partial trust. In full trust it runs as intended. I've copied licenses.licx to the main application as an embedded resource.

Here's the message(s) from the exception tree;


Cannot create instance of
'Chart' defined in assembly 'ChartFX.XBAP, Version=8.0.3422.28509,
Culture=neutral, PublicKeyToken=a1878e2052c08dce'. Exception has been
thrown by the target of an invocation.  Error at object
'System.Windows.Controls.DockPanel' in markup file
'ChartLib;component/advancedchart.xaml' Line 6 Position 6.



ChartFX.WPF.Internal.RegistryLicenseProvider..ctor()



Request for the permission of type
'System.Security.Permissions.ReflectionPermission, mscorlib,
Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089'
failed.
Link to comment
Share on other sites

 ..or atleast i thought so. When deploying i still recieve an exception. I posted a screenshot of a popup displaying the trace here.

 <edit>

Forgot to mention that the chart control is wrapped in an assembly separate from the main application. The main application is, as mentioned, an xbap-app running in partial trust.

</edit

http://community.softwarefx.com/forums/data:image/gif,GIF89a%80%00%80%00%A2%00%00%FF%FF%FF%DD%DD%DD%BB%BB%BB%99%99%99%00%00%FF%00%00%00%00%00%00%00%00%00%21%FF%0BNETSCAPE2.0%03%01%00%00%00%21%F9%04%05%05%00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26a%DF%1E2%13%EC%E4%1CUu%F7%06%12%D5wn%E0%C1%5D%0F%9FQ%1Cq%F2%83%3A1%3FO%F8Xzt%EA%C7%DB6%AFs%5D%EE%F4%95%D5%25%BEv%D1Z%7Cv%F0%BB%EB%05%CC%B8%DERz%99%BF%D5kd%11%91%C3y%F9%F3G%D4%2F%B1%DF%7E%FF%08%BC%F9%E9%F7_I%EDaW%12t%01%3EP%DE3%B3%B9g%DB%80%9A-%A8%20%84%8CAha%7C%90Q%A8%21%85%7Ea%B8%21%87%CE5%18%8C%88%E4%80%88%16%89%25%26%C8%A0%8A%19%A2%98%93%8B%11%B2%D8%21%8C1J%08%A0%89%9F%BC%97b%81%F8%C9x%A2%8F%F0%F1%D8%A3%8D%CA%E8%B8%23%91%2B%02%29%9C%92%232y%24%92%C6%A55%E4x%7E%E0H%9B%95%04%60%89%A1%22%5B%06%09%E5%8D4%9Aa%A4%97RNY%26%97X%D6x%E6%3ANv%91%A6%9ATr%D7%26%15of%19%26%99q%E6%28%A4%7Fs%929%E3Q%EE%7D%89%1Eiu%AAVhj%87%A2%96%E8i%8B%9A%D6%A8%A3%7B%AE%C6%27%A0%AE%24%00%00%21%F9%04%05%05%00%04%00%2C%0A%00%02%00W%000%00%00%03%FFH%BA%DC%FE0%BE%40%83%BC8%EB%3D%2B%E5%60%28J%9E7%9E%28WVi%EBv%EB%2B%BF%EB7%DFgm%E1%3C%A8%F7%23%81P%90%FA%A1%00H%40k8D%19G%C9%24%8A%C9%CC%D5N%D1%E8%89%DA%1C%3DCYi%90%2B%F4%5EEa%B1%88%DC%F5%9DAi%F5%9A-%FAn%E2%CA%14%9B%E8%8E%C1%E3.%7B%21v%19x%2F%82*o%1A%86%87%88%1A%84%12xy%8Dd%89%7E%8B%803%7B%7C%19%90%10%928%8E%18%9E%0F%8C%A1t%9D%8A%91%99%3C%A2%24%AA%11%A6%AD%A8%17%A4%0C%B2%B3%B4%11%B6%0A%A0%40%0A%AE0%25%18%B8%3D%9B%B5%B0%0D%BE%BF%C0%BA%10%97%B1%AC%10%03%D4%03%81%CE%C2%C4%D2%0F%D5%D5K%D8G%DB%0D%DD%E4z%952%E2%E3%E4%E5c%5C3%E9%0C%EB%F2%EDm%E8Y%18%F2%F3se%3CZ%19%F9%FA%98%09%04%18P%E0%2F%82%EB%0C2C%C8N%21%10%86%DD%1C%1E%84HMb%0F%8A%15-%F2%C0%A8%F1%13%22%C3%8E%0F%09%82%0C%99o%E4%C4%86%26IZK%A9%21%01%00%21%F9%04%05%05%00%04%00%2C%1F%00%02%00W%000%00%00%03%FFH%BA%DC%FEKH%01%AB%BD8%EB6%E7%FE%60%A8u%9Dh%9E%22%E9%A1l%5B%A9%92%2B%CF%04L%D1%F8i%E7%7C%B8%F7%A2%81p%C0%FA%9D%02%C8%40k8D%19E%C9%24%8A%C9%D4%C1%8EQ%A9%89%DA4%3DAYm%90%2B%F4%5E%A1a%E4%89%DC%05%7D5i%F1%98%9C%3A%83%E3K%B6%CF%BE%89%2B%F3tn%7Cpx.lD%1Fo%17%7E3%87%88%23%83%8B%8C%8Dz%1B%8A%15%93%94%95%19%97%0F%7E%7F4%87%96%91%98%859%A2%9C%A4%9E%A6%A7%9B%17%9D%0D%99%3C%A8%AF%AA%B1%AC%B3%B4%2F%B6%0B%9F%40%0B%BA%10%B0%0A%B2%40%8E%B5*%92%B8%C6%AE%C2%24%18%C5%BF%04%C1%0F%25%CAa.%00%DA%00%18%D4%28%D1%21%DB%DB%DD%812%CB%20%E2%E9%17%CD%2C%E7%1A%E9%F0%E4U8%D8%22%F0%F7%19%F39Q%26%F7%F8%D2%D2%FC%FD%03%D8C%E0%40%828%0C%C6C%C8C%A1%3A%86%09%1D%8E%83HC%E2D%8A3%2Cj%C3X%D1%14%22%C7%88%0A%3F%E6%08%29r%A4%C0%92%05%17%A2L%B9%D1D%02%00%21%F9%04%05%05%00%04%00%2C%3C%00%02%00B%00B%00%00%03%FEH4%3C%FA0%CAI%AB%9D%AD%DD%CD%7B%CD%99%27%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%22%F3%F4%D7%1D%F7%F8%ED%22%E3B%F4%0B%91O%9F%1BokR%144%E8%89%04%1B%85%FFF%BC%A9%E2l%14%C5%28%0B%2F%FE%C8%A8Q%13%07%C7%8E5%3E%82%84%21r%E4%8Bj%26%89%84K%A9%20%01%00%21%F9%04%05%05%00%04%00%2C%0A%00N%00W%000%00%00%03%FFH%BA%DC%0E%10%B8I%AB%BD8%B7%C8%B5%FF%E0%C7%8DRh%9E%219%A2lK%A9%A4%2B%B7%B0%3A%DF%60m%E3%3C%A6%C7%BD%E0%E4%B7%12%1A%17%C4%CEq%99%8C%2C%8FM%C8%13%DA%9CR%89%A7%806%20%1Cx%07%99dv%AB%ED%7D%BF%3E%1D%8AL%C6%9D%CF%97Z%8B%BDu%BF%BDi%25%8B%5E%BF%DD%D1qN.%7Ce%17%02%87%02%18%7FxV%04%84%5C%86%88%87%8A%8BV%8F%90%15%92%92%17%8B%8CK%8F%18%9A%88%94%7FO%97%A1%A2%89%9C%9D%9F%84%19%A9%AA%AB%A5F%A0%AF%A9%1A%ACB%B5%A8%A2%B8%95A%BB%BC%9A%1E%B98%A7%1A%B0%C4%C53%C1%C2%9B%CA%B3%CC%CD%91%BD%D0%D1%83%AE%1F%C9%1F%CB%7B%D9%DA%B7%20%DDc%7C%21%DB%DC%BF%DE%E5%E6%E1%E2%E9%26%C7%20%E7%E8%EF%20%D3%C8%ED%EE%D7%F6%EB%26%F3%FAo%D6%F4cW%CDD%3D%7EmP%FC%03%E8I%60%21%85%F9%0C%02jDm%18E%2B%0B%2F%0A%C9%A8%B1%12%07%C7%8E8%3E%82%9C%21r%A4%8C%82%26%8D%3C%E3%91%00%00%21%F9%04%05%05%00%04%00%2C%02%00%3C%00B%00B%00%00%03%F5H%04%DC%FE%F0%A9I%AB%BD%98%C6%CD%5D%FE%E0%D5%8D%5Ch%82d*%9D%AC%A5%BE%40%2BO%B0%3A%DF%F5x%EF%F9%B6%FF%C0%A0pH%2C%1A%8F%C8%A4r%C9l%3A%9F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5%F6%CB%F8%CC%F2%F7%F4%F9%FA%DB%D4%CD%D3wf%9F%86%04%00%21%F9%04%09%05%00%04%00%2C%02%00%02%00%7C%00%7C%00%00%03%FFH%BA%DC%FE0%CAI%AB%BD8%EB%CD%BB%FF%60%28%8Edi%9Eh%AA%AEl%EB%BEp%2C%CFt%0A%DC%40%AD%938%BE%FF%9E%5E%0FH%CC%08%7D%C5%24%E5%88T%3A%1D%CC%E6sJ%88%E6%A8X%2B%96%AA%DDN%BB%5E%A5%F5%1AN%82%CB%C41%DA%1C%5D%B3%99%EEt%3B%0E%3C%D3i%EA%BB%CE%AE%8F%E5%FB3%7C%80%12%01%85%01%21%82%83%0E%86%86%20%89%8A%0B%8C%92%1Fs%90%10%92%98%1D%95%96%8B%98%99%1BG%9C%11%9E%9E%1CC%A2%A3%A4%9F%A8%26%AA%A5%AC%AD%AE%93%B0%24%B2%B3%B4%23%B6%8C%B8%B5%BA%85%BC%22%BE%BF%C0%21%C2%C4%C1%B6%C7%B9%AE%CA%CB%A4%CD%BD%B7%D0%CE%87%D3%D6%D7%D8%D9%DA%DB%DC%DD%DE%DF%E0%E1%C0%02%E4%E5%E6%E7%E8%E7%DC%E9%EC%ED%E6%DA%EE%F1%ED%D9%F2%F5%EA%D8%F6%F9%02%F4%FA%F5%F0%FD%EE%D6%01L%27%AE%A0%C1%83%08%13*%5C%C8%B0%A1%C3%87h%06H%1C%00q%C1%C4%8B%10%2Fj%A4%D8pP%A3F%86%1E7*%0C%E9%11%21%C9%92%07O%8A4%A8%F2%23%CB%96%13M%C2%94%98r%26%C7%970%13%CE%5C%98%93%E7I%87%24%2B%AE%ACH%00%23%D1%A3H%93*%5D%CA%B4%A9%D3%A7P%A3J%9DJ%B5%AA%D5%ABX%B3j%DD%CA%B5%AB%D7%AF%60%C3%16I%00%00%3B

Loading image

Click anywhere to cancel

Image unavailable

Link to comment
Share on other sites

Does the same XBAP app works fine if you use FullTrust in your settings? Although we fixed the ReflectionPermission issue, to get the license from the executable we end up calling System.ComponentModel.LicenseContext.GetLicenseKey which is theoretically how licensed components should work.

If you check the source for this implementation (this functions is virtual and it is actually implemented in RuntimeLicenseContext) either using Reflector or the .NET source code, you will see that it seems to require FileIOPermission on any path it takes.

This has been like that since .NET 1.0 but when we last tested XBAP we thought they finally fixed the issue, I am guessing there was some caching involved from previous tests and I apologize for the misunderstanding.

Another way to test this for sure would be for you to write a dummy licensed component and try to use it in an XBAP low trust app that does not have FileIOPermission, I suspect you will get the same exception.

JuanC

Link to comment
Share on other sites

If i run fulltrust (manually adding certificates etc), the app runs fine. This, however, is the very last resort for us, as the clients using the app are not inhouse, and are generally not expected to know how to set up certificates etc.

I build a (very) simple application that fails the same way for me. Again, when running on my own machine, evrything is ok. When deploying to our test system, an exception is thrown.

exception stack

test app

I read somewhere about an option to avoid the reflection/FileIO by manually calling a static method w. a license string. Could this be a workaround for our situation?

Link to comment
Share on other sites

>> I read somewhere about an option to avoid the reflection/FileIO by manually calling a static method w. a license string. Could this be a workaround for our situation?

Yes, you can send an email to sales at softwarefx dot com and we can provide a license string, which will for sure remove this .NET framework limitation. Please note that we may request for your assembly to be strong named.

>> I build a (very) simple application that fails the same way for me

I actually meant that if in your simple app instead of using a Chart FX control you use your own dummy licensed component, you will receive the same exception.

JuanC

Link to comment
Share on other sites

Hi Juan

I contacted sales last thursday, referencing this thread and requesting the mentioned license string. In the mail i included the strong name of our assembly, and attached the invoice of our purchase of the ChartFX component. I have had no response since then. Could you tell me when i should expect an answer?

Regards

Hans-Henrik

Link to comment
Share on other sites

  • 2 weeks later...

Hi

This is veeery frustrating. I recieved the license string from support, but it didn't really change anything. I still get the exact same exception. I've tried applying the license string as the very first thing in the constructor of the wrapper control, and various other places without any changes. I still get the FileIOPermission exception. Do i have to change anything else to make the components actually use the string?

Hans-Henrik

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...