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 8741641
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T11:21:11+00:00 2026-06-13T11:21:11+00:00

Running SQL Server 2008 R2 and ASP.NET MVC 2 web application on the Virtual

  • 0

Running SQL Server 2008 R2 and ASP.NET MVC 2 web application on the Virtual Server of big german hosting-provider.

I have a problem to connect to the SQL Server.

On localhost this connection string works fine:

 @"Data Source=LOCAL-HP;Initial Catalog=OnlineVertrag;Integrated Security=True";

I’m using a similar connection string on the server:

@"Data Source=MYSERVER\SQLEXPRESS;Initial Catalog=OnlineVertrag;Integrated Security=True";

but nothing happens over there.

Here is my project which I am trying to connect: http://www.hotcont.eu/OnlineVertrag/Home

  • 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-13T11:21:12+00:00Added an answer on June 13, 2026 at 11:21 am

    Based on your comments, your SQL instance on the server has a username/password combination. You cannot use the integrated security connection for a SQL Server connection requiring SQL authentication.

    Using the login information provided to you by your host, you should update your connection string to the following:

    Server=MYSERVER\SQLEXPRESS;Database=OnlineVertrag;User Id=myUsername;
    Password=myPassword;
    

    Taken from ConnectionStrings.com

    EDIT

    Ok – I think I know what you are dealing with now. You have a virutal machine hosted on a large hosting provider -> meaning that you have control over the machine itself (aka Remote Desktop Management or something?)

    The SQL connection string that I provided is for use with SQL server accounts -> meaning those that you actually create within SQL server itself. The SQL connection string that you provided uses the current logged in user’s user account information from Windows to connect to SQL.

    So here is the disconnection between localhost and the virtual server. When you are running on localhost, I am going to assume that you are using the built in web server to Visual Studio or some equivalent. Most often, during debugging, the web application is running under the Logged in user of the machine – aka: you. You have permission to your own SQL database, thus no issue. BUT…when you deploy your web application to an IIS instance, the web application is no longer running as the logged in user, but rather the identity of the application pool that is your app is a member of. Typically this is something like NETWORKSERVICE.

    You have three options available to you

    1. Enable and use SQL user accounts for connection from your web application and your SQL server. If you choose to go this route, you will need to use the connection string I provided above.

    2. Login to your SQL server and add the identity of your application pool to the Allowed Users of SQL server and your database.

    3. Change your application pool’s identity to an actual user account on the server (BAD IDEA)

    Most web applications go with the first option as it allows you do a few things such as create a distinct SQL user for each application that you host and as well as you can explicitly define permissions for the SQL user to each database that it may need access to (for instance, do not allow the SQL user to DROP tables).

    EDIT 2

    The way you are trying to connect sounds like it should be using the Shared Memory Protocol, but it might be trying to connect over TCP/IP. I forgot this earlier, but most installs of SQL are not setup to listen on the TCP/IP interface on first install. To check your configuration, click the start button (or orb or whatever Microsoft calls that now) -> All Programs -> Microsoft SQL Server 2008 -> Configuration Tools -> SQL Server Configuration Manager. This will open a new window with some options on the left hand side. Click the SQL Server Network Configuration. Ensure that TCP/IP and Shared Memory is set to enabled. If a 64 bit install, you should probably do this for both the SQL Server Network Configuration (32 bit) and the SQL Server Network Configuration

    http://msdn.microsoft.com/en-us/library/ms191294.aspx

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

Sidebar

Related Questions

We have an ASP.Net [MVC] web farm (Windows Server 2008 R2 running IIS). For
I have an ASP.Net 2.0 Web Forms Application using SQL Server 2008. The application
So I have few ASP.NET apps all running off SQL Server Express 2008 and
I am running windows server with asp.net websites and sql server 2008 and IIS
Until last week, I developed with SQL Server 2008 non-R2 and my ASP.NET MVC
I deployed an ASP.net MVC 2 application on my Windows Server 2008 IIS7 server
I have a ASP.NET application that connects to a SQL server backend on another
I have a web application running on Windows Azure. It is built with ASP.Net
I am deploying an ASP.NET application and SQL Server (2008) database on a live
I'm building a simple ASP.NET web application in VS 2008 with a SQL 2005

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.