# MS SQL Server with Windows Authentication

**URL:** <https://forum.radzen.com/t/ms-sql-server-with-windows-authentication/5657>\
**Category:** Angular\
**Created:** [November 17, 2020, 3:09pm UTC](https://forum.radzen.com/t/ms-sql-server-with-windows-authentication/5657 "2020-11-17T15:09:11Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Stan\_Marko](https://forum.radzen.com/user_avatar/forum.radzen.com/stan_marko/32/4816_2.png) [@Stan\_Marko](https://forum.radzen.com/u/Stan_Marko)\
**Post date:** [November 17, 2020, 3:09pm UTC](https://forum.radzen.com/t/ms-sql-server-with-windows-authentication/5657/1 "2020-11-17T15:09:11Z")

</div>

When deploying to Windows Server 2016 my crud pages that rely on Windows Authentication fail to load, However I have one crud page that uses SQL authentication and that one works perfectly. During my initial testing on a Windows 10 pro machine both ran correctly. I assume there is an extra prep step that server 2016 needs that Windows 10 did not. Any idea(s) on what these step(s) would be?

---

<div class="post-metadata">

**Author:** ![enchev](https://forum.radzen.com/user_avatar/forum.radzen.com/enchev/32/16_2.png) [@enchev](https://forum.radzen.com/u/enchev)\
**Post date:** [November 17, 2020, 3:14pm UTC](https://forum.radzen.com/t/ms-sql-server-with-windows-authentication/5657/2 "2020-11-17T15:14:08Z")

</div>

You need to add IIS APPPOOL\DefaultAppPool to your SQL Server logins:

 ![image](https://forum.radzen.com/uploads/default/original/2X/a/a805f2ede6061697b7db0a0b2978eac765b967d5.png)

---

<div class="post-metadata">

**Author:** ![Stan\_Marko](https://forum.radzen.com/user_avatar/forum.radzen.com/stan_marko/32/4816_2.png) [@Stan\_Marko](https://forum.radzen.com/u/Stan_Marko)\
**Post date:** [November 17, 2020, 4:17pm UTC](https://forum.radzen.com/t/ms-sql-server-with-windows-authentication/5657/3 "2020-11-17T16:17:57Z")

</div>

> [@enchev](#):
>
> IIS APPPOOL\DefaultAppPool

For further clarification, if sql server instance is on another VM. Would installing IIS on the SQL server, trick into allowing the login? Or would i need to to change the service accounts the IIS server to domain accounts? And if so what all service would i need to change to domain service accounts?

---

<div class="post-metadata">

**Author:** ![korchev](https://forum.radzen.com/user_avatar/forum.radzen.com/korchev/32/4_2.png) [@korchev](https://forum.radzen.com/u/korchev)\
**Post date:** [November 17, 2020, 4:52pm UTC](https://forum.radzen.com/t/ms-sql-server-with-windows-authentication/5657/4 "2020-11-17T16:52:14Z")

</div>

Hi @Stan_Marko,

This question does not seem related to Radzen. It is about Windows authentication in SQL server across different machines. We do not provide support for that here - I recommend searching online.

---

<div class="post-metadata">

**Author:** ![Stan\_Marko](https://forum.radzen.com/user_avatar/forum.radzen.com/stan_marko/32/4816_2.png) [@Stan\_Marko](https://forum.radzen.com/u/Stan_Marko)\
**Post date:** [November 18, 2020, 3:47am UTC](https://forum.radzen.com/t/ms-sql-server-with-windows-authentication/5657/5 "2020-11-18T03:47:07Z")

</div>

Okay the eventual fix was to add "Domain\IISServerName$" as a user and then give that account User Mapping Permissions as **db\_datareader** and **db\_dataweriter** for the DB's that it needed access to.

Note $ has to to added to be added to the end of the server name for it go into sql.

Edit: What I don't understand is why Windows pro iis didn't need those extra steps, while windows server 2016 IIS did need those additional steps to work.
