Windows Service running does not connect to database

Asked

Viewed 67 times

1

Good afternoon guys. I created a 3-layer Solution for a windows services project. In debug I can search the database information and do the processes with the return. However, when I put the process to run on windows services does not work. I logged to know where this with the error and is precisely where you search the database information, IE, in App.config.

I’m suspicious that when doing the installutil command to put it in the processes is not going together with the dll’s of the Business and Data project.

Somebody’s had that problem before?

  • As dlls should be in the same directory as the executable, I suspect that your dlls data layer is not there. Copy all dlls from projects to the executable folder.

  • The worst thing is that they are in the same folder. To be sure, I took all of them and put them in another folder and remade the process. And yet it didn’t work.

  • Are you sure that all dlls referenced in the project are there? Another detail the file App.config also should be in this folder, it will take the name of your executávelthat is, if its executable is MeuApp.exe its configuration will be MeuApp.exe.config

  • Yes yes... Absolutely certain. :-(

  • And as for the file MeuApp.exe.config are with the correct connection settings?

  • Yes, so much so that in debug mode I can access the database information normally.

Show 2 more comments
No answers

Browser other questions tagged

You are not signed in. Login or sign up in order to post.