Hi Ravi, thanks for answering. The reason why I think DCOM
and WMI won't work is because as of changing some
permissions around in the DCOM console, I now get an error
when I open the MMC for windows media server. It tells me
that the Network account that is assigned to use Windows
Media doesn't have "access to a directory or file" when I
open it up. But the issue goes further then this because
the Web Administrator also had problems getting to access
the service even before I tinkered around with the
permission settings (see my posting on Web Administrator
below).
Now, what I did on the permissions is that I
added "Administrator" to the Windows Media object but I
rolled everything back as I went along. Also, I
unregistered and registered by hand
the "msservertypelib.dll" as instructed by David Chen and
I think that messed up my WMI settings. I have since done
multiple uninstalls and reinstalls to no avail.
But anyway, if you feel that a vbscript can do what I
want, which is simply to list the number of current
clients connected, IP and how long, I would be most
appreciative but only if it can give me the number of
clients connect in real time (or as the web page
refreshes) that would be file too.
As to the WMI, I can connect to the computer through the
MMC but when I go to the security tab and the "+root" is
listed, I hit the "+" and nothing lists where a tree with
the name of the name spaces used to show. I feel this is
what is giving me the error when I open up the MMC Windows
Media Administrator. Also, this affects the publishing
point wizard (it doesn't come up now). The advanced
publishing point dialog still works and I'm using that. I
can administer the Media Server with the MMC, it's just
the box with the red X and permission error pops up when I
navigate trough the tabs to access things like monitor and
properties pages. Also, if I add new publishing points,
they don't show up until close the MMC and restart it. The
server is working fine though, rtsp, udp and http streams
the way I want them to.
Just curious but is there any tool to repair the WMI?
If you can please help, I would appreciate it very much :)
Ravi Raman - 29 Dec 2003 19:08 GMT
Hi Nestor,
The WMI issues is the cause for the publishing points not
showing up in the Admin. Can you check the following:
1. That on Control Panel->Services and Applications-
>Services, check if Windows Management Instrumentation is
started and running.
2. That on Windows Media Server, under server->Event
Notification->WMS WMI Event Handler is enabled.
Seems like some WMI related settings is corrupted and that
is causing the publishing points to not show up. I am not
sure how to fix this though, sorry!
Now for DCOM settings, you should give the Windows Media
Services Object full access to the
group "Administrators"(i.e, the group, not just the
Administrator account), "Network Service" and System
account have launch and access permissions. This is
probably set already, but you can verify just in case.
If all these doesn't help, here is a script that you can
try and see if it suits your need (copy the text into
players.vbs and run player.vbs):
set srvobj = createobject
("WMSServer.server","yourservername")
set pubpt = srvobj.PublishingPoints("yourpubptname")
wscript.echo pubpt.ConnectedPlayers
If all DCOM permissions are set on server for the user
account you are currently logged in, you will get the
number of currently connected players on "yourpubptname"
publishing point on the "yourservername" server. You can
get other relevant data similar to this using server
object model, but you should try and see if this works
like you expect it to.
Hope this helps.
Ravi Raman
---
This posting is provided "AS IS" with no warranties, and
confers no rights. Use of included script samples are
subject to the terms specified at
http://www.microsoft.com/info/cpyright.htm"
>-----Original Message-----
>Hi Ravi, thanks for answering. The reason why I think DCOM
[quoted text clipped - 44 lines]
>If you can please help, I would appreciate it very much :)
>.
Nestor - 29 Dec 2003 21:48 GMT
Thanks so much Ravi!
1. check
2. check
3. DCOM - a-okay
I ran the script and got the following:
"Object doesn't support property or
method: 'pubpt.ConnectedPlayers'"
Code: 800A01B6
So I guess it at least connected to the WMSserver?!?!?
>-----Original Message-----
>Hi Nestor,
[quoted text clipped - 100 lines]
>>
>.
Nestor - 29 Dec 2003 22:03 GMT
Ravi!
This worked:
set srvobj = createobject("WMSServer.server","server1")
set pubpt = srvobj.PublishingPoints("live")
wscript.echo pubpt.Players.count
Now, can I put this in an .asp page and run it? Do I have
to create an app pool and give premissions? I suppose
running the vb script from the desktop is not the same as
puttin this in an .asp page and running under
IURS_SERVER??
Thanks again! I'm getting there!!!
Nestor - 29 Dec 2003 22:57 GMT
Okay, just did a little test on an .asp page and as I
expected I got the premission denied..
Ravi Raman - 30 Dec 2003 00:35 GMT
Hi Nestor,
Sorry about the bad coding. Just sent it in a hurry. The
correct line should've read:
wscript.echo pubpt.CurrentCounters.ConnectedPlayers
But you seemed to have figured out the server OM and that
you can get the required counter off of the server. Now,
the only issue is - as you tried and found already - is
the permission part. I am not an expert in IIS and how it
works w.r.to ASP pages, but the generic direction I would
follow is to find out under the context of what user
account the IIS server runs the script. If you know that,
then you can give that account permission to access the
server object model (using DCOM), then everything should
work. To make things simple, you can open up DCOM
permissions for server and give "Everyone" and "Anonymous"
accounts launch and access permission and see if you can
get the scenario to work at all. However, eventually you
will need to find out the right account and give
appropriate permissions only for that account.
Thx,
Ravi
>-----Original Message-----
>Okay, just did a little test on an .asp page and as I
>expected I got the premission denied..
>
>.