Received : 2007/12/19 10:37:09
Hi, We are encountering error while using ASPOSE.PDF. the detail;s are as below.
The problem is that it is giving unauthorized error when a sharepoint url or any content in sharepoint is referred directly as url. The below code is giving error. If this is solved, then we can generate PDF directly.
Points to note are that the account which is trying to access the url has access to sharepoint. Also, we have tried different kinds of impersonation.
Pdf objPdf = new Pdf();
License li = new License();
li.SetLicense("Aspose.Total.lic");
string url = "http://blrkec56945d:1112/sites/DSR3/PublishingImages/Forms/AllItems.aspx"; objPdf.BindHTMLFromUrl(url);
We are getting the below error message in event log. See if you can contact ASPOSE product/support team to resolve this issue.
-----------------------------------------------------------------------------------
Event code: 3005
Event message: An unhandled exception has occurred.
Event time: 12/18/2007 4:55:26 PM
Event time (UTC): 12/18/2007 11:25:26 AM Event ID: 2daf81b0a2054b1293228d18b54e6769 Event sequence: 10 Event occurrence: 3 Event detail code: 0
Application information:
Application domain: 9da74934-6-128424500846332651
Trust level: Full
Application Virtual Path: /TempSite
Application Path: E:\Temp\TempSite\
Machine name: BLRKEC56945D
Process information:
Process ID: 240
Process name: WebDev.WebServer.EXE
Account name: BLRKEC56945D\blrkec56945dadm
Exception information:
Exception type: WebException
Exception message: The remote server returned an error: (401) Unauthorized.
Request information:
Request URL: http://localhost:3740/TempSite/Default2.aspx Request path: /TempSite/Default2.aspx
User host address: 127.0.0.1
User: BLRKEC56945D\blrkec56945dadm
Is authenticated: True
Authentication Type: NTLM
Thread account name: BLRKEC56945D\blrkec56945dadm
Thread information:
Thread ID: 4
Thread account name: BLRKEC56945D\blrkec56945dadm
Is impersonating: False
Stack trace: at System.Net.WebClient.DownloadDataInternal(Uri address, WebRequest& request)
at System.Net.WebClient.DownloadData(Uri address)
at System.Net.WebClient.DownloadData(String address)
at Aspose.Pdf.Pdf.BindHTMLFromUrl(String url)
at Default2.Page_Load(Object sender, EventArgs e) in e:\Temp\TempSite\Default2.aspx.cs:line 25
at System.Web.Util.CalliHelper.EventArgFunctionCaller(IntPtr fp, Object o, Object t, EventArgs e)
at System.Web.Util.CalliEventHandlerDelegateProxy.Callback(Object sender, EventArgs e)
at System.Web.UI.Control.OnLoad(EventArgs e)
at System.Web.UI.Control.LoadRecursive()
at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
Custom event details:
For more information, see Help and Support Center at. etc.
Please advice us on how to solve this.
This message was posted using Aspose.Live 2 Forum