16,012,759 members
Sign in
Sign in
Email
Password
Forgot your password?
Sign in with
home
articles
Browse Topics
>
Latest Articles
Top Articles
Posting/Update Guidelines
Article Help Forum
Submit an article or tip
Import GitHub Project
Import your Blog
quick answers
Q&A
Ask a Question
View Unanswered Questions
View All Questions
View C# questions
View C++ questions
View Javascript questions
View Visual Basic questions
View .NET questions
discussions
forums
CodeProject.AI Server
All Message Boards...
Application Lifecycle
>
Running a Business
Sales / Marketing
Collaboration / Beta Testing
Work Issues
Design and Architecture
Artificial Intelligence
ASP.NET
JavaScript
Internet of Things
C / C++ / MFC
>
ATL / WTL / STL
Managed C++/CLI
C#
Free Tools
Objective-C and Swift
Database
Hardware & Devices
>
System Admin
Hosting and Servers
Java
Linux Programming
Python
.NET (Core and Framework)
Android
iOS
Mobile
WPF
Visual Basic
Web Development
Site Bugs / Suggestions
Spam and Abuse Watch
features
features
Competitions
News
The Insider Newsletter
The Daily Build Newsletter
Newsletter archive
Surveys
CodeProject Stuff
community
lounge
Who's Who
Most Valuable Professionals
The Lounge
The CodeProject Blog
Where I Am: Member Photos
The Insider News
The Weird & The Wonderful
help
?
What is 'CodeProject'?
General FAQ
Ask a Question
Bugs and Suggestions
Article Help Forum
About Us
Search within:
Articles
Quick Answers
Messages
Comments by TolgaKaradayi (Top 1 by date)
TolgaKaradayi
29-Dec-11 4:05am
View
Thank you for your interest SAKryukov.
Here is my stuation:
I have two windows applications.App A the main application and app B doing some stuf to to app A work properly.Both of them using same mssql instance and two databases mostly the sql server is working on a 2003 or 2008 r2 server.I have two services a web service working on a host on somewhere and a win service working on the same local server that sql instance runs.Win service listens TCP connections from app B and comminicates with web service and returns some data.But to do that win service must query data base that app A using.
The main problem is win service must find a way to read connection string to connect sql instance from somewhere on local server.
I have a setup that diploys both two applications, asking sql instance and database parameters and creating a data base for two applications.Win service set up is different.Two applications reading connection string from app A application config file.
So how can win service read connection string?
Note:Win service is runing under NT AUTHORITY\NETWORK SERVICE.