Error on PDF Viewer

@ithead

Unfortunately, we do not provide support over phone calls or screen share.

Ok Let me generate issue in separate code and will send

@ithead

Ok, looking forward for the code sample.

image.png (204.5 KB)

Here is code for getting page info.

@ithead

Right, it seems that this method returns more pages than the method that retrieves actual pages.

I have checked by debugging the code, it retrieves the actuall no of pages within pdf

@ithead

Can you please also check how many pages GetPages method returns?

if in pdf 33 then its gives 33

@ithead

In case GetPages and GetDocumentInfo return the same number of the pages than the code should not fail. Can you please double check?

Means while I double check with that, can you help me idenifying the following issue.

When I am trying to use GroupDocs.Viewer from localhost(Development Environment) it works fine with no error, but when I use from the external URL https://dms.esecurus.co.in:8443/ it comes with message on each page ( image.png (9.9 KB)

@ithead

It is highly likely that the issue is related to the server configuration. One of the possible reasons - GroupDocs.Viewer uses cryptographical algorithms which are not FIPS-compliant when FIPS is enabled in machine settings.

To make sure that FIPS is enabled you can:

  • Check the registry key HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Lsa\fipsalgorithmpolicy and value should be set to 1.
  • Check Local Security Policy: (Start → Run → secpol.msc) and then go to “Security Settings → Local Policies → Security Options” on the right side find “System cryptography: Use FIPS compliant algorithms for encryption, hashing, and signing” security should be enabled.

I have tried both and i found 1st ( HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Lsa\fipsalgorithmpolicy) but when i was looking for 2nd which i did not find because of rights restriction and error is still same after 1st setting as well.

@ithead

Can you please confirm that HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Lsa\fipsalgorithmpolicy is set to 1?

Please check the value in attached screenshot

image.png (56.3 KB)

@ithead

Thank you for attaching the screenshot. There are a couple of options here

  • In case you don’t need FIPS you can disable it from the registry (change value from 1 to 0) or change mentioned Local Security Policy from enabled to disabled see screenshot;
  • When you want to disable FIPS for ASP.NET applications hosted on IIS you can do it by using a separate Application Pool with a specific config file:
    • Create an Application Pool with the name DisableFipsAppPool
    • Update your application to use DisableFipsAppPool Application Pool
    • Create config file e.g. “c:\inetpub\config\disable_fips_web.config” with following content
    <configuration>
       <runtime>
          <enforceFIPSPolicy enabled="false" />
       </runtime>
    </configuration>
    
    • Grant read permissions icacls c:\inetpub\config\disable_fips_web.config /grant "IIS APPPOOL\DisableFipsAppPool":(R)
    • Configure the App Pool to load created config file %windir%\System32\inetsrv\appcmd.exe set config -section:system.applicationHost/applicationPools /[name='DisableFipsAppPool'].CLRConfigFile:"c:\inetpub\config\disable_fips_web.config" /commit:apphost
    • Restart IIS iisreset

NOTE: all commands should be executed as Administrator

I am gettting following error after all the above setting

image.png (249.6 KB)

@ithead

Thank you for attaching the screenshot with the error. Please check this SO question and this answer and let us know if it works at your side.

image.png (93.4 KB)

I have tried the same which you have suggested , please check the Option prefered 32-bit is disable

@ithead

Have you tried Platform Target: “Any CPU” and “Preffer 32-bit”: disabled?

In case this settings won’t work I believe it would be reasonable to update GroupDocs.Viewer in your project to the latest version and use the newer license file.

If i update the version on GroupDocs.Viewew , some of my code start giving error.