This website uses cookies. By clicking Accept, you consent to the use of cookies. Click Here to learn more about how we use cookies.
Turn on suggestions
Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.
- Revenera Community
- :
- FlexNet Connect
- :
- FlexNet Connect Forum
- :
- Re: Using FlexNeT client side...
Subscribe
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Subscribe
- Mute
- Printer Friendly Page
‎Sep 08, 2009
09:27 AM
Using FlexNeT client side...
Hello,
I'm trying to write a command line based application whose job it will be to hit a FlexNeT server, query that server about a variety of products that I want to pull down updates for, and then pull down those updates.
What's the best way to attack this? I see that there is a Windows SDK, but that seems more geared towards automating the download/update inside a client application itself.
My service will pull all of the updates down to a particular folder (silently) where they can be deployed by an administrator.
I've also see that there are a set of web-service like objects that I could hit with queries, but I was wondering if there was any documentation or samples available for these kinds of operations?
So...SDK, or web services? Any thoughts?
Thanks,
Chris
I'm trying to write a command line based application whose job it will be to hit a FlexNeT server, query that server about a variety of products that I want to pull down updates for, and then pull down those updates.
What's the best way to attack this? I see that there is a Windows SDK, but that seems more geared towards automating the download/update inside a client application itself.
My service will pull all of the updates down to a particular folder (silently) where they can be deployed by an administrator.
I've also see that there are a set of web-service like objects that I could hit with queries, but I was wondering if there was any documentation or samples available for these kinds of operations?
So...SDK, or web services? Any thoughts?
Thanks,
Chris
(10) Replies
‎Sep 09, 2009
11:05 AM
The Windows SDK is probably closer to what you want. The web services are usually more aligned with creating updates or something more of that nature.
The way you would do this is have your Service invoke the necessary Windows Agent APIs, collect the updates manually, and download them as necessary. The major points to start looking would be at the USAgent, NotificationCollection, and Notification interfaces.
You can find lots of information and samples for those in the docs, but if you have specific questions you can either ask here or contact support if you have a valid support plan.
The biggest concern with this model you will want to ensure you address as best as possible is security related to running a Service in the background. Normally, these things work without issue, but dependent on your environment it may be a source of problems. Generally, the Agent is invoked over a COM boundary, so whatever user your service runs as would need to have access to COM servers ( which normally they do ) as well as internet access ( not all accounts have this ).
The way you would do this is have your Service invoke the necessary Windows Agent APIs, collect the updates manually, and download them as necessary. The major points to start looking would be at the USAgent, NotificationCollection, and Notification interfaces.
You can find lots of information and samples for those in the docs, but if you have specific questions you can either ask here or contact support if you have a valid support plan.
The biggest concern with this model you will want to ensure you address as best as possible is security related to running a Service in the background. Normally, these things work without issue, but dependent on your environment it may be a source of problems. Generally, the Agent is invoked over a COM boundary, so whatever user your service runs as would need to have access to COM servers ( which normally they do ) as well as internet access ( not all accounts have this ).
‎Sep 14, 2009
03:57 PM
Thanks for your replies - I finally got time to start messing with this.
My test code is here:
// Do our thing.
// Instantiate our flexnet connect object.
string productcode = "{AF1D9E51-D922-71D5-1B43-02105A9346E9}";
USAgent agent = new USAgent();
agent.SetNotificationServerURL(productcode, "http://my_flexnetserver_ip_address");
NotificationCollection NC;
if (agent.IsConnectedToNotificationServer(productcode) == true)
{
NC = agent.GetNotificationCollection(productcode);
foreach (Notification n in NC)
{
string sTitle = n.GetProperty(NotificationProperty.NP_TITLE);
}
}
But I get this exception when I hit the SetNotificationServerURL line:
System.Runtime.InteropServices.COMException was unhandled by user code
Message="The Software Manager does not recognize this product. Please contact your software vendor for updates to this product. Error 13003: Version Not Registered with the FLEXnet Connect."
I'm guessing that either the IP address given to me for our server is wrong, or the test product code is wrong?
Thanks,
Chris
My test code is here:
// Do our thing.
// Instantiate our flexnet connect object.
string productcode = "{AF1D9E51-D922-71D5-1B43-02105A9346E9}";
USAgent agent = new USAgent();
agent.SetNotificationServerURL(productcode, "http://my_flexnetserver_ip_address");
NotificationCollection NC;
if (agent.IsConnectedToNotificationServer(productcode) == true)
{
NC = agent.GetNotificationCollection(productcode);
foreach (Notification n in NC)
{
string sTitle = n.GetProperty(NotificationProperty.NP_TITLE);
}
}
But I get this exception when I hit the SetNotificationServerURL line:
System.Runtime.InteropServices.COMException was unhandled by user code
Message="The Software Manager does not recognize this product. Please contact your software vendor for updates to this product. Error 13003: Version Not Registered with the FLEXnet Connect."
I'm guessing that either the IP address given to me for our server is wrong, or the test product code is wrong?
Thanks,
Chris
‎Sep 14, 2009
06:55 PM
Chris, you must have the product that you want to check for updates installed on your development computer. For example, I started out with a simple test project, probably like you are doing, but I had to write an InstallShield installer that installed my test application on my development computer. Are you self-hosted for FLEXnet Connect, or Acresso-hosted?
I am self-hosted and was able to register my product via InstallShield 2010 with the FLEXnet Connect server. I am not sure how that works with an Acresso-hosted solution.
Hope this helps!
Tim
I am self-hosted and was able to register my product via InstallShield 2010 with the FLEXnet Connect server. I am not sure how that works with an Acresso-hosted solution.
Hope this helps!
Tim
‎Sep 15, 2009
07:56 AM
Hi Tim,
Thanks for the information..this might be a problem for me.
You see, we're developing a service that downloads a bunch of different packages and stores them on a disk to be deployed manually by an administrator. The packages/products aren't installed on the system this service is running on at all...but the service keeps a database of what it has downloaded and what the latest version it has is.
Is there another way to do this?
Chris
Thanks for the information..this might be a problem for me.
You see, we're developing a service that downloads a bunch of different packages and stores them on a disk to be deployed manually by an administrator. The packages/products aren't installed on the system this service is running on at all...but the service keeps a database of what it has downloaded and what the latest version it has is.
Is there another way to do this?
Chris
‎Sep 15, 2009
08:44 AM
Some more data:
I'm now using this code below and having somewhat better results. The Register() call works, IsServiceEnabled() returns true, but IsConnectedToNotificationServer() always returns false for some reason.
string productcode = "{AF1D9E51-D922-71D5-1B43-02105A9346E9}";
USAgent agent = new USAgent();
agent.Register(productcode, "1.0", LanguageCode.English, "http://x.x.x.x", "Default", true, null);
Boolean bIsEnabled = false;
bIsEnabled = agent.IsServiceEnabled(productcode);
NotificationCollection NC;
if (agent.IsConnectedToNotificationServer(productcode) == true)
{
NC = agent.GetNotificationCollection(productcode);
foreach (Notification n in NC)
{
string sTitle = n.GetProperty(NotificationProperty.NP_TITLE);
}
}
I'm now using this code below and having somewhat better results. The Register() call works, IsServiceEnabled() returns true, but IsConnectedToNotificationServer() always returns false for some reason.
string productcode = "{AF1D9E51-D922-71D5-1B43-02105A9346E9}";
USAgent agent = new USAgent();
agent.Register(productcode, "1.0", LanguageCode.English, "http://x.x.x.x", "Default", true, null);
Boolean bIsEnabled = false;
bIsEnabled = agent.IsServiceEnabled(productcode);
NotificationCollection NC;
if (agent.IsConnectedToNotificationServer(productcode) == true)
{
NC = agent.GetNotificationCollection(productcode);
foreach (Notification n in NC)
{
string sTitle = n.GetProperty(NotificationProperty.NP_TITLE);
}
}
‎Sep 15, 2009
10:03 AM
Chris, I believe you are missing setting the URL of the Notification Server. Should be something like:
fncAgentObj.SetNotificationServerURL(PC,"http://myURL")
You can use hard-coded IP address or resolved DNS name for the URL.
You would issue this command prior to checking if you are connected to the notification server.
Hope this helps!
Tim
fncAgentObj.SetNotificationServerURL(PC,"http://myURL")
You can use hard-coded IP address or resolved DNS name for the URL.
You would issue this command prior to checking if you are connected to the notification server.
Hope this helps!
Tim
‎Sep 16, 2009
04:22 PM
cada0310 wrote:
Some more data:
I'm now using this code below and having somewhat better results. The Register() call works, IsServiceEnabled() returns true, but IsConnectedToNotificationServer() always returns false for some reason.
string productcode = "{AF1D9E51-D922-71D5-1B43-02105A9346E9}";
USAgent agent = new USAgent();
agent.Register(productcode, "1.0", LanguageCode.English, "http://x.x.x.x", "Default", true, null);
Boolean bIsEnabled = false;
bIsEnabled = agent.IsServiceEnabled(productcode);
NotificationCollection NC;
if (agent.IsConnectedToNotificationServer(productcode) == true)
{
NC = agent.GetNotificationCollection(productcode);
foreach (Notification n in NC)
{
string sTitle = n.GetProperty(NotificationProperty.NP_TITLE);
}
}
While the SetNotificationServerURL will technically fix this for you, you can avoid having to call that completely by including the trailing slash in the URL provided to the USAgent::Register API. This means your URLs should look similar to:
http://updates.installshield.com/
or
http://64.14.29.50/
Also, the 13003 error was occurring because there was a product version mismatch between what was registered locally and what was registered on the Publisher site. FNC is version sensitive such that version 1.00 is not equal to 1.0 or 1.00.000 and so on.
Hopefully those guidelines can be of further assistance.