Welcome Guest Search | Active Topics | Sign In | Register

Showing Message "The form cannot be displayed in the browser because the use of session cookies Options
Kataria Deepak
Posted: Tuesday, October 15, 2019 1:45:54 AM
Rank: Newbie
Groups: Member

Joined: 10/15/2019
Posts: 8
Hi Team,

I'm receiving the following error while converting SharePoint form to the PDF using EO.PDF library.

"The form cannot be displayed in the browser because
the use of session cookies has been disabled in the
current browser settings. In order to load the form,
session cookies must be allowed."

I also tried with following attempts, but did not found solution.

1. Enabled the session cookie in the browser.

2. Added the httpOnlyCookies tag and set to false in web.config



Thanks in Advance

eo_support
Posted: Tuesday, October 15, 2019 11:23:57 AM
Rank: Administration
Groups: Administration

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

What version of EO.Pdf are you using? And can you PM us with a link that we can try to convert it here to see if we can see the problem?

Thanks!
Kataria Deepak
Posted: Wednesday, October 16, 2019 4:34:17 AM
Rank: Newbie
Groups: Member

Joined: 10/15/2019
Posts: 8
Thanks for your quick response.

I am using Version 4.0.41.2 of EO.PDF. I can not share the Online Form of Share Point
eo_support
Posted: Wednesday, October 16, 2019 10:41:16 AM
Rank: Administration
Groups: Administration

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

This is an extremely old version of EO.Pdf that we no longer support. There can be many issues with this version. For example, this version only supports older version of Windows so you won't be able to use it on newer Windows. It also only supports older version of SSL protocol so it can't connect to web servers that only support newer version of the SSL protocol.

You can try to update to the current version of EO.Pdf and see if it resolves the problem for you. If the problem persists, we will need you to provide a test Url for us to investigate further.

Thanks!
Kataria Deepak
Posted: Thursday, October 17, 2019 1:09:02 AM
Rank: Newbie
Groups: Member

Joined: 10/15/2019
Posts: 8
Thanks again.

I have upgraded the EO.PDF to 19.0 version. Now, I am getting below error

Error
There has been an error while loading the form.
Click Try again to attempt to load the form again. If this error persists,
contact the support team for the Web site.
Click Close to exit this message.
SHOW ERROR DETAILS

System.UnauthorizedAccessException: Access is denied message shown in the ULS Viewer Log as below

[Forced due to logging gap, cached @ 10/17/2019 00:04:09.35, Original Level: VerboseEx] Failed to parse cookie value.
[Forced due to logging gap, Original Level: Verbose] Looking up {0} site {1} in the farm {2}
Token Cache: Failed to get token from distributed cache for '0).w|s-1-5-17'.(This is expected during the process warm up or if data cache Initialization is getting done by some other thread).
System.UnauthorizedAccessException: Access is denied. (Exception from HRESULT: 0x80070005 (E_ACCESSDENIED)),


I am passing the cookies
Code: C#
for (int i = 0; i < Request.Cookies.Count; i++)
                    {
                        if (string.IsNullOrEmpty(Request.Cookies[i].Name) || string.IsNullOrEmpty(Request.Cookies[i].Value))
                            continue;

                        HtmlToPdf.Options.Cookies.Add(new System.Net.Cookie(Request.Cookies[i].Name, Request.Cookies[i].Value, Request.Cookies[i].Path, Request.Cookies[i].Domain));
                    }
HtmlToPdf.Options.MinLoadWaitTime = 20000;
                    HtmlToPdf.ConvertUrl(uri, Server.MapPath(Path.Combine("~/PDF/", "" + "_url.pdf")));


Please help me to resolve this issue.

Thanks
eo_support
Posted: Thursday, October 17, 2019 8:37:06 AM
Rank: Administration
Groups: Administration

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

Please try to get the full stack trace of the UnauthorizedAccessException you received. That should point to where the unauthorized access occurs. We can then go from there.

Thanks!
Kataria Deepak
Posted: Thursday, October 17, 2019 1:11:41 PM
Rank: Newbie
Groups: Member

Joined: 10/15/2019
Posts: 8
Please check the complete stack

System.UnauthorizedAccessException: Access is denied. (Exception from HRESULT: 0x80070005 (E_ACCESSDENIED)), StackTrace: at Microsoft.SharePoint.SPFile.GetFileStream(SPWeb web, String fileUrl, Boolean honorLevel, SPFileLevel level, OpenBinaryFlags openOptions, String etagNotMatch, SPFileStreamManager spMgr, SPFileRightsManagementSettings rightsManagementSettings, Boolean throwOnVirusFound, SPVirusCheckStatus& virusCheckStatus, String& virusCheckMessage, String& etagNew, String& contentTagNew, SPFileInfo& fileprops) at Microsoft.SharePoint.SPFile.GetFileStream(OpenBinaryFlags openOptions, String etagNotMatch, String& etagNew, String& contentTagNew) at Microsoft.SharePoint.SPFile.CanOpenFile(Boolean checkCanGetFileSource, String& eTag) at Microsoft.Office.InfoPath.Server.DocumentLifetime.SiteAndWebCache.DoesUserHavePermissionEx(FileRecord fileRecord, PermissionsType permissionType) at Microsoft.Office.InfoPath.Server.DocumentLifetime.SiteAndWebCache.TryGetFileFastWithPermissionCheck(String absoluteLocation, FileRecord& fileRecord) at Microsoft.Office.InfoPath.Server.DocumentLifetime.SiteAndWebCache.EnsureFileAndCheckAcl(String absoluteLocation, FileAccessStatus& fileAccessStatus) at Microsoft.Office.InfoPath.Server.DocumentLifetime.SiteAndWebCache.EnsureFileAndCheckAcl(String absoluteLocation, String originalLocation, Ids cantAccessMessage, Ids cantFindMessage, InfoPathException& error) at Microsoft.Office.InfoPath.Server.DocumentLifetime.FormInvocation.TryCreateDocumentMetaInformation(SPSite contextSite, String xmlLocation, DocumentMetaInformation& metaInformation, InfoPathException& error) at Microsoft.Office.InfoPath.Server.DocumentLifetime.FormInvocation.TryFetchMetaInformation(SPSite contextSite, String xmlLocation, String xsnLocation, String saveLocation, InfoPathXmlDocument document, DocumentMetaInformation& documentMetaInformation, SolutionMetaInformation& solutionMetaInformation, String& absoluteSolutionLocation, InfoPathException& error, Boolean& isClientOnlyCrossServer) at Microsoft.Office.InfoPath.Server.Controls.FormServerPage.NewEditingSession(SPSite contextSite, FormServerPageQueryParameters queryParameters, Boolean isFormServerProperlyConfigured, Boolean& renderSessionsStateError) at Microsoft.Office.InfoPath.Server.Controls.XmlFormView.StartNewEditingSession() at Microsoft.Office.InfoPath.Server.Controls.XmlFormView.EnsureDocument(EventLogStart eventLogStart) at Microsoft.Office.InfoPath.Server.Controls.XmlFormView.<>c__DisplayClass8.<LoadDocumentAndPlayEventLog>b__5() at Microsoft.Office.Server.Diagnostics.FirstChanceHandler.ExceptionFilter(Boolean fRethrowException, TryBlock tryBlock, FilterBlock filter, CatchBlock catchBlock, FinallyBlock finallyBlock) at Microsoft.Office.InfoPath.Server.DocumentLifetime.ErrorPageRenderer.RunAndGetErrorRendererOnException(HttpContext context, EventLogStart eventLogStart, TryBlock tryblock, CatchBlock catchblock) at Microsoft.Office.InfoPath.Server.Controls.XmlFormView.LoadDocumentAndPlayEventLog() at Microsoft.Office.InfoPath.Server.Controls.XmlFormView.OnDataBindHelper() at Microsoft.Office.InfoPath.Server.Controls.XmlFormView.OnDataBinding(EventArgs e) at System.Web.UI.WebControls.WebParts.Part.DataBind() at Microsoft.Office.InfoPath.Server.Controls.FormServerPage.Initialize() at Microsoft.Office.InfoPath.Server.Controls.FormServerPage.OnInit(EventArgs e) at System.Web.UI.Control.InitRecursive(Control namingContainer) 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.ProcessRequest(HttpContext context) at Microsoft.Office.InfoPath.Server.Controls.FormServerPage.ProcessRequest(HttpContext context) at ASP._layouts_15_formserver_aspx.ProcessRequest(HttpContext context) at System.Web.HttpApplication.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() at System.Web.HttpApplication.ExecuteStepImpl(IExecutionStep step) at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) at System.Web.HttpApplication.PipelineStepManager.ResumeSteps(Exception error) at System.Web.HttpApplication.BeginProcessRequestNotification(HttpContext context, AsyncCallback cb) at System.Web.HttpRuntime.ProcessRequestNotificationPrivate(IIS7WorkerRequest wr, HttpContext context) at System.Web.Hosting.PipelineRuntime.ProcessRequestNotificationHelper(IntPtr rootedObjectsPointer, IntPtr nativeRequestContext, IntPtr moduleData, Int32 flags) at System.Web.Hosting.PipelineRuntime.ProcessRequestNotification(IntPtr rootedObjectsPointer, IntPtr nativeRequestContext, IntPtr moduleData, Int32 flags) at System.Web.Hosting.UnsafeIISMethods.MgdIndicateCompletion(IntPtr pHandler, RequestNotificationStatus& notificationStatus) at System.Web.Hosting.UnsafeIISMethods.MgdIndicateCompletion(IntPtr pHandler, RequestNotificationStatus& notificationStatus) at System.Web.Hosting.PipelineRuntime.ProcessRequestNotificationHelper(IntPtr rootedObjectsPointer, IntPtr nativeRequestContext, IntPtr moduleData, Int32 flags) at System.Web.Hosting.PipelineRuntime.ProcessRequestNotification(IntPtr rootedObjectsPointer, IntPtr nativeRequestContext, IntPtr moduleData, Int32 flags)

Thanks
eo_support
Posted: Thursday, October 17, 2019 2:42:57 PM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,067
The particular stack trace does not show any of our code at all. You will have to trace it back to our code in order for us to look into it. Please see if you have any other exceptions that can trace back to our code.
Kataria Deepak
Posted: Friday, October 18, 2019 4:53:40 AM
Rank: Newbie
Groups: Member

Joined: 10/15/2019
Posts: 8
Hi

Followings were initiated when Call the HtmlToPdf.ConvertUrl(uri, Server.MapPath(Path.Combine("~/PDF/", "" + "_url.pdf")));

10/17/2019 10:53:39.41 w3wp.exe (0x36E8) 0x77A8 SharePoint Foundation Logging Correlation Data xmnv Medium Name=Request (GET:http://sample-dev02:2222/_layouts/15/FormServer.aspx?XmlLocation=/HC/HHR_EC_013.xml&ClientInstalled=false&DefaultItemOpen=1&Source=http://sample-DEV02:2222/HC/Forms/AllItems.aspx) 07cd0e9f-4b7d-e0f1-fad3-016da8b5eb91

10/17/2019 10:53:39.41 w3wp.exe (0x36E8) 0x77A8 SharePoint Foundation Micro Trace uls4 Medium Micro Trace Tags: 0 nasq 07cd0e9f-4b7d-e0f1-fad3-016da8b5eb91

10/17/2019 10:53:39.41 w3wp.exe (0x36E8) 0x77A8 SharePoint Foundation Monitoring b4ly Medium Leaving Monitored Scope (Request (GET:http://sample-dev02:2222/_layouts/15/FormServer.aspx?XmlLocation=/HC/HHR_EC_013.xml&ClientInstalled=false&DefaultItemOpen=1&Source=http://sample-DEV02:2222/HC/Forms/AllItems.aspx)). Execution Time=0.8891 07cd0e9f-4b7d-e0f1-fad3-016da8b5eb91

10/17/2019 10:53:39.41 w3wp.exe (0x36E8) 0x5DC4 SharePoint Foundation Logging Correlation Data xmnv Medium Name=Request (GET:http://sample-dev02:2222/_layouts/15/FormServer.aspx?XmlLocation=/HC/HHR_EC_013.xml&ClientInstalled=false&DefaultItemOpen=1&Source=http://sample-DEV02:2222/HC/Forms/AllItems.aspx) 07cd0e9f-6b7d-e0f1-fad3-0040c0887a48

10/17/2019 10:53:39.45 w3wp.exe (0x36E8) 0x5DC4 SharePoint Foundation DistributedCache air4a Monitorable Token Cache: Failed to get token from distributed cache for '0).w|s-1-5-17'.(This is expected during the process warm up or if data cache Initialization is getting done by some other thread). 07cd0e9f-6b7d-e0f1-fad3-0040c0887a48

10/17/2019 10:53:39.45 w3wp.exe (0x36E8) 0x5DC4 SharePoint Foundation DistributedCache air4b Monitorable Token Cache: Reverting to local cache to get the token for '0).w|s-1-5-17'. 07cd0e9f-6b7d-e0f1-fad3-0040c0887a48

10/17/2019 10:53:39.45 w3wp.exe (0x36E8) 0x5DC4 SharePoint Foundation Authentication Authorization agb9s Medium Non-OAuth request. IsAuthenticated=True, UserIdentityName=0#.w|nt authority\iusr, ClaimsCount=17 07cd0e9f-6b7d-e0f1-fad3-0040c0887a48

10/17/2019 10:53:39.45 w3wp.exe (0x36E8) 0x5DC4 SharePoint Foundation Runtime ajd6n Medium cookie is System.Web.HttpCookie added. 07cd0e9f-6b7d-e0f1-fad3-0040c0887a48

10/17/2019 10:53:39.45 w3wp.exe (0x36E8) 0x5DC4 SharePoint Foundation Logging Correlation Data xmnv Medium Site=/ 07cd0e9f-6b7d-e0f1-fad3-0040c0887a48

10/17/2019 10:53:39.74 w3wp.exe (0x36E8) 0x5DC4 SharePoint Foundation Database ahjqp High [Forced due to logging gap, cached @ 10/17/2019 10:53:39.45, Original Level: Verbose] SQL connection time: 0.0659 for Data Source=sample-DEV02;Initial Catalog=WSS_Content_2222;Integrated Security=True;Persist Security Info=False;Enlist=False;Pooling=True;Min Pool Size=0;Max Pool Size=100;PoolBlockingPeriod=Auto;Asynchronous Processing=False;Connection Reset=True;MultipleActiveResultSets=False;Replication=False;Connect Timeout=15;Encrypt=False;TrustServerCertificate=False;Load Balance Timeout=0;Packet Size=8000;Type System Version=Latest;Application Name=".Net SqlClient Data Provider";User Instance=False;Context Connection=False;Transaction Binding="Implicit Unbind";ApplicationIntent=ReadWrite;MultiSubnetFailover=False;TransparentNetworkIPResolution=True;ConnectRetryCount=1;ConnectRetryInterval=10;Column Encryption Setting=Disabled 07cd0e9f-6b7d-e0f1-fad3-0040c0887a48

10/17/2019 10:53:39.74 w3wp.exe (0x36E8) 0x5DC4 SharePoint Foundation Database 8acb High [Forced due to logging gap, Original Level: VerboseEx] Reverting to process identity 07cd0e9f-6b7d-e0f1-fad3-0040c0887a48

10/17/2019 10:53:39.82 w3wp.exe (0x36E8) 0x5DC4 SharePoint Foundation Files aise3 Medium Failure when fetching document. 0x80070005 07cd0e9f-6b7d-e0f1-fad3-0040c0887a48

10/17/2019 10:53:39.82 w3wp.exe (0x36E8) 0x5DC4 SharePoint Foundation General 8e2s Medium Unknown SPRequest error occurred. More information: 0x80070005 07cd0e9f-6b7d-e0f1-fad3-0040c0887a48

10/17/2019 10:53:39.90 w3wp.exe (0x36E8) 0x5DC4 SharePoint Foundation Database ahjqp High [Forced due to logging gap, cached @ 10/17/2019 10:53:39.75, Original Level: Verbose] SQL connection time: 0.0447 for Data Source=sample-DEV02;Initial Catalog=WSS_Content_2222;Integrated Security=True;Persist Security Info=False;Enlist=False;Pooling=True;Min Pool Size=0;Max Pool Size=100;PoolBlockingPeriod=Auto;Asynchronous Processing=False;Connection Reset=True;MultipleActiveResultSets=False;Replication=False;Connect Timeout=15;Encrypt=False;TrustServerCertificate=False;Load Balance Timeout=0;Packet Size=8000;Type System Version=Latest;Application Name=".Net SqlClient Data Provider";User Instance=False;Context Connection=False;Transaction Binding="Implicit Unbind";ApplicationIntent=ReadWrite;MultiSubnetFailover=False;TransparentNetworkIPResolution=True;ConnectRetryCount=1;ConnectRetryInterval=10;Column Encryption Setting=Disabled 07cd0e9f-6b7d-e0f1-fad3-0040c0887a48

10/17/2019 10:53:39.90 w3wp.exe (0x36E8) 0x5DC4 SharePoint Foundation General aix9j High SPRequest.GetFileAsStream: UserPrincipalName=i:0).w|s-1-5-17, AppPrincipalName= ,bstrUrl=http://sample-dev02:2222 ,bstrWebRelativeUrl=HC/HHR_EC_013.xml ,bHonorLevel=False ,iLevel=1 ,grfob=24 ,bstrEtagNotMatch=<null> ,punkSPFileMgr=<null> ,bHonorCustomIrm=False 07cd0e9f-6b7d-e0f1-fad3-0040c0887a48

10/17/2019 10:53:39.90 w3wp.exe (0x36E8) 0x5DC4 SharePoint Foundation General ai1wu Medium System.UnauthorizedAccessException: Access is denied. (Exception from HRESULT: 0x80070005 (E_ACCESSDENIED))


Thanks


eo_support
Posted: Friday, October 18, 2019 12:48:19 PM
Rank: Administration
Groups: Administration

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

This is something you have to work out yourself similar to your other issue here:

https://www.essentialobjects.com/forum/postsm48484_Unauthorized-Access-401-Error.aspx#48484

Just like that issue, we have no way of telling you why your web server would give you 401 error. We have no way of telling you why your web server is giving you this error either, nor that we can tell you why a specific resource is being requested. Neither your previous stack trace nor this log indicates anything directly related to our product. As a result, we are NOT in a position to debug such issues for you. You will have to debug it yourself. The most we can do is to point you to debug features/tools like we did with your other issue.

Thanks!
Kataria Deepak
Posted: Monday, October 21, 2019 1:09:12 AM
Rank: Newbie
Groups: Member

Joined: 10/15/2019
Posts: 8
eo_support wrote:
Hi,

This is an extremely old version of EO.Pdf that we no longer support. There can be many issues with this version. For example, this version only supports older version of Windows so you won't be able to use it on newer Windows. It also only supports older version of SSL protocol so it can't connect to web servers that only support newer version of the SSL protocol.

You can try to update to the current version of EO.Pdf and see if it resolves the problem for you. If the problem persists, we will need you to provide a test Url for us to investigate further.

Thanks!


Please close this thread as per above solution.

Thanks for your Great Support.





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.