Problem solved?

Using Source for 5.0.2 itextsharp

Now the AsemblyInfo.cs looks like this:
****************************************************************************
*********************************************
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Security;
<========== Added This

//
// General Information about an assembly is controlled through the following

// set of attributes. Change these attribute values to modify the
information
// associated with an assembly.
//
[assembly: AssemblyTitle("iTextSharp")]
[assembly: AssemblyDescription("A free PDF library ported from Java
iText.")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("")]
[assembly: AssemblyCopyright("Copyright (C) 1999-2010 by Bruno Lowagie and
Paulo Soares. All Rights Reserved.")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]

// Added 5/17/2010 to allow Partial Trust users in hosted deployment
//At Same time added using System.Security required by this function
[assembly: AllowPartiallyTrustedCallers()]
<========== Added This

//
// Version information for an assembly consists of the following four
values:
//
//      Major Version
//      Minor Version 
//      Build Number
//      Revision
//
// You can specify all the values or you can default the Revision and Build
Numbers 
// by using the '*' as shown below:

[assembly: AssemblyVersion("5.0.2")]
****************************************************************************
********************************************************

Also Added Reference to Project for System.Security

Now It seems to work ok in shared hosting environment.....

- Bill

-----Original Message-----
From: William K. Goodbody [mailto:[email protected]] 
Sent: Tuesday, May 18, 2010 7:04 PM
To: 'Post all your questions about iText here'
Subject: itextsharp.dll V 5.0.2 fails in shared hosting environments

Error Caught in Application_Error event: Handled in Application_Error:

Error in: <<removed specific page info >>

Error Message: That assembly does not allow partially trusted callers.

Stack Trace:   at
ASP.includes_utils_tools_raffle_sponsorgiftreport_aspx.CreatePDFReport()
   at
ASP.includes_utils_tools_raffle_sponsorgiftreport_aspx._Lambda$__1(Object
a0, ImageClickEventArgs a1) in
D:\Hosting\4587917\html\Includes\Utils\Tools\Raffle\SponsorGiftReport.aspx:l
ine 394
   at System.Web.UI.WebControls.ImageButton.OnClick(ImageClickEventArgs e)
   at System.Web.UI.WebControls.ImageButton.RaisePostBackEvent(String
eventArgument)
   at
System.Web.UI.WebControls.ImageButton.System.Web.UI.IPostBackEventHandler.Ra
isePostBackEvent(String eventArgument)
   at System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler
sourceControl, String eventArgument)
   at System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData)
   at System.Web.UI.Page.ProcessRequestMain(Boolean
includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
   at System.Web.UI.Page.ProcessRequest(Boolean
includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
   at System.Web.UI.Page.ProcessRequest()
   at System.Web.UI.Page.ProcessRequestWithNoAssert(HttpContext context)
   at System.Web.UI.Page.ProcessRequest(HttpContext context)
   at
ASP.includes_utils_tools_raffle_sponsorgiftreport_aspx.ProcessRequest(HttpCo
ntext context)
   at
System.Web.HttpApplication.CallHandlerExecutionStep.System.Web.HttpApplicati
on.IExecutionStep.Execute()
   at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean&
completedSynchronously)

I modified the 5.0.2 code in AsemblyInfo.cs as follows, but not change in
error:
// Added 5/17/2010 to allow Partial Trust users in hosted deployment //At
Same time added using System.Security required by this function
[assembly: AllowPartiallyTrustedCallers()]

- Bill


------------------------------------------------------------------------------

_______________________________________________
iText-questions mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/itext-questions

Buy the iText book: http://www.itextpdf.com/book/
Check the site with examples before you ask questions: 
http://www.1t3xt.info/examples/
You can also search the keywords list: http://1t3xt.info/tutorials/keywords/

Reply via email to