LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Labview project can't find lvproj.confg file

Solved!
Go to solution

Hi! I'm working on a LabVIEW application which has some .NET dependencies. It should communicate via HTTPS connection with another server, but the version of the .NET Framework doesn't support TLS 1.2 protocol by default, so I have added a configuration file to manipulate the .Net framework behavior: 


<?xml version ="1.0" encoding="utf-8" ?>
<configuration>
<runtime>
<AppContextSwitchOverrides value="Switch.System.Net.DontEnableSystemDefaultTlsVersions=false"/>
</runtime>
</configuration>


My LabVIEW project name is Trados Autmation.lvproj so I named the config to Trados Automation.lvproj.config and placed them in the same folder. I did this process with the execution file too: tat.exe and tat.exe.config. The interesting part is that this solution works with the execution file, but doesn't work with the lvproj file. It seems to not recognize this config. May I miss something? Or what is the reason why it works this way, and another way not? 

0 Kudos
Message 1 of 9
(1,486 Views)

Could you explain "not recognized" in more detail?  Thanks.

Bill
CLD
(Mid-Level minion.)
My support system ensures that I don't look totally incompetent.
Proud to say that I've progressed beyond knowing just enough to be dangerous. I now know enough to know that I have no clue about anything at all.
Humble author of the CLAD Nugget.
0 Kudos
Message 2 of 9
(1,453 Views)

I don't claim to be an expert in this, but I was successful in creating a Project that had a Config folder, where I put "Configuration data", and built an Executable that was identified as indicated in the Build Specs.  Here are two entries in the Build Spec:

NMR Source Files.png

 

NMR Destinations.png

In the Project, I had a Virtual Folder (Config) that "mirrored" a Physical Folder (Config).  Inside were two text files, a .ini file and a text file that had information I wanted to read/write during the execution of the Program.  I had a sub-VI called "UTIL Config Folder" that returned the folder, both in the Project (when running in Development Mode) and in the Executable (which was in a sub-folder called "Config") when running the Executable.

Config Folder.png

The "green" VI is "Create Dir if Non-existent" from OpenG (installed using VIPM). 

Whenever I need to read or write a file in this folder, I use the above Config Folder VI to get the "Folder" and add the File Name string and do a "Build Path".  During Development, this picks up files that "live" in the Project's Config Folder, but when I deploy and run the Executable, the same code pulls the specified File from the Config Folder that gets built into the Config sub-folder inside the Folder created as part of the Build process.

 

Bob Schor

0 Kudos
Message 3 of 9
(1,432 Views)

I use Fiddler to catch the HTTPS request from my LabVIEW application. When I run the tat.exe (which is executable from the project), the exe recognizes the tat.exe.config and it uses TLS 1.2 when it send a HTTPS request: 

EnikoMezei_0-1651147936181.png

 

When I want to run the main.vi from the LabVIEW Project, HTTPS request uses still the TLS 1.0 version:

EnikoMezei_1-1651148021806.png

 

So I think the project can't find the project config file. The files look like this:

EnikoMezei_2-1651148111817.pngEnikoMezei_3-1651148138147.png

The config files' contents are the same. I don't know why this config doesn't work with the project. Do you have any idea? 

0 Kudos
Message 4 of 9
(1,358 Views)

Hi Eniko,

 

have you tried "tat.config" instead of "tat.exe.config"?

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 5 of 9
(1,354 Views)
Solution
Accepted by topic author EnikoMezei

Have you tried to make a config for LabVIEW.exe ? 

(Remember to place it next to the exe in program file folder)

0 Kudos
Message 6 of 9
(1,351 Views)

Hi,

 

I don't have a problem with the exe.config file. It works well. The problem was with the lvproj config, but I have tried your idea with the project file, but unfortunately, it doesn't work.

 

Best Regards,

Eniko

0 Kudos
Message 7 of 9
(1,346 Views)

No, I didn't try it earlier, but it works! Thank you very much! 

0 Kudos
Message 8 of 9
(1,344 Views)

If you run the project from the IDE you have to create a LabVIEW.exe.config in the directory of your LabVIEW.exe. If you have build an Executable, you need a <Name of your App.exe>.config in the directory of your Executable.

0 Kudos
Message 9 of 9
(1,324 Views)