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

  • SEARCH
  • Home
  • 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 8377049
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T15:34:15+00:00 2026-06-09T15:34:15+00:00

I use the following connection string when working on my dev machine: <add name=ApplicationServices

  • 0

I use the following connection string when working on my dev machine:

<add name="ApplicationServices" 
     connectionString="data source=.\SQLEXPRESS;Integrated Security=SSPI;AttachDBFilename=|DataDirectory|aspnetdb.mdf;User Instance=true" 
     providerName="System.Data.SqlClient" />

This works every time.

However, when I go to deploy to a remote IIS server that is a dedicated host (SQLEXPRESS should work just fine without the worries associated with a shared server), the same connection string results in a failure to connect to the database.

The database files are stored in App_Data within the directory of the application on the development environment and on the deployment environment. I just can’t seem to connect to the database on the deployment environment (although the file is sitting there).

Do I need to have my host somehow give me a username / password so I can add it to the connection string? Or do I need to change my connection string in some other way?

  • 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-09T15:34:16+00:00Added an answer on June 9, 2026 at 3:34 pm

    I’ve never used SQLExpress (well not in anger) but remember that once you’re on IIS you’re running under a different account than when you’re debugging. This would be the account under which the IIS app pool is configured to run. So, when you say you want to use integrated security to access this database, you need to configure it to recognize that particular account (whichever it is, for example NETWORK_SERVICE).

    In a hosting environment you’re probably better off just using SQL authentication, although that’s obviously less secure since you have to store the password somewhere. And you’d still have to change the DB security settings.

    Otherwise, if you do know the account under which the app pool is running then it’s just a matter of configuring the DB to accept connections from it.

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

Sidebar

Related Questions

I use the following code: - (NSURLRequest *)connection:(NSURLConnection *)connection willSendRequest:(NSURLRequest *)request redirectResponse:(NSHTTPURLResponse *)response {
If I use the following to add a UIView subclass in the subviews collection:
I just use following code to add an image to my project, var paper
I use following style attribute so when i will start typing in text box
I use following code: Create a retry policy, when error, retry after 1 second,
When i use following: var child:DisplayObjectContainer = dso.getChildAt( dso.numChildren -1 ) as DisplayObjectContainer; trace(child);
for example i use following command to find a record SELECT `users`.`mail` FROM `users`
I would like to use following sql to avoid constructing sql dynamically: SELECT CommentID,
I use VS2010, C# to develop Silverlight 4 app, I use following code in
I want preserve original value of target field and use json_decode to use following

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.