Problem running GroupDocs.net viewer in PHP environment

Setup: Windows Server 2008R2, 64 bit
IIS7
XAMPP
Both IIS7 and Apache server (via XAMPP) are successfully running at the same time.
Bespoke application url:
dummy.local:8080
We’ve build a bespoke content management system in PHP that our internal users can browse to on the above url
Been using guidelines in this link : groupdocs.com/docs/display/viewernet/How+to+Integrate+GroupDocs’+Document+Viewer+for+.NET+into+Your+CMS
When I run my code, an error message is displayed on the page: “Please change “Use Http Handlers” option in edit block form”.
I have tried checking and unchecking the handlers checkbox on my html form but neither works. I am not supplying a path to my file as I understand that I only need to provide the server url that the groupdocs .net viewer resides on.
Please help. I’ve attached a copy of both my html and php code

Hello,


Thank you for your request. First of all on your screenshot we can see that you have only installed the library and you don’t have an application (Viewer web app). You should create your own .NET application which will host the Viewer or use one of our examples and then use it’s URLs in the PHP web page.

This article will suit you more, also in this article you will find links for how to run the .NET Viewer side.

Best regards.


Thanks Pavel but when I’ve tried to run the Default.aspx file in the GroupDocs.Viewer.WebForms.Sample folder I get the attached error message.



That file is not available from the downloads folder.

Thanks Pavel but when I’ve tried to run the Default.aspx file in the GroupDocs.Viewer.WebForms.Sample folder I get the attached error message.



That file is not available from the downloads folder

Hello ,

Thank you for your inquiry.

In folder with WebForms sample you will find GroupDocs.Viewer.WebForms.Sample.csproj file and you will be need to open it in VisualStudion (VS). The VS will load full web project and you will see this . Farther you will be need to build this project using this window and if you not get any errors in output console, then you can run and debug the project using this button. After making all operations you can open your application in browser or the VS will automatically open new web page in it.

Note: you can check the url on which was ran your app here .

If you will have more questions please feel free to contact us.

--------

Best regards,
Evgen Efimov

http://groupdocs.com
Your Document Collaboration APIs
Follow us on LinkedIn, Twitter, Facebook and Google+

Evgen, thank you very much for your response. Was very clear and helpful. However, I do get an error once I’ve build the project:



Error 1 The type or namespace name ‘Groupdocs’ could not be found (are you missing a using directive or an assembly reference?) C:\GroupDocs.Viewer_2.16.0-NET-Samples\samples\GroupDocs.Viewer.WebForms.Sample\WebServiceProvidingViewer.asmx.cs 9 7 GroupDocs.Viewer.WebForms.Sample

Hello,


Thank you for the request. First of all make sure that you have such reference in your project, if no you should download the GroupDocs.Viewer library and add it to the project. Then check your .aspx - you should have such code line

Best regards.

Thanks Pavel.
I’ve now got the GroupDocs working in Visual Studio and when I run it in debug mode the url is: http://localhost:2222/Default.aspx.
I’m still not sure how to get this working with my PHP app though.
I’m using the article you previously referenced (log 9220) but just want to make sure I am following this properly. In my PHP app I’ve created an index.html page which contains the various fields that the user needs to complete (e.g. URL, div sizes, file path, etc.). When the form is submitted it points to my gdViewer.php file - which is essentially what I’ve copied from the article, although I’ve added the necessary variables at the start of the file to store the data input by the user in the index.html file. However, this does not work (regardless of whether or not I tick the header checkbox; I still get the error message “Please change “Use Http Handlers” option in edit block form” because I’m guessing it can’t fine the page.
Note: I am not specifying a file path. I am only filling in the URL and checking or unchecking the tick box. The URL for my php app is:
http://myapp.surby.local:8080/index.html
and the GroupDocs.Viewer for .NET in installed on this same server so the value I am entering into the URL field on my index.html page is http://myapp.surby.local:8080/
I’ve attached my files.
Can you please let me know where I am going wrong as we are really keen to use this software.
Many thanks

Hello,
Thank you for coming back. If I understand you correct the PHP project run under http://myapp.surby.local:8080/ URL and you used the same URL for URL field - it means that your PHP trying to integrate itself. Instead of this you should use http://localhost:2222 URL in the URL field - in this case your PHP project will call the .NET project.
Best regards.

Hi Pavel

Just to add to clarify … we’ve now got “gd.local” active through IIS7.
http://gd.local points to a folder here: c:\gd.local
We are using Visual Studio 2010. Do we publish the GD demo / app to http://gd.local in order to use it? As http://myapp.surby.local:8080/index.html is run through Apache.

Thanks

Hi,

Yes, correct you should publish GD demo to c:\gd.local and call it from your

http://myapp.surby.local:8080/index.html via gd.local URL

Best regards.

Hi Pavel


WE’ve made some internal progress … please see screenshot - we’ve now managed to publish our app (sort of) from visual studio to our localhost.

Please view pav0.jpg for error.

Then we proceeded to manually create /Temp/Processing to our folder structure.

Please see pav2.jpg for file structure

However, it says “File not found” (pav1.jpg) please advise where/ how do we place a e.g. excel spreadsheet, in our file structure?

Thanks!

Hello,


Glad to hear that you have progress. To resolve the issue please double check that in the Viewer application (.NET part) you have set in the Viewer.SetRootStoragePath(); this path: C:\inetpub\wwwroot\fab\testfiles
If C:\inetpub\wwwroot\fab\ is the root of the Viewer application then you can set it in such way:
Viewer.SetRootStoragePath(Server.MapPath("~/testfiles/"));

Also make sure that the user under which you run the solution have read/write access to this folder.

If this will not help you please share with me both applications examples and I will help you to resolve the issue.

Best reagrds.

Thanks Pavel. We modified that file and were able successfully display Group Docs in FireFox. But we have two issues:

1. Although the page loads in IE11, no files are displayed (see the attached image)

2. I am still struggling to get this working (even in Firefox) with my PHP app. Please can you confirm what URL I should be entering into my PHP index page/form. Should I be using 'localhost'? I've tried this but get the usual error message previously referenced.

Hi,


To be able to reproduce and fix the issue I will need examples of your both solutions PHP and .NET. Please share them with me, I will check and fix them for you.

Thank you.

Hi pavel


How do I share them please? Are you able to teamviewer onto our server to do it?

Let me know how is best for you…? Thanks

Hi,


You can zip them and upload to the DropBox, Google Drive or any other cloud storage. Then simply share with me the link via which I can download it.

Thank you.

Hi PAvel


here you go, thanks!

Dropbox - Error - Simplify your life

Hi,


Thank you for the examples. I have fixed them, you can download them here

Best regards.

Pavel,



Many thanks for doing that. I can confirm this is now working and looking good! I do have one question though:



I have a datatable which lists correspondence that has been uploaded to my database. However, when the user clicks the select button to view the document, the Group Docs content is currently loaded on a new page. Ideally, I’d like the content to be loaded in a modal (e.g. Lightbox) form or on the same page (beneath my table). I’ve tried using Jquery/AJAX to do this but it still directs to a new page. Are you able to advise?



Again, many thanks for your help - is much appreciated.