View previous topic :: View next topic |
Author |
Message |
Uwe
Joined: 18 Nov 2006 Posts: 1 Location: Sweden
|
Posted: Sat Nov 18, 2006 11:03 am Post subject: Run in "Medium Trust" security level. |
|
|
My server host run their servers with "Medium Trust" security level and when I try to run my PDFsharp assembly I got an error that is "That assembly does not allow partially trusted callers".
Because I got the soruce code there must be ways to solve this problem, but I don't know how. Is there someone who got any solution? |
|
Back to top |
|
|
vikramjb
Joined: 13 Nov 2006 Posts: 7
|
|
Back to top |
|
|
rivien
Joined: 13 Apr 2007 Posts: 3 Location: USA
|
Posted: Fri Apr 13, 2007 8:55 pm Post subject: Use a FULL TRUST Web Hosting Provider |
|
|
Hi,
I messed around for months trying to figure how to get dll's to run in the Medium Trust environment. It's not worth it. I moved over to a web host that allows Full Trust and ASP.NET 2.0 (see the URL below).
http://www.discountasp.net/
Rivien |
|
Back to top |
|
|
mcrilly
Joined: 15 May 2007 Posts: 1 Location: Melbourne
|
Posted: Tue May 15, 2007 2:04 am Post subject: trust |
|
|
Hello,
Did you manage to get pdfsharp working in medium trust or do you have to go with another host that allows full trust? |
|
Back to top |
|
|
cmgarnett
Joined: 24 May 2007 Posts: 11 Location: Bedford, UK
|
Posted: Wed Jun 06, 2007 8:28 am Post subject: |
|
|
Adding the following line to the AssemblyInfo.cs file in the PdfSharp project has got me past the first hurdle, the assembly and trust level one.
[assembly: AllowPartiallyTrustedCallers]
No I'm stuck because I get a "Security Exception" error! The stack trace includes the following lines in it.
PdfSharp.Drawing.XGraphics..ctor(PdfPage page, XGraphicsPdfPageOptions options, XGraphicsUnit pageUnit, XPageDirection pageDirection) in XGraphics.cs:130
PdfSharp.Drawing.XGraphics.FromPdfPage(PdfPage page) in XGraphics.cs:286
I still have to work out which line of my own code was calling the PdfSharp code.
Let me know if you have any joy. |
|
Back to top |
|
|
cmgarnett
Joined: 24 May 2007 Posts: 11 Location: Bedford, UK
|
|
Back to top |
|
|
|