02-17-2011 06:58 AM
I'm writing some LabVIEW code using .NET Framework 2.0 and need to include web proxy support for our corporate web proxy server.
To do this I need to call the WebRequest.DefaultWebProxy Property
http://msdn.microsoft.com/en-us/library/system.net.webrequest.defaultwebproxy(v=VS.80).aspx
Unfortunately the selection process ends short...
I'm selecting: Connectivity>.NET>Constructor Node>System(2.0.0.0)>System.net>WebRequest>"This class contains no public constructors".
I'm now wondering if this is something I'm doing wrong or a limitation of LabVIEW 10?
Help always appreciated
02-18-2011 03:32 AM
My app also requires a feed from IWebProxy:
http://msdn.microsoft.com/en-us/library/system.net.iwebproxy(v=VS.80).aspx
Connectivity>.NET>Constructor Node>System(2.0.0.0)>System.net>IWebProxy>"This class contains no public constructors"
Anyone know anything about this?
02-18-2011 03:38 AM
Further info:
GDataRequestFactory.Proxy Property
Namespace: Google.GData.Client
Assembly: Google.GData.Client (in Google.GData.Client.dll)
Version: 1.4.0.2
C# |
---|
public IWebProxy Proxy { get; set; } |
02-18-2011 04:22 AM
Hi Andy,
I have tested out the behavior you described and found that the result was exactly the same. My understanding of this is that if there are no public constructors, you will only be able to access the static .NET properties and methods for that .NET object. You can access these properties and methods through the use of Property Nodes and Invoke Nodes in LabVIEW through the technique described here. You will notice that LabVIEW indicates a static property and method with a [S] at the beginning of the property or method name. I have tested this out and seem to be able to access the properties you need.
I hope this helps.
Best Regards,
Christian Hartshorne
NI|UK
02-22-2011 05:46 AM
Hi Christian,
Many thanks for the tip on accessing static .NET properties.
I know realise that the (s) = static and understand how to access them.
My next step is to let the property = null i.e. WebRequest.DefaultWebProxy = null
I have searched the forum for an answer to this with no luck
Any ideas on how to set the above to null? It may be obvious?
02-22-2011 06:44 AM
arr OK found the last post of this thread - hoping this is a null:
"Creating a constant from the method's input parameter seemed to work for me..."