473,387 Members | 1,493 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

unable to access share from Windows service

Hi,

I have a VB.net windows service that loks up when I attempt to access a
share. The code work fine if I run it in the development environment. The
code is as follows:

Dim sharename as string = \\server\folder\sfolder1

if (not system.Io.directory.exists(sharename)) then
System.io.directory.CreateDirectory(sharename)
end if

I suspect this is a security issue, but I am running the service under my
account and I can execute this code. I can also perform the operations in a
DOS box.

Thanks,

jerry
Jul 21 '05 #1
1 1902
JerryK wrote:
Hi,

I have a VB.net windows service that loks up when I attempt to access a
share. The code work fine if I run it in the development environment. The
code is as follows:

Dim sharename as string = \\server\folder\sfolder1

if (not system.Io.directory.exists(sharename)) then
System.io.directory.CreateDirectory(sharename)
end if

I suspect this is a security issue, but I am running the service under my
account and I can execute this code. I can also perform the operations in a
DOS box.

Thanks,

jerry


This is becaus you are not running under a user account. You can have
the service use a different account, but then you can't allow desktop
interaction.

Schneider
Jul 21 '05 #2

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

Similar topics

4
by: Jason Hurder | last post by:
Hello folks, I am experiencing a rather strange problem. I have written a service that attempts to open a file on a network share via a FileStream object. When I try to open the file from my...
1
by: soni29 | last post by:
hi, i'm running windows 2000 and Internet Information Services 5.0, that's the version that the help file for iis shows, i'm using Visual Studio ..Net 2002 (version 7) but whenever i try to create...
16
by: Serdar Kalaycý | last post by:
Hi everybody, My problem seems a bit clichè but I could not work around. Well I read lots of MSDN papers and discussions, but my problem is a bit different from them. When I tried to run the...
1
by: James Proctor | last post by:
Hi there, im brand new to ASP. Ive done loads of VB coding and one of my clients is intrested in a web based application, so im trying to play on and learn it a tad. However im comming across lots...
6
by: Bruce | last post by:
I am doing development work on an asp.net app and a web service on a Win XP Pro SP2 development workstation, using vs.net 2003. For reasons that I wont try to explain here, I recently moved the...
2
by: Dave Stewart | last post by:
I am attempting to write a vb.net windows service that will automate various file movements on my network. When I attempt to access files on a mapped drive or UNC file share, I get exceptions...
1
by: JerryK | last post by:
Hi, I have a VB.net windows service that loks up when I attempt to access a share. The code work fine if I run it in the development environment. The code is as follows: Dim sharename as...
6
by: kmpodury | last post by:
PLEASE HELP!!!!!! Here is the exception that I am getting Exception: System.ArgumentException Message: The directory name W:\AudioFiles is invalid. Source: System at...
3
by: Tom | last post by:
Is it possible to access (Read via StreamReader) an external file from a Wndows service? I.E. In the OnStart method of the service, I need to go out and read a couple of external files (and these...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
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,...
0
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...

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.