Welcome Guest Search | Active Topics | Sign In | Register

Running EO.Pdf in Partial Trust environment Options
Mark A
Posted: Thursday, January 26, 2012 7:00:22 PM
Rank: Newbie
Groups: Member

Joined: 5/9/2011
Posts: 3
We run a hybrid dedicated/cloud system and want to run an HTML2PDF converter on both the dedicate server and the cloud site. Unfortunately the cloud sites operate in a partial/medium trust environment. When we try to run EO.pdf.dll it throws this:

System.Exception: Insufficient permissions to start EO.Pdf HTML to PDF converter, please check whether your application's trust level is set to full.

Is it possible to run in a partial trust environment?

Quote:

pdf.aspx

<%@ Page Language="C#" AutoEventWireup="true" CodeFile="pdf.aspx.cs" Inherits="pdf" %>

<form id="form1" runat="server">
<asp:Button runat="server" ID="btnPdf" Text="Generate PDF" />
</form>


Quote:

pdf.aspx.cs

using System;
using System.Web;
using EO.Pdf;

public partial class pdf : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
btnPdf.Click += new EventHandler(btnPdf_Click);
}

protected void btnPdf_Click(object sender, EventArgs e)
{
//Set the response header
HttpResponse response = HttpContext.Current.Response;
response.Clear();
response.ClearHeaders();
response.ContentType = "application/pdf";

//Code to convert an Url or HTML file to PDF. The following code writes output to a
//file. You can also write output to a Stream, a PdfPage, or a PdfDocument object
HtmlToPdf.ConvertUrl("http://www.google.com", Response.OutputStream);

response.End();
}
}


Quote:

web.config

<?xml version="1.0"?>
<configuration>
<system.web>
<compilation debug="true" />
<customErrors mode="Off" />
</system.web>
</configuration>

eo_support
Posted: Thursday, January 26, 2012 7:02:40 PM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,194
Hi,

It is not possible to run EO.Pdf in a partial trust environment. Internally EO.Pdf makes a lot of API calls. So it must have unmanaged permission to run.

Thanks!


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.