Quantcast
Channel: ASP.NET Core
Viewing all articles
Browse latest Browse all 9386

SQL server Authentication Vs Windows Authentication - asp.net core Web API - 500 error - IIS 7.5

$
0
0

Hello All,

I have very weird issue while deploying asp.net core web api application to IIS 7.5.

If I am using SQL Server authentication mode for SQL Server 2012 R2, and set below connection string in "appsettings.json" file, then there is no error while accessing web api,

success Case:

{"ConnectionStrings": {"SchedulerConnection": "Server=ABC\\SQL2012;Database=SchedulerDb;user id=sa;password=XYZ;"
}
}

But while I am using windows authentication mode for SQL Server 2012 R2, then after hosting asp.net core web api to IIS, I am getting"500" Internal Server Error.

Fail Case:

{"ConnectionStrings": {"SchedulerConnection": "Server=ABC\\SQL2012;Database=SchedulerDb;persist security info=True;Integrated Security=SSPI;"
}
}

What setting I need to make to run web api using sql server windows authentication??


Viewing all articles
Browse latest Browse all 9386

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>