tags:

views:

65

answers:

1

i created a ruby application and its working fine but when i run it as service it giving trouble. actully i have mysql as a databse in my application and i am using it to store only name of the file and placing the physical file on sambha server now when i run my applioaction as as service it's not able to find the path of sambha server... any hlep...

+2  A: 

What user account is running the service? Windows defaults to using the local SYSTEM account, which cannot/should not access the network. If you change the service to run under the "Network Service" or a specific user account, it may succeed.

ewall
ewall thanks for your response but how do i know under which account my service is running . and i do i change it to run under "Network Service" or specific user accountplzz reply i am waiting for ur response...
Amit singh tomar
In the "Services" control panel, right-click on your service name and choose "Properties". The second tab called "Log On" is where you can change the user account.
ewall
that fied is blank ewall...,how to i run it as netwrok service
Amit singh tomar
yaa its running under local SYSTEM account
Amit singh tomar
Er, nevermind the "Network Service" in this case... just put in a valid user account and password and see how it works.
ewall
ewall i login as valid user account and password and it works but soon after i restart the service same problems comes again,what to do
Amit singh tomar
as i said i am using samba server to store my physiacl files ,drive letter i am using is z:/streams and error is also No such file or directory - Z:/streams/stack.txtis it unc problem path
Amit singh tomar
You can't use a mapped drive letter like `Z:\streams\stack.txt`, you need to use a UNC path like "\\servername\sharename\streams\stack.txt`.
ewall
but ewall how do i set the path like my share is on xxx.xx.xx.xx on machine ip like when i start it windows run box i have to type like \\132.122.207.22\ajay and that is equal to z ,and when i did like //z/streams i am getting like permission denied how do i acces network share uder application ruuing as service
Amit singh tomar
When your program is running as a service, there is no drive mapping `z`. Be sure to use backslashes in the UNC path, like `\\132.122.207.22\ajay` is a valid UNC path, as is `\\132.122.207.22\ajay\streams\stack.txt`.
ewall
Thanks ewall i'm able to figure out my problem
Amit singh tomar