Getservers method

133 views
Skip to first unread message

aburrow

unread,
Jul 5, 2011, 6:36:05 AM7/5/11
to Cassia Users
I'm trying to use Cassia in a C# asp.net page to allow our Service
desk staff to

1. Enumerate the Terminal Servers currently in the domain.
2. Enumerate Terminal Server sessions.
3. Allow logoff/disconnect Sessions.

I keep getting an error "The format of the specified domain name is
invalid" (when I try to enumerate the Terminal Servers in the domain,
what should the correct format be?

Does anyone have a page that can already do this or a subset, that I
might be able to use as a basis?

Thanks

Dan Ports

unread,
Jul 5, 2011, 12:03:28 PM7/5/11
to cassia...@googlegroups.com
The GetServers() method requires a NetBIOS domain name rather than a fully qualified domain name (e.g. TEST rather than ad.test.com).

Does that work for you? I don't think I have any ASP.NET samples on hand, but feel free to ask additional questions if you run into any IIS-related issues. You will, of course, have to run the site as a user with permissions to enumerate, log off, and disconnect sessions.

Dan


--
You received this message because you are subscribed to the Google Groups "Cassia Users" group.
To post to this group, send email to cassia...@googlegroups.com.
To unsubscribe from this group, send email to cassia-users...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/cassia-users?hl=en.


Burrow, Anthony

unread,
Jul 5, 2011, 10:11:09 PM7/5/11
to cassia...@googlegroups.com
I've tried just the netbios name still no luck.
From: Dan Ports <danp...@gmail.com<mailto:danp...@gmail.com>>
Reply-To: "cassia...@googlegroups.com<mailto:cassia...@googlegroups.com>" <cassia...@googlegroups.com<mailto:cassia...@googlegroups.com>>
Date: Wed, 6 Jul 2011 02:03:28 +1000
To: "cassia...@googlegroups.com<mailto:cassia...@googlegroups.com>" <cassia...@googlegroups.com<mailto:cassia...@googlegroups.com>>
Subject: Re: Getservers method

The GetServers() method requires a NetBIOS domain name rather than a fully qualified domain name (e.g. TEST rather than ad.test.com<http://ad.test.com>).

Does that work for you? I don't think I have any ASP.NET<http://ASP.NET> samples on hand, but feel free to ask additional questions if you run into any IIS-related issues. You will, of course, have to run the site as a user with permissions to enumerate, log off, and disconnect sessions.

Dan

On Tue, Jul 5, 2011 at 6:36 AM, aburrow <abu...@csu.edu.au<mailto:abu...@csu.edu.au>> wrote:
I'm trying to use Cassia in a C# asp.net<http://asp.net> page to allow our Service
desk staff to

1. Enumerate the Terminal Servers currently in the domain.
2. Enumerate Terminal Server sessions.
3. Allow logoff/disconnect Sessions.

I keep getting an error "The format of the specified domain name is
invalid" (when I try to enumerate the Terminal Servers in the domain,
what should the correct format be?

Does anyone have a page that can already do this or a subset, that I
might be able to use as a basis?

Thanks

--
You received this message because you are subscribed to the Google Groups "Cassia Users" group.

To post to this group, send email to cassia...@googlegroups.com<mailto:cassia...@googlegroups.com>.
To unsubscribe from this group, send email to cassia-users...@googlegroups.com<mailto:cassia-users%2Bunsu...@googlegroups.com>.


For more options, visit this group at http://groups.google.com/group/cassia-users?hl=en.

--


You received this message because you are subscribed to the Google Groups "Cassia Users" group.

To post to this group, send email to cassia...@googlegroups.com<mailto:cassia...@googlegroups.com>.
To unsubscribe from this group, send email to cassia-users...@googlegroups.com<mailto:cassia-users...@googlegroups.com>.


For more options, visit this group at http://groups.google.com/group/cassia-users?hl=en.

[cid:csu-logo1712.gif]<http://www.csu.edu.au>

| ALBURY-WODONGA | BATHURST | CANBERRA | DUBBO | GOULBURN | ONTARIO | ORANGE | SYDNEY | WAGGA WAGGA |

Give Generously - Support Young Australians
You can help young Australians to go to University and succeed in their studies by giving generously to the Charles Sturt University Foundation. To find out more or to make a donation go to the Foundation<http://www.csu.edu.au/special/foundation/> web site. Australian donations are tax deductible.
________________________________
LEGAL NOTICE
This email (and any attachment) is confidential and is intended for the use of the addressee(s) only. If you are not the intended recipient of this email, you must not copy, distribute, take any action in reliance on it or disclose it to anyone. Any confidentiality is not waived or lost by reason of mistaken delivery. Email should be checked for viruses and defects before opening. Charles Sturt University (CSU) does not accept liability for viruses or any consequence which arise as a result of this email transmission. Email communications with CSU may be subject to automated email filtering, which could result in the delay or deletion of a legitimate email before it is read at CSU. The views expressed in this email are not necessarily those of CSU.

Charles Sturt University in Australia<http://www.csu.edu.au> The Chancellery, Panorama Avenue, Bathurst NSW Australia 2795 (ABN: 83 878 708 551; CRICOS Provider Numbers: 00005F (NSW), 01947G (VIC), 02960B (ACT)).
Charles Sturt University in Ontario<http://www.charlessturt.ca/> 860 Harrington Court, Burlington Ontario Canada L7N 3N4 Registration: www.peqab.ca<http://www.peqab.ca>

Consider the environment before printing this email.

Dan Ports

unread,
Jul 6, 2011, 9:25:41 AM7/6/11
to cassia...@googlegroups.com
Anthony,

Some additional suggestions:
  1. Try passing null to GetServers(), which will try to enumerate the terminal servers in the current domain, if that's what you're looking for.
  2. Make sure NetBIOS over TCP/IP is running on the system on which you are trying to execute this code.
Dan

To post to this group, send email to cassia...@googlegroups.com.
To unsubscribe from this group, send email to cassia-users...@googlegroups.com.

Burrow, Anthony

unread,
Jul 11, 2011, 3:30:20 AM7/11/11
to cassia...@googlegroups.com
No joy

I get the same error if I run GetServers() with Null.

NETBIOS over TCP/IP is running

Anthony,

Some additional suggestions:

1. Try passing null to GetServers(), which will try to enumerate the terminal servers in the current domain, if that's what you're looking for.
2. Make sure NetBIOS over TCP/IP is running on the system on which you are trying to execute this code.

Dan

On Tue, Jul 5, 2011 at 10:11 PM, Burrow, Anthony <ABu...@csu.edu.au<mailto:ABu...@csu.edu.au>> wrote:
I've tried just the netbios name still no luck.

From: Dan Ports <danp...@gmail.com<mailto:danp...@gmail.com><mailto:danp...@gmail.com<mailto:danp...@gmail.com>>>
Reply-To: "cassia...@googlegroups.com<mailto:cassia...@googlegroups.com><mailto:cassia...@googlegroups.com<mailto:cassia...@googlegroups.com>>" <cassia...@googlegroups.com<mailto:cassia...@googlegroups.com><mailto:cassia...@googlegroups.com<mailto:cassia...@googlegroups.com>>>


Date: Wed, 6 Jul 2011 02:03:28 +1000

To: "cassia...@googlegroups.com<mailto:cassia...@googlegroups.com><mailto:cassia...@googlegroups.com<mailto:cassia...@googlegroups.com>>" <cassia...@googlegroups.com<mailto:cassia...@googlegroups.com><mailto:cassia...@googlegroups.com<mailto:cassia...@googlegroups.com>>>
Subject: Re: Getservers method

The GetServers() method requires a NetBIOS domain name rather than a fully qualified domain name (e.g. TEST rather than ad.test.com<http://ad.test.com><http://ad.test.com>).

Does that work for you? I don't think I have any ASP.NET<http://ASP.NET><http://ASP.NET> samples on hand, but feel free to ask additional questions if you run into any IIS-related issues. You will, of course, have to run the site as a user with permissions to enumerate, log off, and disconnect sessions.

Dan

On Tue, Jul 5, 2011 at 6:36 AM, aburrow <abu...@csu.edu.au<mailto:abu...@csu.edu.au><mailto:abu...@csu.edu.au<mailto:abu...@csu.edu.au>>> wrote:
I'm trying to use Cassia in a C# asp.net<http://asp.net><http://asp.net> page to allow our Service
desk staff to

1. Enumerate the Terminal Servers currently in the domain.
2. Enumerate Terminal Server sessions.
3. Allow logoff/disconnect Sessions.

I keep getting an error "The format of the specified domain name is
invalid" (when I try to enumerate the Terminal Servers in the domain,
what should the correct format be?

Does anyone have a page that can already do this or a subset, that I
might be able to use as a basis?

Thanks

--
You received this message because you are subscribed to the Google Groups "Cassia Users" group.

To post to this group, send email to cassia...@googlegroups.com<mailto:cassia...@googlegroups.com><mailto:cassia...@googlegroups.com<mailto:cassia...@googlegroups.com>>.
To unsubscribe from this group, send email to cassia-users...@googlegroups.com<mailto:cassia-users%2Bunsu...@googlegroups.com><mailto:cassia-users%2Bunsu...@googlegroups.com<mailto:cassia-users%252Buns...@googlegroups.com>>.


For more options, visit this group at http://groups.google.com/group/cassia-users?hl=en.

--
You received this message because you are subscribed to the Google Groups "Cassia Users" group.

To post to this group, send email to cassia...@googlegroups.com<mailto:cassia...@googlegroups.com><mailto:cassia...@googlegroups.com<mailto:cassia...@googlegroups.com>>.
To unsubscribe from this group, send email to cassia-users...@googlegroups.com<mailto:cassia-users%2Bunsu...@googlegroups.com><mailto:cassia-users...@googlegroups.com<mailto:cassia-users%2Bunsu...@googlegroups.com>>.


For more options, visit this group at http://groups.google.com/group/cassia-users?hl=en.

[cid:csu-logo1712.gif]<http://www.csu.edu.au>

| ALBURY-WODONGA | BATHURST | CANBERRA | DUBBO | GOULBURN | ONTARIO | ORANGE | SYDNEY | WAGGA WAGGA |

Give Generously - Support Young Australians
You can help young Australians to go to University and succeed in their studies by giving generously to the Charles Sturt University Foundation. To find out more or to make a donation go to the Foundation<http://www.csu.edu.au/special/foundation/> web site. Australian donations are tax deductible.
________________________________
LEGAL NOTICE
This email (and any attachment) is confidential and is intended for the use of the addressee(s) only. If you are not the intended recipient of this email, you must not copy, distribute, take any action in reliance on it or disclose it to anyone. Any confidentiality is not waived or lost by reason of mistaken delivery. Email should be checked for viruses and defects before opening. Charles Sturt University (CSU) does not accept liability for viruses or any consequence which arise as a result of this email transmission. Email communications with CSU may be subject to automated email filtering, which could result in the delay or deletion of a legitimate email before it is read at CSU. The views expressed in this email are not necessarily those of CSU.

Charles Sturt University in Australia<http://www.csu.edu.au> The Chancellery, Panorama Avenue, Bathurst NSW Australia 2795 (ABN: 83 878 708 551; CRICOS Provider Numbers: 00005F (NSW), 01947G (VIC), 02960B (ACT)).

Charles Sturt University in Ontario<http://www.charlessturt.ca/> 860 Harrington Court, Burlington Ontario Canada L7N 3N4 Registration: www.peqab.ca<http://www.peqab.ca><http://www.peqab.ca>

Consider the environment before printing this email.

--
You received this message because you are subscribed to the Google Groups "Cassia Users" group.

To post to this group, send email to cassia...@googlegroups.com<mailto:cassia...@googlegroups.com>.
To unsubscribe from this group, send email to cassia-users...@googlegroups.com<mailto:cassia-users%2Bunsu...@googlegroups.com>.
For more options, visit this group at http://groups.google.com/group/cassia-users?hl=en.

--
You received this message because you are subscribed to the Google Groups "Cassia Users" group.
To post to this group, send email to cassia...@googlegroups.com<mailto:cassia...@googlegroups.com>.
To unsubscribe from this group, send email to cassia-users...@googlegroups.com<mailto:cassia-users...@googlegroups.com>.
For more options, visit this group at http://groups.google.com/group/cassia-users?hl=en.

[cid:csu-logo2c49.gif]<http://www.csu.edu.au>

Dan Ports

unread,
Jul 12, 2011, 2:41:45 PM7/12/11
to cassia...@googlegroups.com
Anthony,

I can't think of anything else off the top of my head, but you could try querying Active Directory if you know the computers you're interested in can be fetched with an LDAP query (e.g. computers in a given OU).

If I can think of anything else, I'll let you know.

Dan

To post to this group, send email to cassia...@googlegroups.com.
To unsubscribe from this group, send email to cassia-users...@googlegroups.com.

aburrow

unread,
Aug 4, 2011, 2:43:48 AM8/4/11
to Cassia Users
Dan,

I took your advice and I'm now pulling the Terminal Server list from
Active Directory. As our Terminal Servers are all located under the
same OU I search that OU and display in a listview.

Thanks

Anthony B

On Jul 13, 4:41 am, Dan Ports <danpo...@gmail.com> wrote:
> Anthony,
>
> I can't think of anything else off the top of my head, but you could
> try querying
> Active Directory<http://stackoverflow.com/questions/1605567/list-all-computers-in-acti...>if
> you know the computers you're interested in can be fetched with an
> LDAP
> query (e.g. computers in a given OU).
>
> If I can think of anything else, I'll let you know.
>
> Dan
>
>
>
>
>
>
>
> On Mon, Jul 11, 2011 at 3:30 AM, Burrow, Anthony <ABur...@csu.edu.au> wrote:
> > No joy
>
> > I get the same error if I run GetServers() with Null.
>
> > NETBIOS over TCP/IP is running
>
> > From: Dan Ports <danpo...@gmail.com<mailto:danpo...@gmail.com>>
> > Reply-To: "cassia...@googlegroups.com<mailto:
> > cassia...@googlegroups.com>" <cassia...@googlegroups.com<mailto:
> > cassia...@googlegroups.com>>
> > Date: Wed, 6 Jul 2011 23:25:41 +1000
> > To: "cassia...@googlegroups.com<mailto:cassia...@googlegroups.com>"
> > <cassia...@googlegroups.com<mailto:cassia...@googlegroups.com>>
> > Subject: Re: Getservers method
>
> > Anthony,
>
> > Some additional suggestions:
>
> >  1.  Try passing null to GetServers(), which will try to enumerate the
> > terminal servers in the current domain, if that's what you're looking for.
> >  2.  Make sure NetBIOS over TCP/IP is running on the system on which you
> > are trying to execute this code.
>
> > Dan
>
> > On Tue, Jul 5, 2011 at 10:11 PM, Burrow, Anthony <ABur...@csu.edu.au
> > <mailto:ABur...@csu.edu.au>> wrote:
> > I've tried just the netbios name still no luck.
> > From: Dan Ports <danpo...@gmail.com<mailto:danpo...@gmail.com><mailto:
> > danpo...@gmail.com<mailto:danpo...@gmail.com>>>
> > Reply-To: "cassia...@googlegroups.com<mailto:
> > cassia...@googlegroups.com><mailto:cassia...@googlegroups.com
> > <mailto:cassia...@googlegroups.com>>" <cassia...@googlegroups.com
> > <mailto:cassia...@googlegroups.com><mailto:
> > cassia...@googlegroups.com<mailto:cassia...@googlegroups.com>>>
> > Date: Wed, 6 Jul 2011 02:03:28 +1000
> > To: "cassia...@googlegroups.com<mailto:cassia...@googlegroups.com
> > ><mailto:cassia...@googlegroups.com<mailto:
> > cassia...@googlegroups.com>>" <cassia...@googlegroups.com<mailto:
> > cassia...@googlegroups.com><mailto:cassia...@googlegroups.com
> > <mailto:cassia...@googlegroups.com>>>
> > Subject: Re: Getservers method
>
> > The GetServers() method requires a NetBIOS domain name rather than a fully
> > qualified domain name (e.g. TEST rather than ad.test.com<
> >http://ad.test.com><http://ad.test.com>).
>
> > Does that work for you? I don't think I have any ASP.NET<http://ASP.NET><
> >http://ASP.NET> samples on hand, but feel free to ask additional questions
> > if you run into any IIS-related issues. You will, of course, have to run the
> > site as a user with permissions to enumerate, log off, and disconnect
> > sessions.
>
> > Dan
>
> > On Tue, Jul 5, 2011 at 6:36 AM, aburrow <abur...@csu.edu.au<mailto:
> > abur...@csu.edu.au><mailto:abur...@csu.edu.au<mailto:abur...@csu.edu.au>>>
Reply all
Reply to author
Forward
0 new messages