Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / .NET Framework / New Users / July 2007

Tip: Looking for answers? Try searching our database.

Windows service Database Problem

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Taduri - 15 Jul 2007 23:06 GMT
Hi,

I am creating a windows service in C#, it just opens an exe file that was
developed in VB, the exe file having a GUI and connects to DB using system
DSN (using login details sa/master)

I am using code:

Process p;
string FilePath = @"C:\vb_file.exe ";
string arg = " /send";
p = Process.Start(FilePath, arg);

Note : Service Interactiing with Desktop option is selected

Once I started service and checked Event Viewer -> Application log ..it is
showing below error...

Event Type: Error
Event Source: VBRuntime
Event Category: None
Event ID: 1
Date: 7/13/2007
Time: 9:33:41 AM
User: N/A
Computer: xxxx
Description:
The VB Application identified by the event source logged this Application
vb_file: Thread ID: 2704 ,Logged:
vb_file Rev. 30-Apr-03T /send /RESTART
ODBC condition 18456, State=28000, RetCode=-1
28000: [Microsoft][ODBC SQL Server Driver][SQL Server]Login failed for user
'sa'.

But If I do.... Start -> Run    and

C:\vb_file.exe /send

it is working and displaying GUI....and not throwing any error...

Please help...

Thanks
Signature

Taduri

Frank Hickman - 16 Jul 2007 02:25 GMT
> Hi,
>
[quoted text clipped - 40 lines]
>
> Thanks

Most likely due to the VB app being launched from a non-user, i.e. service,
account.  Try to setup the service to either run as a local account or check
into the impersonation APIs.

Signature

============
Frank Hickman
NobleSoft, Inc.
============
Replace the _nosp@m_ with @ to reply.

shyam taduri - 19 Jul 2007 18:38 GMT
Hi Frank,

Thanks for reply..for service i am using local account...

Thanks
Shyam

EggHeadCafe.com - .NET Developer Portal of Choice
http://www.eggheadcafe.com

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.