Server error (urgent)


I was working with the evaluation copy on a local machine and it was working successfully.

But when I moved the code to a web server, it started throwing the following error.

Security Exception

Description: The application attempted to perform an operation not allowed by the security policy. To grant this application the required permission please contact your system administrator or change the application's trust level in the configuration file.

Exception Details: System.Security.SecurityException: Request for the permission of type System.Security.Permissions.StrongNameIdentityPermission, mscorlib, Version=1.0.3300.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 failed.

Source Error:

An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.

Stack Trace:

[SecurityException: Request for the permission of type System.Security.Permissions.StrongNameIdentityPermission, mscorlib, Version=1.0.3300.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 failed.]
   CostingTest.WPC_RM_ListRMSummaryReport.ibtnExport2PDF_Click(Object sender, ImageClickEventArgs e)
   System.Web.UI.WebControls.ImageButton.OnClick(ImageClickEventArgs e) +109
   System.Web.UI.WebControls.ImageButton.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String eventArgument) +71
   System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument) +18
   System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData) +33
   System.Web.UI.Page.ProcessRequestMain() +2077
   System.Web.UI.Page.ProcessRequest() +118
   System.Web.UI.Page.ProcessRequest(HttpContext context) +18
   System.Web.CallHandlerExecutionStep.Execute() +179
   System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +87

Could someone please help as I was looking forward to giving a demo to the client .

thanks in advance.

Following is the main block. I suspect bindxml is creating the problem ??

Dim pdf As Pdf = New Pdf()
pdf.PageSetup.PageWidth = 1000

pdf.IsTruetypeFontMapCached = False
' If you have purchased a Website, Webserver or Weboem License,
' Set license like this:
'Dim licenseFile As String = MapPath("License") + "\\Aspose.Pdf.lic"
'pdf.SetLicense(licenseFile, this)

Dim xmlFile As String = path + "\\ASPOSE.PDF\\Xml\\Invoice.xml"
pdf.BindXML(xmlFile, Nothing)

Dim headerFooter As HeaderFooter = pdf.Sections(0).OddHeader
Dim logoImage As Image = CType(headerFooter.Paragraphs(0), Image)
'ogoImage.ImageInfo.File = path + "\\ASPOSE.PDF\\Images\\logo1.jpg"
logoImage.ImageScale = 0.74F

Dim Footer As HeaderFooter = pdf.Sections(0).OddFooter
Dim text As Aspose.Pdf.Text = CType(Footer.Paragraphs(0), Aspose.Pdf.Text)
Dim seg As Segment = text.Segments(0)
seg.Content = "Confidential - " + seg.Content

Me.oleDbSelectCommand1.CommandText = _
resultReader = Me.oleDbSelectCommand1.ExecuteReader()
Dim ordersNumber As Integer = 0, number As Integer
Dim orderIDs() As Integer = New Integer(2048) {}
While resultReader.Read()
orderIDs(ordersNumber) = Convert.ToInt32(resultReader.GetValue(0))
ordersNumber = ordersNumber + 1
End While


'for(number = 0; number < ordersNumber; number++)

'We generate invoices for the first 100 orders for demo only. If you want to
'generate all invoices,uncomment the line above and comment the line below.

For number = 0 To 10 - 1 Step 1
Me.oleDbSelectCommand1.CommandText = "SELECT * FROM (" + invoiceStr & _
") WHERE ((Orders.OrderID)=" + orderIDs(number).ToString() + ")"
resultReader = Me.oleDbSelectCommand1.ExecuteReader()
PutOrder(pdf, resultReader)

Return pdf



Thank you for considering Aspose.

Aspose.Pdf used strong name but it seems that is not allowed in your server. Please set your server permission to allow strong name. I will ask our web master to give some advice.



I have never experienced this problem myself have I have found several web pages that make reference to it. The page located at suggests that you may be trying to run your web application under Asp.Net 1.0 instead of 1.1 or 2.0. To remedy this please visit for instructions.


My web application was running under Asp.Net 1.0 . I have updated it to 1.1.

Now pdf report is working .

Thanks to all who contributed to my query. It is really appreciated. I was deeply in trouble.

Thanks Again.