网络驱动器访问的Windows服务问题 [英] Windows service problem with network drive access

查看:80
本文介绍了网络驱动器访问的Windows服务问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,


我创建了一个具有文件监视器的Windows服务,并在读取该文件后执行了一些操作。我在我的本地机器上开发它并在服务器上安装服务。我根据服务器驱动器更改了文件路径和everythng。


我们办公室里的所有人共享一些网络驱动器,其中ppl将继续粘贴该文件,服务器上的服务必须接收它。它不做什么。当我将它粘贴在netwrok驱动器文件夹中时,它会拾起并正常工作。但当其他人做这项服务不起作用。当我检查服务器时,服务已经停止。我不得不手动启动它。


我研究了很多,发现windows服务不能访问网络驱动器。我尝试将安装程序设置为localservice,localsystem和网络服务。 nothng工作。我应该试试用户吗?我认为它不会工作,因为很多人必须使用这项服务。他们所有人都对网络驱动器具有读写权限。


我不明白我在这里缺少什么。为什么该服务停止为其他用户。如果有人可以对此有所了解,那就更好了。


谢谢

Ayush

Hi all,

I have created a windows service that has a file watcher and does some operation after it reads that file. i developed it in my local machine and installed the service on server. i have changed the file path and everythng according to server drives.

we all in the office share some network drives in which ppl will keep pasting that file and the service on server has to pick it up. which its not doing. when i paste it in netwrok drive folder it picks up and works properly. but when someone else does that service doesn''t work.when i check in the server the service has stopped. i had to start it manually.

i researched alot and found that windows service donot access network drives.i tried setting up installer acount to localservice, localsystem and also network service. nothng works. should i try user? i assumed it wont work since lot of them have to use this service. also all of them have read and write permissions to the network drive.

i dont understand what am i missing here. why does the service stop for other users. it''l be gr8 if someone can throw some light on this.

Thanks
Ayush

推荐答案

大家好


让我让我的问题更加清晰。我在本地系统中创建的Windows服务安装在服务器上。每个人都访问一个网络驱动器,该驱动器是服务器中的一个文件夹。


现在我的服务工作正常。但是tte问题是当某些用户使用该网络驱动器时它会停止。就像我把一个文件放在它接收的网络驱动器中,当用户b放置一个文件时它按预期工作,但是一些用户c将一个文件放在该网络驱动器中,它不起作用,当我进入并检查时,该服务实际上停止了,我必须重新启动服务。它很奇怪。


我已经为此重新研究了3天。这真是令人沮丧。如果有人有任何线索请告诉我,我将研究这个方向。


谢谢,

Ayush
Hi all

let me make my question a little more clear. the windows service that i have created in my local system is installed on a server. and everyone accesss a network drive thats one of the folder in the server.

now my service works fine . but tte problem is it stops when some users use that network drive. like i put a file in that network drive it takes in, when user b puts a file it works as expected, but some user c puts a file in that network drive, it does not work and when i go in and check, the service actually stops and i have to restart the service. its wierd.

i have been reseraching for 3 days for this. this is really frustating. if anyone hasany clue pls let me know and i will research in that direction.

thanks,
Ayush


您在服务中进行任何错误检查吗?是否打印出程序中各个地方的日志?
Are you doing any error checking in your service? Have it print out logs of what is going on at various places in the program?





谢谢你的回复。我在本地计算机上调试了服务。没有错误。我无法在服务器上调试它。当我检查服务器上的事件日志时,它说服务意外终止。


我不明白为什么它会为某些用户而不是其他用户运行。它为我和管理员的创作者工作。它不适用于其他用户。只要另一个用户访问该网络驱动器,服务就会停止。


Ayush
Hi,

Thanks for you repaly. I debugged the service on my local machine. there are no bugs. i cannot debug it on the server. when i checked the event log on server it says service has terminated unexpectedly.

i dont understand why is it runing for some users and not for other users. its working for the creator that is me and admin. its not working for other users. service just stops as soon as another user access that network drive.

Ayush


这篇关于网络驱动器访问的Windows服务问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆