Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8262319
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 8, 20262026-06-08T03:43:17+00:00 2026-06-08T03:43:17+00:00

I have a local windows managed service that is trying to connect to a

  • 0

I have a local windows managed service that is trying to connect to a local instance of SQLExpress and am hitting a brick wall wrt the connectionstring / the authentication that the local service needs to use.

Here is the config for the managed service

<add key="..." value="Data Source=<machineName>\SQLEXPRESS;Persist Security Info=True; Integrated Security=True" />

The interesting thing is that this works but only provides access to the master db. It does not give any access to the actual db that the service needs. I have tried all sorts of possibilities in SQL Management Studio re giving access / security / user but to no avail.

I have tried using initial catalog but get a security exception

<add key="..." value="Data Source=<machineName>\SQLEXPRESS;Persist Security Info=True;inital catalog=<dbName>; Integrated Security=True" />

I am also working on the assumption that

a. The Log-on used by the managed service is a red herring and this is indeed a SQLServer issue.

b. If the SQLServer were not local then the managed service would need AD credentials.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-08T03:43:19+00:00Added an answer on June 8, 2026 at 3:43 am
    1. To gain access to a particular DB other than master you need to add:
      “Initial Catalog=MyDatabase;” (without quotes) to your connection string.
    2. The service logon account must be granted logon privileges to SQL Server Express
    3. The service logon account must have a user mapping in the database(s) you wish to access from the service.

    The last two steps can be accomplished from SQL Server Management Studio.

    Happy coding

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a Windows service that runs as a logged-in user (local admin). During
I have a windows service that uses WCF to connect to other services. It
I have a C# 2.0 windows service (100% managed code) and occasionally when it
I have created a Windows Service that has a function that creates a new
I have a local windows app written in java, kind of crm. Employees register
I have my intranet app with windows authentication. On my local machine I run
CF9, Windows Server 2008 Standard, IIS7, mySQL 5.1.48 community. I have managed to get
I have an issue with windows services, my application registering Windows service but when
I have a web service running in IIS 6.0 on Windows 2003. It's authentication
I have a Windows Vista PC with IIS7, I have managed to manually install

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.