Hey, Guys,
Does anyone have any experience working with Windows Services?
I’m trying to get a C# 2010 Windows Service running on Windows 7 to access a SQL Server 2008 R2 database and write to folders. Everything [the Service, the Database, and the Folders] is on the same PC. [This cannot change.]
So far, I’m running into horrific problems with access.
The same code runs beautifully as a console app [meaning that the file copies and database access actually happen]. However, when I run the Windows Service version of the code, both activities create exceptions.
Any ideas? :-/
P.S. The Windows Service code has been functioning correctly for over 4 years as a C# 2005 Window Service on Windows Server 2003 accessing a SQL Server 2000 database.
Darren R Yarbrough
Programmer Analyst III | IT Systems Support
AG National Leadership & Resource Center
1445 N. Boonville Ave. | Springfield, MO 65802
p: 417.862.2781 x3384 | f: 417.831.3754
www.AG.org
--
--
Springfield .NET Users Group - http://www.sgfdotnet.org
To post to this group, send email to sgfd...@googlegroups.com
To unsubscribe from this group, send email to sgfdotnet-...@googlegroups.com
For more options, visit this group at http://groups.google.com/group/sgfdotnet?hl=en
---
You received this message because you are subscribed to the Google Groups "Springfield .NET Users Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to sgfdotnet+...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
What account is the service running as? Does that account have access within SQL Server and the NTFS permissions you need?
--
Hi Darren,
I too have been running successful service (VB.NET in my case), first w/VS 2008, then 2010, and now 2012. Yes, the service credentials must have rights to both SQL and file system to access whatever resources it needs. There is no implicit requirement on services that they must access resource only on the box on which the service is running (perhaps this is not what you were saying) – this is rather a function of the account credentials you provide for the service and any performance considerations, for instance, network latency accessing remote resources. Hope this helps, -James
--
--
Springfield .NET Users Group - http://www.sgfdotnet.org
To post to this group, send email to sgfd...@googlegroups.com
To unsubscribe from this group, send email to sgfdotnet-...@googlegroups.com
For more options, visit this group at http://groups.google.com/group/sgfdotnet?hl=en
---
You received this message because you are subscribed to the Google Groups "Springfield .NET Users Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to sgfdotnet+...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.