Request for the permission of type 'System.Security.Permissions.SecurityPermission, mscorlib, Versio

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.
13 Jahre weitere
System.Security.SecurityException: Request for the permission of type 'System.Security.Permissions.SecurityPermission, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' failed. at System.Security.CodeAccessSecurityEngine.Check(Object demand, StackCrawlMark& stackMark, Boolean isPermSet) at System.Security.CodeAccessPermission.Demand() at System.Drawing.Graphics.FromHwnd(IntPtr hwnd) at PdfSharp.Drawing.XGraphics..ctor(Graphics gfx, XSize size, XGraphicsUnit pageUnit, XPageDirection pageDirection) at PdfSharp.Drawing.XGraphics.CreateMeasureContext(XSize size, XGraphicsUnit pageUnit, XPageDirection pageDirection) at MigraDoc.Rendering.DocumentRenderer.PrepareDocument() at MigraDoc.Rendering.PdfDocumentRenderer.PrepareDocumentRenderer(Boolean prepareCompletely) at MigraDoc.Rendering.PdfDocumentRenderer.PrepareRenderPages() at MigraDoc.Rendering.PdfDocumentRenderer.RenderDocument() at NopSolutions.NopCommerce.BusinessLogic.Utils.PDFHelper.PrintOrderToPDF(Order order, Int32 LanguageID, String FilePath) in F:\Own\NopCommerce\EnterpriseEdition\1.5Release\Libraries\Nop.BusinessLogic\Utils\PDFHelper.cs:line 470 at NopSolutions.NopCommerce.Web.Administration.Modules.OrderDetailsControl.btnGetInvoicePDF_Click(Object sender, EventArgs e) in F:\Own\NopCommerce\EnterpriseEdition\1.5Release\NopCommerceStore\Administration\Modules\OrderDetails.ascx.cs:line 603 The action that failed was: Demand The type of the first permission that failed was: System.Security.Permissions.SecurityPermission The Zone of the assembly that failed was: MyComputer




It does this when I try to print the invoice or PDF.
Permissions for all files and folders have been set to full Read/write
13 Jahre weitere
are you running in full trust?


make sure 'network service' has read write permission for folder   files/ExportImport
13 Jahre weitere
I have this problem too!

Is full trust set up via Nopcomm administration or through my hosting company?
13 Jahre weitere
strickerm wrote:
I have this problem too!

Is full trust set up via Nopcomm administration or through my hosting company?


Trust Level is provided by hosting company.

FYI : GoDaddy doesn't provide full trust

These hosting companies provide full trust level: https://www.nopcommerce.com/recommendedhosting.aspx
13 Jahre weitere
My host company is Network Solutions.  They added "write" access to the "files" folder that contains the file "ExportImport".  

Still have the problem...
13 Jahre weitere
ask your hosting company if they can provide full trust for your website - if they do, it may be as simple as adding the line :


    <trust level="Full" />

between the

  <system.web>

tags in your web.config file

- hayden
10 Jahre weitere
Please help me resolve the same issue.  Thank you.
9 Jahre weitere
haydie wrote:
ask your hosting company if they can provide full trust for your website - if they do, it may be as simple as adding the line :


    <trust level="Full" />

between the

  <system.web>

tags in your web.config file

- hayden


Thank you!

It's helpfull on GoDaddy.
7 Jahre weitere
yes, it worked fine for me just added trust level high in web.config

<system.web>

<trust level="Full"/>

</system.web>
This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.