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 : Friday, October 14, 2016 7:37:33 AM(UTC)

hmofaz  
hmofaz

Groups: Registered
Posts: 13


Hello,

We are getting this error while trying to debug an asp.net application with VS2015 and IISExpress.

We are using an x64 machine and OS.

Trying targeting both x86 and x64 getting the same error.

Usually when we are missing a c++ runtime files we copy the correct ones with correct x86 or x64 and its done.

But, i am trying to understand better the source of the problem.

I read that this error code is an error code of any uncatched exception thrown inside a native c++ code.

My question is : is this coming from your code? O/S having an issue with a dll?

I tried using ProcessMonitor to better understand but couldn't understand if i have a missing file here.

How can i pinpoint this problem?

I am attaching entire error message from the browser.

File Attachment(s):
error.txt (3kb) downloaded 281 time(s).


Thanks

Bye

 

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 : Friday, October 14, 2016 8:14:22 AM(UTC)

Hadi  
Hadi

Groups: Manager, Tech Support, Administrators
Posts: 171

Was thanked: 5 time(s) in 5 post(s)

This error generally occurs when either a file or dependency is missing, or when there is an architectural issue with the project targeting the incorrect DLLs.

So the first thing to check is that the Leadtools.dll that you are trying to load in your ASP.NET application actually exists in the correct location. If it indeed does exist, then the next step is to ensure that you have the Microsoft Visual C++ 2010 Redistributable Package for both x86 and x64 installed on the machine. The Leadtools.dll requires these DLLs in order to run properly.

If all of the above exist, then you need to double check that your project CPU and .NET framework match the referenced Leadtools.dll CPU and framework.

Here is how you can check the Details of the Leadtools.dll to ensure that your using the correct DLL:

UserPostedImage

If all of the above are correct and there are no issues, then the issue may be with your IIS Express not enabling 64 bit applications.

In Visual Studio, you need to go into Tools -> Options and then under Projects and Solutions > Web Projects and ensure that 'Use the 64 bit version of IIS Express for web sites and projects' is checked:

UserPostedImage

This should help you resolve the errors that you are seeing but if it doesn't, please let me know!
Hadi Chami
Developer Support Manager
LEAD Technologies, Inc.

LEAD Logo
 
#3 Posted : Sunday, October 16, 2016 6:46:12 AM(UTC)

hmofaz  
hmofaz

Groups: Registered
Posts: 13


Hello,

Here is the leadtools.dll details: leadtools.dll.png

I targeted x86 specially. see :target.png

I have put these 2 files in the same folder leadtools.dll is:
msvcp100.dll.pngmsvcr100.dll.png

Can i use only them instead of c++ 2010 x86 install?
(I read in the leadtools help that these are needed for .net4 version of the dlls)

So, i guess i don't need the x64 iisexpress.

My questions is, can i see the problem in processmonitor somehow?
I would like to be able to identify the problem. i don't like to guess...

Thanks

Bye


 
#4 Posted : Monday, October 17, 2016 10:40:53 AM(UTC)

Hadi  
Hadi

Groups: Manager, Tech Support, Administrators
Posts: 171

Was thanked: 5 time(s) in 5 post(s)

Thanks for your reply. You can indeed redistribute those 2 files (Msvcrp and Msvcr) with your Leadtools.dll and not have to install the 2010 VC++ runtime libraries as it is mentioned in the Files to be included information here:

https://www.leadtools.co...withyourapplication.html

Quote:
LEADTOOLS binaries for .NET 4.0 require the following Microsoft C/C++ Runtime files to be distributed in the application's PATH:

MSVCR100.dll
MSVCP100.dll
NOTE: that the filenames are the same for Win32 and x64. However, the actual binaries are different. For more information about distributing the Microsoft C/C++ runtime files, refer to: http://msdn2.microsoft.c...s/library/ms235291.aspx.


The issue in your case is that you are using IIS Express. When using IIS express, the DLLs that are used are copied to a temporary IIS Express directory such as:

C:\Users\<user_name>\AppData\Local\assembly

When this happens, it doesn't copy over all the dependencies - it only copies over the DLLs that are referenced and used by the application and not the dependencies such as the MSVCR runtime files.

To resolve this, you will either need to install the 2010 VC++ x86 runtime files, or use the full version of IIS and setup a virtual directory since in the full version of IIS the DLLs are not copied to a temp directory.
Hadi Chami
Developer Support Manager
LEAD Technologies, Inc.

LEAD Logo
 
#5 Posted : Tuesday, October 18, 2016 5:15:11 AM(UTC)

hmofaz  
hmofaz

Groups: Registered
Posts: 13


Hello,

I checked my c++ redists installations:
syswow64.png
c++ redists.png

As u can see i have c++ 2010 x86 and x64 installed.

In syswow64 i have the dlls, their version is a bit different than that of the bin folder of the lead 18.x install.

I even tried to replace them with the files from lead 18.x install (bin folder).
Did not work.
Still the same error.

I am even attaching zipped process monitor logs:
File Attachment(s):
Logfile.zip (1,449kb) downloaded 272 time(s).

Maybe it can help.

Thank u for your help,

Bye
 
#6 Posted : Tuesday, October 25, 2016 1:17:08 PM(UTC)

Hadi  
Hadi

Groups: Manager, Tech Support, Administrators
Posts: 171

Was thanked: 5 time(s) in 5 post(s)

Can you double check the IIS Express settings for 'Use the 64 bit version of IIS Express for web sites and projects' to make sure it is not checked, since you are using the 32 bit DLLs.

UserPostedImage

Can you also double check the Configuration Manager settings to ensure that your service project is targetting x86 and not Any CPU?

If none of these changes work, can you try deploying to IIS (non express) and checking the App pool to make sure it is enabled for 32 bit and then see if that works? Otherwise, we will need to be able to reproduce your issue on our side so sending us a small sample application might be necessary.

Thanks,
Hadi Chami
Developer Support Manager
LEAD Technologies, Inc.

LEAD Logo
 
#7 Posted : Sunday, January 15, 2017 4:07:20 AM(UTC)

hmofaz  
hmofaz

Groups: Registered
Posts: 13


Hello,

Ok, i deployed to IIS and it worked.

Then i went back to VS.

Now it worked with IIS Express.

So, only god knows what happened.

Its really annoying u cannot get stack trace for the c++ exception inside the .NET / IIS Express.

Do u guys know anything about that?

In any case, this is closed for me.

Thanks for your help.

Bye
 
#8 Posted : Sunday, January 15, 2017 4:52:45 AM(UTC)

hmofaz  
hmofaz

Groups: Registered
Posts: 13


Hello,
Another piece of data:
When running the VS 2015 as administrator (elevated)
The error is gone.
So something inside your c++ dlls may causing this?
Thanks
bye
 
#9 Posted : Tuesday, January 17, 2017 12:42:55 PM(UTC)

Hadi  
Hadi

Groups: Manager, Tech Support, Administrators
Posts: 171

Was thanked: 5 time(s) in 5 post(s)

Thank you for following up this post and informing us of the resolution.

Regarding the issue you had when running as non-elevated vs. elevated: you have to run Visual studio with administrator privileges in order to deploy to IIS. This is not something inside out DLLs that causes this, this is to prevent non-authorized users from modifying things in IIS.
Hadi Chami
Developer Support Manager
LEAD Technologies, Inc.

LEAD Logo
 
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-2017, Yet Another Forum.NET
This page was generated in 0.355 seconds.