473,811 Members | 2,324 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

RPC Server is unavailable by computers under xp

I have the following code and if I enter the name of a computer running
under windows xp I get an exception that rpc server is not available
although the services are running

void userGroups(stri ng computerName)

string compName = computerName;
if (!compName.Star tsWith(@"\\"))
{
compName = @"\\" + compName + @"\root\cimv 2";
}
ConnectionOptio ns options = new ConnectionOptio ns();

options.Usernam e = this.userName;
options.Passwor d = this.password;

ManagementScope mScope = new ManagementScope (compName, options);
string domain = "";
try
{
ManagementObjec tSearcher searcher = new
ManagementObjec tSearcher(mScop e,new ObjectQuery("SE LECT * FROM
Win32_Group where Domain
= '" + computerName + "'"));
ManagementObjec tSearcher searcher2 = new
ManagementObjec tSearcher(mScop e,new ObjectQuery("SE LECT Name FROM
Win32_UserAccou nt where
Domain = '" + computerName + "'"));

ManagementObjec tCollection moc = searcher.Get(); //***
//by *** jump into the exception
ManagementObjec tCollection moc2 = searcher2.Get() ;

ManagementBaseO bject[] names = new ManagementBaseO bject
[moc2.Count];
ManagementBaseO bject[] groups = new ManagementBaseO bject
[moc.Count];
moc2.CopyTo(nam es, 0);
moc.CopyTo(grou ps, 0);

domain = groups[0]["Domain"].ToString();

for (int i = 0; i < groups.Length; i++)
{
if (i < names.Length)
{
string name = names[i]["Name"].ToString();
this.listBoxBen utzername.Items .Add(name);
}

this.listBoxRec hner.Items.Add( domain);
string group = groups[i]["Name"].ToString();
this.listBoxGru ppe.Items.Add(g roup);

}
}
}
catch (Exception ex)
{
throw new Exception("Erro r obtaining group names. " +
ex.Message);
}
}

---------------------------------------------
An this point, see //***
I get the exception: "RPC Server is unavailable from HRESULT:
0x800706BA"

Is there anything I am missing?
Thanks in advance

Jul 4 '06 #1
4 7519
By default, XP and higer OS do not enable "external" access of WMI services.
You'll have to set each PC's WMI security according your requirements.

Willy.

"Stropher" <hm***@gmx.netw rote in message
news:11******** ************@v6 1g2000cwv.googl egroups.com...
|I have the following code and if I enter the name of a computer running
| under windows xp I get an exception that rpc server is not available
| although the services are running
|
| void userGroups(stri ng computerName)
|
| string compName = computerName;
| if (!compName.Star tsWith(@"\\"))
| {
| compName = @"\\" + compName + @"\root\cimv 2";
| }
| ConnectionOptio ns options = new ConnectionOptio ns();
|
| options.Usernam e = this.userName;
| options.Passwor d = this.password;
|
| ManagementScope mScope = new ManagementScope (compName, options);
| string domain = "";
| try
| {
| ManagementObjec tSearcher searcher = new
| ManagementObjec tSearcher(mScop e,new ObjectQuery("SE LECT * FROM
| Win32_Group where Domain
| = '" + computerName + "'"));
| ManagementObjec tSearcher searcher2 = new
| ManagementObjec tSearcher(mScop e,new ObjectQuery("SE LECT Name FROM
| Win32_UserAccou nt where
| Domain = '" + computerName + "'"));
|
| ManagementObjec tCollection moc = searcher.Get(); //***
| //by *** jump into the exception
| ManagementObjec tCollection moc2 = searcher2.Get() ;
|
| ManagementBaseO bject[] names = new ManagementBaseO bject
| [moc2.Count];
| ManagementBaseO bject[] groups = new ManagementBaseO bject
| [moc.Count];
| moc2.CopyTo(nam es, 0);
| moc.CopyTo(grou ps, 0);
|
| domain = groups[0]["Domain"].ToString();
|
| for (int i = 0; i < groups.Length; i++)
| {
| if (i < names.Length)
| {
| string name = names[i]["Name"].ToString();
| this.listBoxBen utzername.Items .Add(name);
| }
|
| this.listBoxRec hner.Items.Add( domain);
| string group = groups[i]["Name"].ToString();
| this.listBoxGru ppe.Items.Add(g roup);
|
| }
| }
| }
| catch (Exception ex)
| {
| throw new Exception("Erro r obtaining group names. " +
| ex.Message);
| }
| }
|
| ---------------------------------------------
| An this point, see //***
| I get the exception: "RPC Server is unavailable from HRESULT:
| 0x800706BA"
|
| Is there anything I am missing?
| Thanks in advance
|
Jul 4 '06 #2
Make sure the firewall isn't blocking it.

Also, you need to set an additional option. Since sp1, it has been
required to use PacketPrivacy when authenticating against remote
machines. You just need to set an additional ConnectionOptio n. In you
code, add:

options.Authent ication = AuthenticationL evel.PacketPriv acy;
You should also be aware of the behavior that RPC uses dynamic port
allocation. I don't know if this is the case for XP boxes, but if you
ever want to do what you're doing to a server, you will probably need
to know this:

http://support.microsoft.com/kb/154596/EN-US/


On 4 Jul 2006 02:46:57 -0700, "Stropher" <hm***@gmx.netw rote:
>I have the following code and if I enter the name of a computer running
under windows xp I get an exception that rpc server is not available
although the services are running

void userGroups(stri ng computerName)

string compName = computerName;
if (!compName.Star tsWith(@"\\"))
{
compName = @"\\" + compName + @"\root\cimv 2";
}
ConnectionOptio ns options = new ConnectionOptio ns();

options.Usernam e = this.userName;
options.Passwor d = this.password;

ManagementScope mScope = new ManagementScope (compName, options);
string domain = "";
try
{
ManagementObjec tSearcher searcher = new
ManagementObje ctSearcher(mSco pe,new ObjectQuery("SE LECT * FROM
Win32_Group where Domain
= '" + computerName + "'"));
ManagementObjec tSearcher searcher2 = new
ManagementObje ctSearcher(mSco pe,new ObjectQuery("SE LECT Name FROM
Win32_UserAcco unt where
Domain = '" + computerName + "'"));

ManagementObjec tCollection moc = searcher.Get(); //***
//by *** jump into the exception
ManagementObjec tCollection moc2 = searcher2.Get() ;

ManagementBaseO bject[] names = new ManagementBaseO bject
[moc2.Count];
ManagementBaseO bject[] groups = new ManagementBaseO bject
[moc.Count];
moc2.CopyTo(nam es, 0);
moc.CopyTo(grou ps, 0);

domain = groups[0]["Domain"].ToString();

for (int i = 0; i < groups.Length; i++)
{
if (i < names.Length)
{
string name = names[i]["Name"].ToString();
this.listBoxBen utzername.Items .Add(name);
}

this.listBoxRec hner.Items.Add( domain);
string group = groups[i]["Name"].ToString();
this.listBoxGru ppe.Items.Add(g roup);

}
}
}
catch (Exception ex)
{
throw new Exception("Erro r obtaining group names. " +
ex.Message);
}
}

---------------------------------------------
An this point, see //***
I get the exception: "RPC Server is unavailable from HRESULT:
0x800706BA"

Is there anything I am missing?
Thanks in advance
Jul 4 '06 #3
Thanks very much for your quick answer..

Willy Denoyette [MVP] wrote:
By default, XP and higer OS do not enable "external" access of WMI services.
You'll have to set each PC's WMI security according your requirements.

Willy.

"Stropher" <hm***@gmx.netw rote in message
news:11******** ************@v6 1g2000cwv.googl egroups.com...
|I have the following code and if I enter the name of a computer running
| under windows xp I get an exception that rpc server is not available
| although the services are running
|
| void userGroups(stri ng computerName)
|
| string compName = computerName;
| if (!compName.Star tsWith(@"\\"))
| {
| compName = @"\\" + compName + @"\root\cimv 2";
| }
| ConnectionOptio ns options = new ConnectionOptio ns();
|
| options.Usernam e = this.userName;
| options.Passwor d = this.password;
|
| ManagementScope mScope = new ManagementScope (compName, options);
| string domain = "";
| try
| {
| ManagementObjec tSearcher searcher = new
| ManagementObjec tSearcher(mScop e,new ObjectQuery("SE LECT * FROM
| Win32_Group where Domain
| = '" + computerName + "'"));
| ManagementObjec tSearcher searcher2 = new
| ManagementObjec tSearcher(mScop e,new ObjectQuery("SE LECT Name FROM
| Win32_UserAccou nt where
| Domain = '" + computerName + "'"));
|
| ManagementObjec tCollection moc = searcher.Get(); //***
| //by *** jump into the exception
| ManagementObjec tCollection moc2 = searcher2.Get() ;
|
| ManagementBaseO bject[] names = new ManagementBaseO bject
| [moc2.Count];
| ManagementBaseO bject[] groups = new ManagementBaseO bject
| [moc.Count];
| moc2.CopyTo(nam es, 0);
| moc.CopyTo(grou ps, 0);
|
| domain = groups[0]["Domain"].ToString();
|
| for (int i = 0; i < groups.Length; i++)
| {
| if (i < names.Length)
| {
| string name = names[i]["Name"].ToString();
| this.listBoxBen utzername.Items .Add(name);
| }
|
| this.listBoxRec hner.Items.Add( domain);
| string group = groups[i]["Name"].ToString();
| this.listBoxGru ppe.Items.Add(g roup);
|
| }
| }
| }
| catch (Exception ex)
| {
| throw new Exception("Erro r obtaining group names. " +
| ex.Message);
| }
| }
|
| ---------------------------------------------
| An this point, see //***
| I get the exception: "RPC Server is unavailable from HRESULT:
| 0x800706BA"
|
| Is there anything I am missing?
| Thanks in advance
|
Jul 6 '06 #4
Thanks Jeff for your reply...

Jeff Shepler wrote:
Make sure the firewall isn't blocking it.

Also, you need to set an additional option. Since sp1, it has been
required to use PacketPrivacy when authenticating against remote
machines. You just need to set an additional ConnectionOptio n. In you
code, add:

options.Authent ication = AuthenticationL evel.PacketPriv acy;
You should also be aware of the behavior that RPC uses dynamic port
allocation. I don't know if this is the case for XP boxes, but if you
ever want to do what you're doing to a server, you will probably need
to know this:

http://support.microsoft.com/kb/154596/EN-US/


On 4 Jul 2006 02:46:57 -0700, "Stropher" <hm***@gmx.netw rote:
I have the following code and if I enter the name of a computer running
under windows xp I get an exception that rpc server is not available
although the services are running

void userGroups(stri ng computerName)

string compName = computerName;
if (!compName.Star tsWith(@"\\"))
{
compName = @"\\" + compName + @"\root\cimv 2";
}
ConnectionOptio ns options = new ConnectionOptio ns();

options.Usernam e = this.userName;
options.Passwor d = this.password;

ManagementScope mScope = new ManagementScope (compName, options);
string domain = "";
try
{
ManagementObjec tSearcher searcher = new
ManagementObjec tSearcher(mScop e,new ObjectQuery("SE LECT * FROM
Win32_Group where Domain
= '" + computerName + "'"));
ManagementObjec tSearcher searcher2 = new
ManagementObjec tSearcher(mScop e,new ObjectQuery("SE LECT Name FROM
Win32_UserAccou nt where
Domain = '" + computerName + "'"));

ManagementObjec tCollection moc = searcher.Get(); //***
//by *** jump into the exception
ManagementObjec tCollection moc2 = searcher2.Get() ;

ManagementBaseO bject[] names = new ManagementBaseO bject
[moc2.Count];
ManagementBaseO bject[] groups = new ManagementBaseO bject
[moc.Count];
moc2.CopyTo(nam es, 0);
moc.CopyTo(grou ps, 0);

domain = groups[0]["Domain"].ToString();

for (int i = 0; i < groups.Length; i++)
{
if (i < names.Length)
{
string name = names[i]["Name"].ToString();
this.listBoxBen utzername.Items .Add(name);
}

this.listBoxRec hner.Items.Add( domain);
string group = groups[i]["Name"].ToString();
this.listBoxGru ppe.Items.Add(g roup);

}
}
}
catch (Exception ex)
{
throw new Exception("Erro r obtaining group names. " +
ex.Message);
}
}

---------------------------------------------
An this point, see //***
I get the exception: "RPC Server is unavailable from HRESULT:
0x800706BA"

Is there anything I am missing?
Thanks in advance
Jul 6 '06 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
2984
by: lumazi | last post by:
Hello all, I'm having an issue printing to a network printer. The line of code is fairly simple printDocument1.Print(); When you select print from a local printer it works fine, when you select a network printer you get the following error.
4
25373
by: shahzad | last post by:
i get thius error msg when i run my aspx page Server Application Unavailable The web application you are attempting to access on this web server is currently unavailable. Please hit the "Refresh" button in your web browser to retry your request. Administrator Note: An error message detailing the cause of this specific request failure can be found in the application event log of the web server. Please review
3
2145
by: David Walker | last post by:
Hi, I've encountered a problem when installing the .Net framework version 1.0 on a Windows 2000 Server machine in a clustered environment. After I install the framework and try to run a simple ASP.Net web page I receive the following message in my web browser: "Server Application Unavailable The web application you are attempting to access on this web server is currently unavailable. Please hit the "Refresh" button in your web browser...
1
1299
by: robby valles | last post by:
My company has a large windows form app with the datalayer being webservices. pretty randomly the webservice calls will either be very slow or i'll get the server unavailable. there are times when it won't happen all day. a lot of these webservices are simple requests that query data and return a dataset. when the server unavailable error happens all clients connected to the webserver through the same webservice uri will get the error...
1
1079
by: Steven Babb | last post by:
I have taken over responsibilities for a .NET app that runs on IIS Server locally and has a user that has a local Access database that launches the app from a URL. They are receiveing the following error: Server Application Unavailable The web application you are attempting to access on this web server is currently unavailable. Please hit the "Refresh" button in your web browser to retry your request. Administrator Note: An error...
1
1481
by: pphadke | last post by:
I have an application that was originally in asp but is now moved to ASP.Net. To deploy it, I just changed the default file in IIS for the web folder to point to the new aspx file. Occasionally I see a "Server unavailable" error. There is nothing in the event log that suggests any related error or warnings. This application also has a part of it that is still in ASP, would that cause any issues? Most of the links online for this error are...
17
5108
by: Jon B | last post by:
Hi All! I have a ASP.NET 2.0 site that works on the Windows 2000 Server. However, when I tried to view this site on my local Windows XP machine, I get "Server Unavailable". If I switch the Windows XP IIS back to ASP.NET 1.1 then I get the Configuration Error (which is understandable because I'm trying to run an ASP.NET 2 site with 1.1 framework). I can however view other ASP.NET 1.1 sites on my local Windows XP machine. It's only the...
2
1118
by: ruca | last post by:
Hi, My WebApp not stoping to give me this error SERVER APPLICATION UNAVAILABLE aspnet_wp.exe could not be started. The error code for the failure is 80004005. This error can be caused when the worker process account has insufficient rights to read the .NET Framework files. Please ensure that the
2
8309
by: ciffycyclops | last post by:
Hello.. i am using WIndows XP Professional service pack 2 in my client m/c as well as in server..i diasabled the firewall in both the local and remote computer..but it shows the following error"RPC server unavailable" whats wrong is here??what other configuration changes i have to do?? my 2nd question is is there will be any problem if i use Windows 2003 server in my server computer??? pls help me out of this problem pls??
2
1948
by: kenski | last post by:
Hello, I'm new here hopefully i did not broke any rules already, Here's the problem, I'm getting the OUT OF MEMORY exception/SERVER UNAVAILABLE error when fetching large amounts of data in the ff. environment. -windows 2003 -.net framework 1.1 -asp.net using vb as code -oracle 9i database. the develpment server has 2gigs of memory so I think its not an issue. I've tested the query and it works on plSQL developer but when i put it to...
0
9728
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
10389
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10402
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
1
7670
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6890
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5554
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
4339
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3867
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
3018
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.