Welcome Guest! To enable all features please Login or Register.

Notification

Icon
Error

Using CassiniConfiguration
bmenot
#1 Posted : Tuesday, August 12, 2008 10:17:32 AM(UTC)
Groups: Member
Joined: 8/12/2008(UTC)
Posts: 6

Hi,

I'm using C# and trying to use the CassiniConfiguration class... Here is what I'm trying:

Quote:

Metabase mb = new Metabase();

Guid goo = new Guid("{126b3d53-94f1-3a1e-6362-36508003705a}");

ApplicationEntry appEntry = mb.FindApplication(goo);

if (appEntry != null)
{
if (appEntry.IsRunning())
MessageBox.Show("app is running!");
}
else
MessageBox.Show("null");


Is there something I'm doing wrong here?

I am just trying to check if the server is running, and if it is, I want to get the port it is running on...
Ultidev Team
#2 Posted : Tuesday, August 12, 2008 10:42:23 AM(UTC)
Ultidev Team

Groups: Administration
Joined: 11/3/2005(UTC)
Posts: 2,253

Thanks: 28 times
Was thanked: 60 time(s) in 59 post(s)
Hi there.

Yes, a small change is required. Metabase constructor is not supposed to be used. Instead Load() method needs to be employed. Unfortunately we had to make Metabase() constructor public for deserialization purposes.

Code:
Metabase mb = Metabase.Load();


Here's the online version of the API doc. You also have the local version of the API Guide accessible at Start -> All Programs -> UltiDev -> Cassini Web Server -> Configuration API Guide.

Please let us know if this has helped.

Best regards,
UltiDev Team.
Please donate at http://www.ultidev.com/products/Donate.aspx to help us improve our products.
bmenot
#3 Posted : Tuesday, August 12, 2008 11:24:59 AM(UTC)
Groups: Member
Joined: 8/12/2008(UTC)
Posts: 6

Thank you very much for the quick response!

Just one last question - When Ultidev Cassini is uninstalled, does it unregister all applications automatically? As in, do I need to manually unregister applications before the uninstallation?

Thanks again.
Ultidev Team
#4 Posted : Tuesday, August 12, 2008 2:45:31 PM(UTC)
Ultidev Team

Groups: Administration
Joined: 11/3/2005(UTC)
Posts: 2,253

Thanks: 28 times
Was thanked: 60 time(s) in 59 post(s)
Hello!

When your application gets uninstalled, you should unregister your application, but not uninstall the UltiDev Cassini, because another application using UltiDev Cassini may have been installed since then, requiring that UltiDev Cassini remains in place, just like you would not try to uninstall .NET Framework if its installation was triggered. Ultimately, your installer does not know whether the UltiDev Cassini was already installed before your installation started; Cassini may have been there already serving other applications.

To answer your question, UltiDev Cassini does not unregister any applications when it gets uninstalled. Metabase file remains on the system waiting for the next installation of UltiDev Cassini. This enables us upgrading UltiDev Cassini on the machine transparently to all applications it serves.

Please let us know if this has helped.

Best regards,
UltiDev Team.
Please donate at http://www.ultidev.com/products/Donate.aspx to help us improve our products.
Rss Feed  Atom Feed
Users browsing this topic
Guest (5)
Forum Jump  
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You can vote in polls in this forum.