Welcome Guest! To enable all features, please Login or Register.

Notification

Icon
Error

Options
View
Last Go to last post Unread Go to first unread post
#1 Posted : Monday, May 8, 2017 1:23:06 PM(UTC)
Toadfish

Groups: Registered
Posts: 20


I've attempted to follow the following guide: https://www.leadtools.co...toolsservicesoniis7.html
I tried to complete this guide specifically for the Raster REST Service. However, by the end of it, when I attempt to call the Raster.svc/Info service, I get back a 404 response.

I used D:\inetpub\vserver\Leadtools\RESTHost as the location for all necessary files on the server.

In step 2, it says "Copy the Leadtools.Services.* from <LEADTOOLS_INSTALLDIR>\Bin to <LEADTOOLS_INSTALLDIR>\WCFHost\Bin ", however, there are no Rest or service files in my Leadtools install bin directory. I did find these files in the "C:\LEADTOOLS 19\Redist\DotNet4\Win32" folder though. Is that the right location?

For step 4, for the redistributable files, I copied everything from my local machine in C:\LEADTOOLS 19\Redist\DotNet4\Win32 to D:\inetpub\vserver\Leadtools\RESTHost\Bin

In step 5 and 7, it says to make a Raster.svc and Web.config file but I used the files from the following location:
C:\LEADTOOLS 19\Examples\REST\RESTServicesHost\Raster.svc
C:\LEADTOOLS 19\Examples\REST\RESTServicesHost\Web.config

I placed these files in D:\inetpub\vserver\Leadtools\RESTHost.

I then tried to use Postman as well as some code that I wrote to get info on an example picture:
http://server/LEADTOOLSRESTServicesHost/Raster.svc/Info?uri=https://upload.wikimedia.org/wikipedia/en/7/7e/Patrick_Star.png
I get back the following response:
Description: HTTP 404. The resource you are looking for (or one of its dependencies) could have been removed, had its name changed, or is temporarily unavailable. Please review the following URL and make sure that it is spelled correctly.
Requested URL: /LEADTOOLSRESTServicesHost/Raster.svc/Info

I'm not sure how to troubleshoot this issue.
Is there a different guide that I should be following? The one I was looking at was specifically for WCF services and there seems to be outdated and missing info from this guide.
 

Try the latest version of LEADTOOLS for free for 60 days by downloading the evaluation: https://www.leadtools.com/downloads

Wanna join the discussion? Login to your LEADTOOLS Support accountor Register a new forum account.

#2 Posted : Wednesday, May 10, 2017 8:18:52 AM(UTC)

Aaron  
Aaron

Groups: Registered, Tech Support, Administrators
Posts: 71

Was thanked: 4 time(s) in 3 post(s)

Hi,

Unfortunately, the walkthrough that you are following for setting up the REST services is out dated. We no longer ship the LEADTOOLS REST services that the link you are using refers to, which is why you are facing so many issues. We have deprecated these REST services and replaced them with a standalone Visual Studio solution which contains an ASP.NET MVC Web API used by each of our HTML5/JS demos.

The new Visual Studio solution containing the ASP.NET MVC Web API can be found in the latest LEADTOOLS v19 installation here:

<Install Directory>\LEADTOOLS 19\Examples\JS\Documents\Demos\Demos.sln

This new ASP.NET MVC Web API can be hosted on your local IIS as well and we do have a forum post showing you how this would be done:

https://www.leadtools.co...-MVC-as-External-Service

For testing, you could also just run the Demos.sln in Visual Studio and use IIS Express as the demo is setup to run "out-of-the-box" now.

If you have any further questions or concerns, please let us know.
Aaron Brasington
Developer Support Engineer
LEAD Technologies, Inc.

LEAD Logo
 
#3 Posted : Wednesday, May 10, 2017 1:36:40 PM(UTC)
Toadfish

Groups: Registered
Posts: 20


I do not have a <Install Directory>\LEADTOOLS 19\Examples\JS\Documents folder.
The only thing I have in the JS folder that relates to documents is DocumentViewerDemo and there are no files that end in *.sln in the JS directory.

I was able to get the WCF Rest services running however. I used a different site in IIS that was not the "default site".
 
#4 Posted : Wednesday, May 10, 2017 2:29:10 PM(UTC)

Aaron  
Aaron

Groups: Registered, Tech Support, Administrators
Posts: 71

Was thanked: 4 time(s) in 3 post(s)

I am glad to hear to have the service successfully working now. If you do not have the Demos.sln folder then you, more than likely, are not using the latest version of LEADTOOLS 19. If you would like to download the latest version of LEADTOOLS 19, you can find the download link here:

https://www.leadtools.co...in&SrcOrigin=support

As I stated previously, the LEADTOOLS REST services that you are referring to have been deprecated and we do not ship them any more. So, we do not actively maintain these REST services. If you run into any issues with the REST services themselves or any issues where the LEADTOOLS DLLs do not function properly with the REST services then that will be something that we will not be able to get you a solution for. Going forward, we are using the ASP.NET MVC Web API that I mentioned in my previous post. Any changes made to the LEADTOOLS libraries will be in accordance with the ASP.NET MVC Web API and we can not guarantee they will work successfully with the older deprecated REST services.
Aaron Brasington
Developer Support Engineer
LEAD Technologies, Inc.

LEAD Logo
 
#5 Posted : Tuesday, August 29, 2017 2:49:18 PM(UTC)
Toadfish

Groups: Registered
Posts: 20


Instead of making a new topic about a similar problem, I'll use this old topic of mine to ask.

I have the most current LeadtoolsV19 code. I've basically used the code in <Install Directory>\LEADTOOLS 19\Examples\JS\Documents\Demos\Demos.sln.
I then copied, and moved it to a separate directory, stripped it of everything that I didn't need and fixed errors as they came to get it to build. Right now, I only wanted the RasterController.cs inside the solution and I modified the code slightly to fit my usage.

Everything works on my local machine and other dev's machines but as soon as I build and deploy to a web server, I get runtime errors that say:
"Exception message: Could not load file or assembly 'Leadtools.Codecs.Bmp' or one of its dependencies. An attempt was made to load a program with an incorrect format."

All the dlls in my project's bin folder are 32-bit except for the dlls that say Any CPU. In my project properties, I put for all configurations a platform of x86 and Platform target of x86 when I build and deploy. In my IIS settings on the server I Enable 32-bit Applications.

The server I deploy to runs on Windows Server 2012R2 and is a 64-bit OS.

Ideas?
 
#6 Posted : Thursday, August 31, 2017 2:48:43 PM(UTC)

Joe Z  
Joe Z

Groups: Registered, Tech Support, Administrators
Posts: 63

Thanks: 2 times
Was thanked: 4 time(s) in 4 post(s)

Since this application runs correctly on your development machine, this appears to be an issue with your IIS settings. The exception message of "Exception message: Could not load file or assembly 'Leadtools.Codecs.Bmp' or one of its dependencies. An attempt was made to load a program with an incorrect format." usually indicates that the service DLL's are mismatched with your application platform target.

To solve this issue, I would recommend for you to follow the forum posts below which walks you through troubleshooting this exception message.
https://www.leadtools.com/support/forum/posts/t11996-32-bit-vs-64-bit-dll-s----An-attempt-was-made-to-load-a-program-with-an-incorrect-format

If the following recommendations do not resolve the issue, please let me know.

Edited by moderator Saturday, September 2, 2017 11:43:31 AM(UTC)  | Reason: Not specified

Joe Zhan
Developer Support Engineer
LEAD Technologies, Inc.

LEAD Logo
 
#7 Posted : Tuesday, September 5, 2017 1:34:13 PM(UTC)
Toadfish

Groups: Registered
Posts: 20


Ah. After going through that thread, the problem was with the Microsoft Visual C++ 2010 Redistributable Package. The server did not have that installed but all our dev machines did. This solved the issue. Everything seems to be in order. Thank you!
 
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.

Powered by YAF.NET | YAF.NET © 2003-2024, Yet Another Forum.NET
This page was generated in 0.103 seconds.