Professional OPC
Development Tools

logos

Error with OPC.NET

More
04 Sep 2016 11:48 #4322 by khanhcn03
Replied by khanhcn03 on topic Error with OPC.NET

support wrote: In order to deploy the License Manager, you need just its EXE. It will, however, come up with an empty list of products, and therefore you won't be able to install the license. This can be fixed using a registry settings (which is unfortunately missing from the documentation), or - in fact - as you are a licensed user, we can send you a document that explains how to install the license without the License Manager altogether. Let me know if you are interested.
...


Yes, I need it. Please send me the documents to my registered email. Or you want somethings to prove my license, I will provide it.

Please Log in or Create an account to join the conversation.

More
31 Aug 2016 16:46 #4318 by support
Replied by support on topic Error with OPC.NET
In order to deploy the License Manager, you need just its EXE. It will, however, come up with an empty list of products, and therefore you won't be able to install the license. This can be fixed using a registry settings (which is unfortunately missing from the documentation), or - in fact - as you are a licensed user, we can send you a document that explains how to install the license without the License Manager altogether. Let me know if you are interested.

The problem with the GAC is that we are embedding some assemblies inside our own assemblies, in order to reduce the number of assemblies the user sees. Unfortunately, when an assembly with the same name is already in the GAC, .NET will always tried to load it first, and it can be a wrong file. This can be prevented by versioning them properly, and we are doing that correctly with assemblies that *we* create; but this particular one is not ours - it is a library that we have purchased and need it within the product, and it always has the same version number unfortunately.

This is one of the reasons why it says in the documentation and in the installer, something like "Installing the assemblies into the GAC is neither needed nor recommended".

Best regards

Please Log in or Create an account to join the conversation.

More
31 Aug 2016 07:19 #4316 by khanhcn03
Replied by khanhcn03 on topic Error with OPC.NET
Right after buying the license, I read somethings about deployment. I tried to copy LicenseManager.exe to the deployed computer, but it dit not worked. After that, I ran QuickOPC installer and crashed!

I have not any reason to install quickopc dlls to GAC, but, you should pay me somethings for this bug ^^ (just a joke).

You should make LicenseManager.exe can standalone, to easily deploy to any computer.

Best regards,
Khanh

Please Log in or Create an account to join the conversation.

More
31 Aug 2016 06:30 #4315 by support
Replied by support on topic Error with OPC.NET
Thank you.

I will check what is happening - it is likely that it has to do with the GAC installation. Actually, we do not recommend installing our assemblies into the GAC - do you have a reason for that?

Best regards

Please Log in or Create an account to join the conversation.

More
31 Aug 2016 06:22 - 31 Aug 2016 06:25 #4314 by khanhcn03
Replied by khanhcn03 on topic Error with OPC.NET
Hello,

1. Aren't you installing the assemblies into the Global Assembly Cache (GAC)? If so, that may at least give me some clue about where to look.
>>> Yes. I check on Assemblies in installer, and almost options about component & dll, except examples, demos, helps,...

2. Can you explain what you mean by "After developing, I deploy using the same asm from Nuget ..."? Normally, NuGet should be used just during the development and build process. The deployment is then done by taking all assemblies from the project output directory (including those that came from NuGet), and copying them to the target.
>>> I mean, I still used the output dll from Nuget package instead of from installed dll from QuickOPC suite, and copied it to target. The problem is every programs exept the webservice run well. But after removing QuickOPC installation, the webservice runs again.

FYI,
Thank you
Last edit: 31 Aug 2016 06:25 by khanhcn03.

Please Log in or Create an account to join the conversation.

More
31 Aug 2016 05:37 #4313 by support
Replied by support on topic Error with OPC.NET
That you. That's weird. In fact, the assemblies from NuGet and from the standalone installer are/should be identical, provided that the version and build numbers are identical.

Furthermore, NuGet should be installing just a copy of the assemblies into your project, whereas the standalone installer into various directories under "Program Files" - but there should be no overlap and therefore no influence.

I will try to reproduce the issue, now when you have described the details.

Some additional questions:

1. Aren't you installing the assemblies into the Global Assembly Cache (GAC)? If so, that may at least give me some clue about where to look.

2. Can you explain what you mean by "After developing, I deploy using the same asm from Nuget ..."? Normally, NuGet should be used just during the development and build process. The deployment is then done by taking all assemblies from the project output directory (including those that came from NuGet), and copying them to the target.

Thank you

Please Log in or Create an account to join the conversation.

More
31 Aug 2016 01:44 #4312 by khanhcn03
Replied by khanhcn03 on topic Error with OPC.NET
Hello,

I found the problem.
I use every assemblies from Nuget. After developing, I deploy using the same asm from Nuget and everything run well.
But I install QuickOPC suite on the deployed computuer to get License Manager Utility, the webservice crashes with the error I provided.
Then, I try to remove OPC suite, webservice run again.
What different from Nuget asm and OPC suite asm?

Please Log in or Create an account to join the conversation.

More
31 Aug 2016 01:16 #4311 by khanhcn03
Replied by khanhcn03 on topic Error with OPC.NET
Hello,
I answer your questions one by one as following:

1. Had the project worked earlier? If so, what has changed since?
>>> Yes, it had worked. In development, I used assemblies from Nuget, and deployed it to the same enviroment. After buying license, I installed QuickOPC-5.401.exe from your website to get License Manager Utility, and it had not worked any more.
2. Does it happen always with this project&computer, or just sometimes?
>>> Just only that project (run as WebService) on only that computer, other projects run well. We deploy all projects on only one computer with OPC Server installed.
3. Does the problem only on one computer, or more?
>>> We have only one deployed server
4. Is it a Web service project? If so, are you running it under the built-in Visual Studio server, or under IIS, or how?
>>> Yes. And we run under IIS
5. What about other (OPC DA) projects, for example the Demo Application, or the projects in our Examples solution in C# or VB.NET - do they run well, or do they show the same problem?
>>> I don't test demo apps and examples from your installed solution. But, others project, such as winform and win console run well.
6. Which version of Visual Studio you use to build the project?
>>> VS 2015
7. Is it 64-bit or 32-bit operating system? If it is 64-bit system, is the hosting process of your project a 64-bit or 32-bit process?
>>> It is 64-bit. I tried to combine: build 64, build 32, build any cpu, and change IIS 32, IIS 64, but the result is the same.
8. Do you compile your project for AnyCPU, x64, or x86?
>>> As began, I build x64 with Nuget Assemblies, it run well. But after installing quickopc suite to get License Manager Utility, it did not run any more. I also tried to build as x86, any cpu, but nothing changes.

If needed, I can give you a remote session through Teamviewer to see what happen.

Please Log in or Create an account to join the conversation.

More
30 Aug 2016 14:27 #4310 by support
Replied by support on topic Error with OPC.NET
Hello,

this is a weird error. We will need more information in order to investigate it. For start, can you please answer the following:

1. Had the project worked earlier? If so, what has changed since?
2. Does it happen always with this project&computer, or just sometimes?
3. Does the problem only on one computer, or more?
4. Is it a Web service project? If so, are you running it under the built-in Visual Studio server, or under IIS, or how?
5. What about other (OPC DA) projects, for example the Demo Application, or the projects in our Examples solution in C# or VB.NET - do they run well, or do they show the same problem?
6. Which version of Visual Studio you use to build the project?
7. Is it 64-bit or 32-bit operating system? If it is 64-bit system, is the hosting process of your project a 64-bit or 32-bit process?
8. Do you compile your project for AnyCPU, x64, or x86?


Thank you very much

Please Log in or Create an account to join the conversation.

More
29 Aug 2016 08:40 #4308 by khanhcn03
Error with OPC.NET was created by khanhcn03
OS: win 7
QuickOPC: 5.40
Licensed!
Error info:
An unhandled exception of type 'System.ServiceModel.FaultException' occurred in mscorlib.dll

Additional information: System.Web.Services.Protocols.SoapException: Server was unable to process request. ---> System.TypeInitializationException: The type initializer for 'OpcLabs.EasyOpc.DataAccess.EasyDAClient' threw an exception. ---> System.IO.FileLoadException: Could not load file or assembly 'BoxedAppSDK.Managed, Version=1.0.0.0, Culture=neutral, PublicKeyToken=84fe779840c3b626' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)

at OpcLabs.BaseLib.Boxing.Boxer.StartSdk()

at OpcLabs.BaseLib.Boxing.Boxer.RequestSdk()

at OpcLabs.BaseLib.Boxing.Boxer.Box()

at OpcLabs.EasyOpc.Boxing.Redistributables.VC140RedistBoxer.Box()

at OpcLabs.EasyOpc.Implementations.Native.Assemblies.LoadRawAssembly(String name)

at OpcLabs.EasyOpc.Implementations.Native.Assemblies.get_EasyOpcClassicRaw()

at OpcLabs.EasyOpc.Implementations.Native.Assemblies.GetRawType(String name)

at OpcLabs.EasyOpc.Implementations.Native.DataAccess.NativeEasyDAClient.get_RawType()

at OpcLabs.EasyOpc.Implementations.Native.DataAccess.NativeEasyDAClient.set_AdaptableParameters(EasyDAAdaptableParameters value)

at OpcLabs.EasyOpc.DataAccess.EasyDAClient..cctor()

--- End of inner exception stack trace ---

at OpcLabs.EasyOpc.DataAccess.EasyDAClient.get_SharedInstance()

at LBCS.Service.QuickOPC.UpdateTagValue(String channel, String device, String tag, Object value) in G:\Projects\PublicLighting\LightBoxControlSystemWebform\LBCS.Service\QuickOPC.asmx.cs:line 90

--- End of inner exception stack trace ---

Please Log in or Create an account to join the conversation.

Moderators: support
Time to create page: 0.205 seconds

      

 Recommend this on Google