LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

Set proxy using System_Net_WebClient

Following this suggestion from the community I wrote an application which basically works, but as I've already written in the comments on the community page, the first time I call OpenRead, it is really slow.

 

I think this is what described in several web pages (see here, or here, for example).

In the C# examples the solution is to set WebClient.Proxy, but the problem is that I can't find a function to set this inside CVI .NET Wrapper for system.dll.

I see a lot of functions System_Net_WebClient_xxxxxx but I can't find any function to set the proxy.

 

Could someone help me?

 

Vix
-------------------------------------------
In claris non fit interpretatio

-------------------------------------------
Using LV from 7
Using LW/CVI from 6.0
0 Kudos
Message 1 of 9
(6,095 Views)

Hi vix,

 

can't you use this function: https://msdn.microsoft.com/en-us/library/system.net.webclient.proxy(v=vs.110).aspx and put it in a .NET wrapper in CVI?

0 Kudos
Message 2 of 9
(6,071 Views)

I've already tried but when I create a .NET wrapper for system.dll, under System.NET.IWebProxy I only see

  • Get Credentials
  • Set Credentials
  • IsBypassed
  • Get Proxy

so, no function to set the proxy

Did you successfully create a .NET wrapper which shows "Set Proxy" functions?

Could you give me some detail on how you did it?

 

Vix
-------------------------------------------
In claris non fit interpretatio

-------------------------------------------
Using LV from 7
Using LW/CVI from 6.0
0 Kudos
Message 3 of 9
(6,068 Views)

No, I'm not able to create it. Did you try flagging IsBypassed to true?

0 Kudos
Message 4 of 9
(6,060 Views)

The problem is how to create a System_Net_IWebProxy handle to pass to IsBypassed.

Where is the System_Net_IWebProxy constructor?

Is there a "search" feature for fp trees?

Vix
-------------------------------------------
In claris non fit interpretatio

-------------------------------------------
Using LV from 7
Using LW/CVI from 6.0
0 Kudos
Message 5 of 9
(6,055 Views)

It could be a problem of compatibility with the .NET Framework version. I have the same issue with LabVIEW as well, I just cannot find that class. Or maybe not all the classe inside the System.Net Namespace are visible in LabVIEW/CVI. Not sure how to go about it though.

0 Kudos
Message 6 of 9
(6,046 Views)

Sorry for pushing, but could some help with this issue?

Vix
-------------------------------------------
In claris non fit interpretatio

-------------------------------------------
Using LV from 7
Using LW/CVI from 6.0
0 Kudos
Message 7 of 9
(5,965 Views)

I found the missing functions when I rebuild the .NET wrapper around system.dll.

The problem is that this wrapper is huge and it takes too much time to recompile every time I load the project inside CVI. Moreover the size of my executable became large even if I don't use any additional function.

 

This is not acceptable, so I need to recreate a "reduced" wrapper as SystemWrapper.fp shipped together with CVI samples, but I don't know how to do it. Since I don't know which functions have been exported into SystemWrapper.fp and I can't manually check them one by one... this would take hours!!!

Is there a batch file (or something like that) that I can use to recreate a wrapper around system.dll which exports only the functions included in SystemWrapper.fp?

 

 

Vix
-------------------------------------------
In claris non fit interpretatio

-------------------------------------------
Using LV from 7
Using LW/CVI from 6.0
0 Kudos
Message 8 of 9
(5,952 Views)

Sorry but I really don't know how you can do this, I'm not sure there is a way not to do this manually.

0 Kudos
Message 9 of 9
(5,937 Views)