05-13-2010 10:25 AM
Hi
I have wrote the attached code in order to control a IP Power 9258 device.
The code uses me to write a commend to the device and read his status.
the problem start as I try to use it within some other application.
If I do it all I get is that on the first run it does what it should and at the next run it doesn't do a thing.
I think the problem is coming from using the same browser refnum.
(see more explanations within the code)
Its my first time using .NET so please be as informative as possible 🙂
Thanks
Shai
08-04-2010 05:30 AM
Shai,
the point is, there are several aspects wrong with your code. To make it short: look at the example VI I've attached - WebClient, not WebBrowser is your friend. 🙂
MOST IMPORTANT: do not create a .NET instance with every VI run! Create just one instance, do the cyclic operation, and close it again afterwards!
Another goodie my example shows: adding a permanently changing fake/unknown/unused parameter to the request is ignored by most servers and assures that nobody on the way (proxies etc.) will use a cached response.
Cheers,
Hans