473,695 Members | 1,630 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Problem when running Windows Service in Local System account

Hello,

I have a problem with our OnlineBackupSer vice.exe. This is a Windows Service
which is built in .Net 1.1 and basically grabs files from the file system and
will try to upload them using WebServices.

The service is installed by default using LocalSystem account. The exact
problem is that sometimes this service is not allowed to resolve the target
webservice. This results in the following exception:

Could not resolve remote DNS or hostname.

It seems in some cases that the LocalSystem account can not use
internet-based webservices, but not always. I would like to know:
1. How I can make sure that the LocalSystem account can access a webservice
2. If there is an alternative approach to this problem, in which I
accomplish to be able to access the complete file system and upload this to a
webservice.

Thanks ahead,

rvangeldrop
Jul 30 '07 #1
5 8989
* rvangeldrop wrote, On 30-7-2007 11:06:
Hello,

I have a problem with our OnlineBackupSer vice.exe. This is a Windows Service
which is built in .Net 1.1 and basically grabs files from the file system and
will try to upload them using WebServices.

The service is installed by default using LocalSystem account. The exact
problem is that sometimes this service is not allowed to resolve the target
webservice. This results in the following exception:

Could not resolve remote DNS or hostname.

It seems in some cases that the LocalSystem account can not use
internet-based webservices, but not always. I would like to know:
1. How I can make sure that the LocalSystem account can access a webservice
2. If there is an alternative approach to this problem, in which I
accomplish to be able to access the complete file system and upload this to a
webservice.
This almost definitely not an issue with user rights. The fact that it
cannot find or resolve the hostname for the webservice indicates a
network/infrastructure problem. It can be that the connection is down, a
firewall is playing tricks or the DNS server is not responding (or
cannot resolve the hostname because it cannot reach the DNS server that
is hosting the domain name).

You could try if the problem goes away if you connect to the webservice
on its IP address instead of it's fqn.

There is another possible cause: When the system tries to leave too many
connections half-open, windows will temporarily deny new outbound
connections. This will result in an event in the eventlog with Event ID
4226. Though this is a long shot.

Jesse
Jul 30 '07 #2
Hello Jesse,

If it is not a matter of rights and security, how would you explain the
following:

- If I change the Windows Service the run as a local administrator
everything works fine
-If I change back to let the Windows Service run as LocalSystem the problem
reappears

Somehow the local administrator can resolve a hostname which the LocalSystem
can not?
"rvangeldro p" wrote:
Hello,

I have a problem with our OnlineBackupSer vice.exe. This is a Windows Service
which is built in .Net 1.1 and basically grabs files from the file system and
will try to upload them using WebServices.

The service is installed by default using LocalSystem account. The exact
problem is that sometimes this service is not allowed to resolve the target
webservice. This results in the following exception:

Could not resolve remote DNS or hostname.

It seems in some cases that the LocalSystem account can not use
internet-based webservices, but not always. I would like to know:
1. How I can make sure that the LocalSystem account can access a webservice
2. If there is an alternative approach to this problem, in which I
accomplish to be able to access the complete file system and upload this to a
webservice.

Thanks ahead,

rvangeldrop

Jul 30 '07 #3
* rvangeldrop wrote, On 30-7-2007 12:10:
Hello Jesse,

If it is not a matter of rights and security, how would you explain the
following:
The keyword is in ...sometimes... in your original post. If it was
security the service would *never* resolve the hostname. But it most of
the times does, indicating a different cause. Can you reproduce the
error on other systems as well? Have you tried running under a different
user than LocalSystem (which is about the highest there is). Have you
tried with Anti-Virus disabled or if there is an application firewall,
try disabling that. It could be that some worm prevention could mistake
your service for a worm. (I've seen McAfee do this several times before).

Jesse
>
- If I change the Windows Service the run as a local administrator
everything works fine
-If I change back to let the Windows Service run as LocalSystem the problem
reappears

Somehow the local administrator can resolve a hostname which the LocalSystem
can not?
"rvangeldro p" wrote:
>Hello,

I have a problem with our OnlineBackupSer vice.exe. This is a Windows Service
which is built in .Net 1.1 and basically grabs files from the file system and
will try to upload them using WebServices.

The service is installed by default using LocalSystem account. The exact
problem is that sometimes this service is not allowed to resolve the target
webservice. This results in the following exception:

Could not resolve remote DNS or hostname.

It seems in some cases that the LocalSystem account can not use
internet-based webservices, but not always. I would like to know:
1. How I can make sure that the LocalSystem account can access a webservice
2. If there is an alternative approach to this problem, in which I
accomplish to be able to access the complete file system and upload this to a
webservice.

Thanks ahead,

rvangeldrop

Jul 30 '07 #4
Hello Jesse,

Following up on your mail:
sometimes: means 'on some systems'. The behaviour on a system that is
showing this problem is very consistent. It will never work when running
OnlineBackupSer vice.exe as LocalSystem. Also, changing this to a local
Administrator always resolved the problem.

Your remark about a firewall or anti-virus engine blocking access might be
plausible too, but how does this software distinct its behaviour on the
user-context processes are running in?

I was also thinking of other causes:
- Local security settings are overruled by tighter domain security settings?
- Some LocalSystem profiles miss a certain flag allowing them to resolve
domain names?

Kind regards,

rvangeldrop

"Jesse Houwing" wrote:
* rvangeldrop wrote, On 30-7-2007 12:10:
Hello Jesse,

If it is not a matter of rights and security, how would you explain the
following:

The keyword is in ...sometimes... in your original post. If it was
security the service would *never* resolve the hostname. But it most of
the times does, indicating a different cause. Can you reproduce the
error on other systems as well? Have you tried running under a different
user than LocalSystem (which is about the highest there is). Have you
tried with Anti-Virus disabled or if there is an application firewall,
try disabling that. It could be that some worm prevention could mistake
your service for a worm. (I've seen McAfee do this several times before).

Jesse

- If I change the Windows Service the run as a local administrator
everything works fine
-If I change back to let the Windows Service run as LocalSystem the problem
reappears

Somehow the local administrator can resolve a hostname which the LocalSystem
can not?
"rvangeldro p" wrote:
Hello,

I have a problem with our OnlineBackupSer vice.exe. This is a Windows Service
which is built in .Net 1.1 and basically grabs files from the file system and
will try to upload them using WebServices.

The service is installed by default using LocalSystem account. The exact
problem is that sometimes this service is not allowed to resolve the target
webservice. This results in the following exception:

Could not resolve remote DNS or hostname.

It seems in some cases that the LocalSystem account can not use
internet-based webservices, but not always. I would like to know:
1. How I can make sure that the LocalSystem account can access a webservice
2. If there is an alternative approach to this problem, in which I
accomplish to be able to access the complete file system and upload this to a
webservice.

Thanks ahead,

rvangeldrop

Jul 30 '07 #5
* rvangeldrop wrote, On 30-7-2007 14:20:
Hello Jesse,

Following up on your mail:
sometimes: means 'on some systems'. The behaviour on a system that is
showing this problem is very consistent. It will never work when running
OnlineBackupSer vice.exe as LocalSystem. Also, changing this to a local
Administrator always resolved the problem.
Ahh ok ,that is more clear. What's the difference between those systems
is what you'd be looking for.

A clear view on the different user accounts and their security privs can
be located here:

Your remark about a firewall or anti-virus engine blocking access might be
plausible too, but how does this software distinct its behaviour on the
user-context processes are running in?
Some do.
I was also thinking of other causes:
- Local security settings are overruled by tighter domain security settings?
- Some LocalSystem profiles miss a certain flag allowing them to resolve
domain names?

Kind regards,

rvangeldrop

"Jesse Houwing" wrote:
>* rvangeldrop wrote, On 30-7-2007 12:10:
>>Hello Jesse,

If it is not a matter of rights and security, how would you explain the
following:
The keyword is in ...sometimes... in your original post. If it was
security the service would *never* resolve the hostname. But it most of
the times does, indicating a different cause. Can you reproduce the
error on other systems as well? Have you tried running under a different
user than LocalSystem (which is about the highest there is). Have you
tried with Anti-Virus disabled or if there is an application firewall,
try disabling that. It could be that some worm prevention could mistake
your service for a worm. (I've seen McAfee do this several times before).

Jesse
>>- If I change the Windows Service the run as a local administrator
everything works fine
-If I change back to let the Windows Service run as LocalSystem the problem
reappears

Somehow the local administrator can resolve a hostname which the LocalSystem
can not?
"rvangeldro p" wrote:

Hello,

I have a problem with our OnlineBackupSer vice.exe. This is a Windows Service
which is built in .Net 1.1 and basically grabs files from the file system and
will try to upload them using WebServices.

The service is installed by default using LocalSystem account. The exact
problem is that sometimes this service is not allowed to resolve the target
webservice . This results in the following exception:

Could not resolve remote DNS or hostname.

It seems in some cases that the LocalSystem account can not use
internet-based webservices, but not always. I would like to know:
1. How I can make sure that the LocalSystem account can access a webservice
2. If there is an alternative approach to this problem, in which I
accomplish to be able to access the complete file system and upload this to a
webservice .

Thanks ahead,

rvangeldro p

Jul 30 '07 #6

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

Similar topics

0
1417
by: My Deja | last post by:
How can the mysql service be run without using the local system account? I want to run it and give it access only the directories of its own account.
1
3032
by: DB2 | last post by:
Hello, everyone. Does anyone know what potential security issues when running DB2 services (start-up) using local system account instead of the DB2 admin account? DB2 environments: Windows Server DB2 all editions
2
17704
by: ABCL | last post by:
Hi All, Can any one tell me that what is the difference between Network Service, Local Service and Local System ACcount for window services ABCL
1
2761
by: Andrés G. Aragoneses | last post by:
Hello. I have a Windows Service which I want to execute a file. The service is running under the local system account but when the file is executed it seems to be run with the profile of the user Administrator (I am using the System.Diagnostics.Process class). How can I force the execution to the local system account too? Do I have to use the string "SYSTEM" for the StartInfo.UserName member? If yes, what password should I use?
3
4850
by: Greg | last post by:
I am having a problem trying to debug my windows service. The service itself is working fine (it starts a timer, which writes a log entry every 20 seconds). However, when I set my breakpoint on the line that writes the log entry, the code never breaks - it just keeps writing the log entries. I tried to attach my service to the running process via Debug | Attach to Process (in VS 2005), but in the list of Available Processes, my process is...
2
1282
by: DSilent | last post by:
Hi guys, i have a problem with my windows service project. I already publish that to my localhost and install it. The installation file has been created. But at the same time, a message box appear to inform that i cannot start service from command line or debugger. I must install it first then start it using service management tools. Do anyone know whats going on.....?
0
1597
by: mrian84 | last post by:
I am trying to use Outlook Redemption 4.5 from a window service running as LocalSystem but I seem to have problems can anybody enlighten me on what to do? -I did try creating some profiles using ProfMan.dll but this failed to save the profile when running as localsystem. - I tried to call MAPIInitialise passing the MAPI_NT_SERVICE - I also tried to connect by calling MAPILogonEx with the MAPI_NO_MAIL flags MAPI_NT_SERVICE (After...
8
3368
by: Ollie Riches | last post by:
I'm looking into a production issue related to a windows service and System.Timers.Timer. The background is the windows service uses a System.Timers.Timer to periodically poll a directory location on a network for files and then copies these files to another location (on the network) AND then updates a record in the database. The file copying is performed before the database update because the file system is not transactional. The code...
0
1277
by: sudhivns | last post by:
Hi, How to run the COM server exe in 'Local System Account' rather than user previleges. ? While creating COM component anything to take care here. ?
0
8623
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
9113
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...
0
8977
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
8839
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
5837
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
4339
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...
0
4577
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
2269
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
1971
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.