473,789 Members | 2,368 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Service


I have created a service that create a process.
The service is running in local system account & it also create the
new process in system account.

In process i have to access network resource .
In Windows 2000 new process is working fine but in Windows XP it does't
do anything .
The problem is that newly created problem could not access network path
thats y creating problem .
What may b the reason ?
Any Help ?

FAISAL NAWAZ

Jul 21 '05 #1
3 1523
<ma***********@ gmail.com> wrote in message
news:11******** **************@ f14g2000cwb.goo glegroups.com.. .
In process i have to access network resource .
In Windows 2000 new process is working fine but in Windows XP it does't
do anything .
The problem is that newly created problem could not access network path
thats y creating problem .
What may b the reason ?


Make sure you have your service dependencies set as needed. You may need
Remote Procedure Call (RPC) for networking. You can set these dependencies
in VS.NET by setting the ServicesDepende dOn property of the ServiceInstalle r
component in your project. Use "RPCSS" for RPC. If you change this
setting, you will have to uninstall and reinstall the service for the
setting to take affect. You may have other dependencies as well, such as
message queueing, etc. It is important to set the service dependencies
correctly, because otherwise the ordering of the various service startups at
boot time may be wrong for your service.

Secondly, you may need to set the logon user for the service to a domain
user that has rights to the network resources that you are trying to access,
rather than your system account. If necessary, you may have to assign the
"Log on as a service" right to the login in the Local Security Policy's
SecuritySetting s/LocalPolicies/UserRightsAssig nment option.

-- Alan

Jul 21 '05 #2

Thanks 4 feedback.

There is nothing wrong with the service as it works on Windows 2000.

Actually whole things r working fine in windows 2k SP 4.but
on Windows XP SP 2 the process is unable to access the network path.
People say that if ur process is running in local system account then u
can't
access network resources.

Its OK on Xp i.e when we try to access network it could't but why it is
working in windows 2000 when the process is running in system account.

Why there is difference in service activity on WindowsXP & Windows 2K.

Hope u will guide me...
Thanks in advance





Alan Pretre wrote:
<ma***********@ gmail.com> wrote in message
news:11******** **************@ f14g2000cwb.goo glegroups.com.. .
In process i have to access network resource .
In Windows 2000 new process is working fine but in Windows XP it does't do anything .
The problem is that newly created problem could not access network path thats y creating problem .
What may b the reason ?
Make sure you have your service dependencies set as needed. You may

need Remote Procedure Call (RPC) for networking. You can set these dependencies in VS.NET by setting the ServicesDepende dOn property of the ServiceInstalle r component in your project. Use "RPCSS" for RPC. If you change this
setting, you will have to uninstall and reinstall the service for the setting to take affect. You may have other dependencies as well, such as message queueing, etc. It is important to set the service dependencies correctly, because otherwise the ordering of the various service startups at boot time may be wrong for your service.

Secondly, you may need to set the logon user for the service to a domain user that has rights to the network resources that you are trying to access, rather than your system account. If necessary, you may have to assign the "Log on as a service" right to the login in the Local Security Policy's SecuritySetting s/LocalPolicies/UserRightsAssig nment option.

-- Alan


Jul 21 '05 #3
Windows 2000 and Windows XP have very different security models. To add to
the flavor, Windows XP SP2 has a different security model than Windows XP
SP1. Just because your app works on W2K does not at all mean it will work
with the security model of XP especially when we are talking about network
access.

As Alan stated below, for your service to work correctly across the network
you should probably have the service start under a Domain user account that
has the privileges you require of your service. Microsoft has reduced the
authority of LocalSystem, LocalService, and NetworkService accounts to
increase network security.

Hope that helps,
PJ

<ma***********@ gmail.com> wrote in message
news:11******** **************@ z14g2000cwz.goo glegroups.com.. .

Thanks 4 feedback.

There is nothing wrong with the service as it works on Windows 2000.

Actually whole things r working fine in windows 2k SP 4.but
on Windows XP SP 2 the process is unable to access the network path.
People say that if ur process is running in local system account then u
can't
access network resources.

Its OK on Xp i.e when we try to access network it could't but why it is
working in windows 2000 when the process is running in system account.

Why there is difference in service activity on WindowsXP & Windows 2K.

Hope u will guide me...
Thanks in advance





Alan Pretre wrote:
<ma***********@ gmail.com> wrote in message
news:11******** **************@ f14g2000cwb.goo glegroups.com.. .
> In process i have to access network resource .
> In Windows 2000 new process is working fine but in Windows XP it does't > do anything .
> The problem is that newly created problem could not access network path > thats y creating problem .
> What may b the reason ?


Make sure you have your service dependencies set as needed. You may

need
Remote Procedure Call (RPC) for networking. You can set these

dependencies
in VS.NET by setting the ServicesDepende dOn property of the

ServiceInstalle r
component in your project. Use "RPCSS" for RPC. If you change this
setting, you will have to uninstall and reinstall the service for the

setting to take affect. You may have other dependencies as well,

such as
message queueing, etc. It is important to set the service

dependencies
correctly, because otherwise the ordering of the various service

startups at
boot time may be wrong for your service.

Secondly, you may need to set the logon user for the service to a

domain
user that has rights to the network resources that you are trying to

access,
rather than your system account. If necessary, you may have to

assign the
"Log on as a service" right to the login in the Local Security

Policy's
SecuritySetting s/LocalPolicies/UserRightsAssig nment option.

-- Alan

Jul 21 '05 #4

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

Similar topics

9
7032
by: Hardy Wang | last post by:
Hi all: I read an article from http://www.c-sharpcorner.com/Code/2003/Sept/InstallingWinServiceProgrammatically.asp about how to install a windows service programmatically. Based ont the code sample, it provides the feature to install service under LocalSystem account. What I need is to install service under some other certian account. By further studying the code, and MSDN...
7
712
by: Mike | last post by:
I want to create a windows service that will monitor another window service. what i need for the service to do is, if a service is stopped I need it to start the service back up example: service 1 - my service watches service 2 - windows service service 2 is stopped - service 1 starts service 2
4
21760
by: carson | last post by:
I have written two windows services: - service A does some crunching of local data files and uploads them to a central processing computer via http. - service B monitors a manifest file on a webserver to see if service A needs to be updated. What service B does if it sees their is an update for service A is to download a new copy of the service A executable, stop service A, replace the executable with the new copy, and start service B...
20
6753
by: =?Utf-8?B?cmtibmFpcg==?= | last post by:
I was executing the steps given in http://suppor.microsoft.com/kb/308359 for testing a sample web service application. However, the following line gives a compilation error: localhost.Service1 xxx = new localhost.Service1(); localhost is not recognized by the compiler.
5
3309
by: dm3281 | last post by:
I'm really starting to hate writing services -- or trying to, anyway. Why do I need to rename my project to the service name? Why do I need to set the "ServiceName" property to my service name? Why do I need to set a property within my code to the service name? Are all these required or am I just doing this for consistency purposes?
0
9663
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
9511
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10404
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
10136
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,...
0
6765
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
5548
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4090
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
3695
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2906
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.