Thursday, May 10, 2012

IIS Application Pool Identity access to SQL Server

I recently had a need to connect to a SQL Server Express 2008 R2 instance using the 'Integrated Security=SSPI" option in my connectionString setting. Of course when I ran the site the first time, I got an error stating that IIS APPPOOL\{MyApplicationPoolName} could not access the database. So after a little searching, I found this post ApplicationPoolIdentity IIS 7.5 to SQL Server 2008 R2 not working. on the IIS Forums that provided the proper steps to grant the Application Pool Identity access to the database.


The necessary steps from the post are below for reference.


In SQL Server Management Studio ...
    • connect to your SQL Server and navigate to Security - Logins in Object Explorer.
    • Add a new login:
      • Create a Windows login with the name of your application pool. Use the virtual domain name "IIS AppPool", like: "IIS AppPool\{YourApplicationPoolName}"

        (Dont' forget to use the real application pool name after the backslash, e.g.: "IIS AppPool\DefaultAppPool")
      • Assign the new login to your database(s) in the User Mapping page of the New Login dialog.
        Give it any user name you find appropriate.
      • Save and close the New Login dialog.
    • In Object Explorer ...
      • Navigate to your database, then navigate to Security - Users
      • Navigate to your new user and set permissions according to your needs.

4 comments:

Carol Bruns said...

This was the same error once I faced too but with the help of my friend I did get it solved. Actually the thing is that now I am getting to know what exactly the problem was.

Unknown said...

Good details about access to sql server.

VB6 to C# | Migrate Access to SQL Server

Lafay Tech Plaza said...

Data migrationis the process of moving a database, or a set of data, from one environment to another. It can be from one database or file format to another, or involves moving the data to a different platform or computer. Data migration can be manual or automated, depending on whether it is done by a person or a computer script.

Best software development in canada said...

best software Development Company in Canada

Imagine the trajectories of Business Goals, Engineering, Design, and Programming dynamically merging to deliver great software. This is the spirit of Trajectus.
Each project is a unique undertaking. Best software development company in Canada.
Our goal is to work with our customers to understand your business objectives, engineer a proficient platform, create a beautiful interface, and create clean code. The key to success is ensuring the project's core business needs are met. We’ll work with you to ensure there is a clear understanding of the core business needs.

We approach software challenges with the idea of engineering the best solution, utilizing the best technologies, to solve a business goal. You’ll often find our competitors have assembled talent that corresponds to the preferred language of its leadership or aligns itself with a certain technology stack. We approach each business challenge or partnership as a unique opportunity. As a true engineering company, it’s important to look at all the potential technologies in the market. Trajectus blends good Engineering Principles, a sound Project Management Methodology, and a diverse team of technologists to form solutions to meet the needs of our clients. Our project methodology enables us to leverage a distributed agile software development environment. The Trajectus team is comprised of experienced Architects, Designers, Project Managers, Business Analysts, and experienced Business Development personnel. Our team members possess a diverse set of technology skills and we have an extensive network of specialists. Team members are located throughout the US and our Offshore Delivery center is based in Hyderabad, India. Our methodology enables us to utilize US resources to engage in an in-depth collaborative development process while leveraging skilled resources to minimize distributed risks, bringing affordability to our clients.
We deliver high quality solutions at a fair price while achieving our targeted deadlines. Most importantly, we are going to produce software to meet your goals.