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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 6, 20262026-06-06T09:36:14+00:00 2026-06-06T09:36:14+00:00

I have built an ASP.NET MVC 2 website that I am hosting with Rackspace

  • 0

I have built an ASP.NET MVC 2 website that I am hosting with Rackspace Cloud Server using IIS 7.0.

When I try to test the website under localhost with IIS 7.0 on the server I get an error page. This comes from the SQL logs (I am using SQL Web Edition):

Error: 18456, Severity: 14, State: 11
Login failed for user 'IIS APPPOOL\DefaultAppPool'. Reason: Token-based server access validation failed with an infrastructure error. Check for previous errors. [CLIENT: <local machine>]

My website works fine on my home PC so the issue is something to do with connecting with the database.

Having researched the error message code it suggests that I have a valid DB login but server access has failed. I did a stack of reading around this on various forums (incl. stackoverflow / serverfault) and here is what I have tried, none of which have solved the issue:

  1. Set up new login using SQL Server Authentication. I created a new login in SQL and gave correct access rights to my DB. I used following connection string in web config:

    Data Source=myServer;Initial Catalog=myDB;User Id=myUsername;Password=myPassword;

  2. Create new login as IIS APPPOOL\DefaultAppPool. I created new login in SQL with correct access rights and used windows authentication. Connection string as follows:

    Server=myServer;Database=myDataBase;Trusted_Connection=True;

  3. Use existing network login NT AUTHORITY\NETWORK SERVICE. I mapped this user to my database with correct access rights. Connection string as follows:

    Server=myServer;Database=myDataBase;Trusted_Connection=True;

These appeard to be the main options as I read through material online. Finally, here as some other things that may be helpful:

  • Setting SQL to run as administrator did not solve the issue
  • Turning off UAC did not help
  • My application pool is using ApplicationPoolIdentity (best for security reasons)

In short, my website won’t start because it cannot get an object from the DB so throws an error. The issue is that access rights to the server are not set correctly. I cannot work out what configuration of SQL login / connection string / domain access rights I need.

This has vexed me for 3 weeks – can you spare 5 mins to help me please?

  • 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-06T09:36:16+00:00Added an answer on June 6, 2026 at 9:36 am

    Since your servers (web and SQL) are not part of a domain, you can’t use Windows Authentication (Integrated Security) to connect to SQL Server.

    In IIS, when having Integrated Security=SSPI in a connection string, the actual user used to connect to SQL Server is the application pool identity.

    You should go with your option 1, meaning Set up new login using SQL Server Authentication.

    So, the steps would be:

    1. Create your myUsername SQL Server user.
    2. In the user’s properties dialog, go to the Securables section and make sure Public is checked.
    3. Next, move to the User mapping section (in the left side). Look for your database(s) in the list and check it. Down below, in the Database role membership list, make sure you check public, db_datareader and db_datawriter.
    4. Now give your user rights to execute stored procedures. As sa, in Management Studio, execute:

      GRANT EXECUTE TO myUserName;

    5. You’re done.

    As for security, you can later refine the rights of myUserName to not be able, for example to drop tables or other objects.

    In your application you should use now the connection string at your point 1.

    If you have any other problems, then please post the error message.

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

Sidebar

Related Questions

Hi, I have built a ASP.NET MVC website that uses Membership, this works fine.
I have an existing complex website built using ASP.NET MVC, including a database backend,
I have an asp.net mvc app running on a local iis website that is
I have a site built using asp.net mvc running on IIS 7 using integrated
I have built a MVC website on IIS6. I used the built-in ASP.NET Security
I have a layered web application that I built with ASP.NET MVC 4, WebAPI
I am using the built-in forms authentication that comes with asp.net mvc. I added
I have a website built in asp.net mvc 3 which uses the repository pattern
I have made a MVC application that uses the built-in ASP.NET login functions. It
In IIS 5.1, I have setup a website to point to my ASP.NET MVC

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.