Prodotti Desktop:


Sviluppo Software:

Convertitore da PDF a Word Clienti

Solid Framework Code Sample

This is a concise sample to help get started with Solid Framework SDK

Using the Solid Framework ASP.NET Sample

Using Solid Framework directly within an ASP.NET process can be troublesome:

  • Concurrent requests under ASP.NET can occur within the same process (a single process can host multiple AppDomains). Solid Framework is not compatible with AppDomain process/thread behaviour.
  • Document reconstruction is resource intensive (CPU and memory): too many concurrent requests can easily exhaust server resources.
  • IIS user permissions (to save files locally or execute non-managed code) change with each IIS update. In contrast, permissions to make web service requests from ASP.NET are well understood and trivial to configure.

Solid Framework's Job Processor is an elegant architectural solution to all these issues. It can be run as a Windows service and communicate with ASP.NET through WCF. The Job Processor runs concurrent conversions under parallel worker processes (not threads) and manages load in a highly configurable way. The number of worker processes is automatically determined based on the capacity of the server but can also be manually configured. Conversion jobs are automatically queued by the Job Processor for the next available worker process.

Your ASP.NET app on the web server calls the Job Processor (as a web service) to transfer files, submit jobs for processing and return results. The flow is as follows:

This sample includes source code for a reference implementation of a Windows Service that runs the Solid Framework Job Processor as a web service. It also includes a simple example of an ASP.NET web app that uses this conversion service.

Using the Solid Framework ASP.NET Sample

Click to play Code Walk Through Video

Steps for Using ASP.NET Sample with Visual Studio 2013

  1. Download the ASP.Net Sample from here.
  2. Navigate to where you have saved the sample and open the JobProcessorService.sln project.
  3. Open JobProcessorService.cs, on line 47 set your license code here and update the Solid Framework reference.
  4. Create 2 folders: one for where uploaded pdf files go and the second for converted files to be placed. Update lines 27 and 29 in JobProcessorService.cs to match these locations.
  5. Go to WinServiceJobProcessorHost project in the Solution Explorer, right click and click on Rebuild.
  6. Open up two command windows BOTH as Administrator.
  7. In the first command window type cd c:\Windows\Microsoft.NET\Framework\"Your version of .net" then press Enter.
  8. Then type InstallUtil and press Enter.
  9. In the second command window navigate to folder where your sample JobProcessorService.sln is saved. Then navigate further in that tree to \WinServicesJobProcessorHost\bin\Debug and press Enter.
  10. Now type c:\Windows\Microsoft.NET\Framework\"Your version of .net"\installutil /i WinServiceJobProcessorHost.exe then press enter.
  11. Go to My computer, Right Click and choose Manage.
  12. Go to Services and Applications > Services. Find JobProccessorWindowsService and make sure it has started.
  13. Go back to the visual studio project find PDFtoWordWeb in the Solution Explorer, right click and select Set as Start up Project.
  14. Then go to the Service Reference folder, right click on JobProcessorServiceReference and choose Update Service Reference.
    NOTE: If you get an error asking for missing reference Reference.cs
    • Delete the JobProcessorServiceReference you’ve just updated.
    • Right click on Service Reference and Add Service Reference
    • Set the address to the relevant local host for your server
    • Change the Namespace to JobProcessorServiceReference
    • Click OK
  15. Right click on PDFtoWordWeb and choose Rebuild.
  16. Hit F5 to run the project.

We understand this is a complex example so if you require assistance please contact us at . Please include the version of Windows, IIS, Visual Studio and Solid Framework in use.


Mappa del sito
©2000-2018 Solid Documents Limited - Tutti i Diritti Riservati