?
Solved

Windows service question

Posted on 2005-03-25
3
Medium Priority
?
170 Views
Last Modified: 2012-05-05
Hi

      I created a simple windows service. This will write a text file to a mapped drive. This code works if I run it on a windows form. But it gives a "Access denied" error when I run it from a windows service.

    Could anyone advice me what might be happening.

Thanks
0
Comment
Question by:b3cf
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
3 Comments
 
LVL 4

Accepted Solution

by:
imperial_p79 earned 200 total points
ID: 13635665
check the user account that you have specified to run the windows service. By default it will use aspnet user account to run, which wouldnt have access to mapped drive. In such case run the windows service with the user credentials that has permissions to the shared drive. Go to services panel -> navigate to your service --> right click properties and go to 'log on' tab. chose 'This account' and provide your userid/pwd which has access to the shared drive.

Hope this helps!
0
 

Author Comment

by:b3cf
ID: 13855515
Thanks
0

Featured Post

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Well, all of us have seen the multiple EXCEL.EXE's in task manager that won't die even if you call the .close, .dispose methods. Try this method to kill any excels in memory. You can copy the kill function to create a check function and replace the …
It’s quite interesting for me as I worked with Excel using vb.net for some time. Here are some topics which I know want to share with others whom this might help. First of all if you are working with Excel then you need to Download the Following …
NetCrunch network monitor is a highly extensive platform for network monitoring and alert generation. In this video you'll see a live demo of NetCrunch with most notable features explained in a walk-through manner. You'll also get to know the philos…
In this video you will find out how to export Office 365 mailboxes using the built in eDiscovery tool. Bear in mind that although this method might be useful in some cases, using PST files as Office 365 backup is troublesome in a long run (more on t…
Suggested Courses

764 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question