If we develop an ASP.NET (MVC) Web site using the ASP.NET Development Server and SQL Server database in use does, at first everything easily.If, however, for the development of a "real" IIS 7.x, eg Windows 7, we obtain the database access, the following exception:The solution is pretty simple - you have the Application Pool Identity "IIS AppPool \ mvcapp" assign to the users in the database.Unfortunately, this does not do this with the SQL Server Management Studio. Although you can insert the name of the Application Pool Identityand be validated by "Check Names"After clicking "OK", but you get the error message that the user was not found:A solution to generate the login via script:CREATE LOGIN [IIS AppPool \ MyPool] FROM WINDOWS WITH DEFAULT_DATABASE = [master] USE [mydatabase] CREATE USER [IIS AppPool \ MyPool] FOR LOGIN [IIS AppPool \ MyPool] Then you can assign the SQL Server Management Studio, the permissions so that the website works with the Application Pool Identity.
Related posts
HostForLIFE is European Windows Hosting Provider which focuses on Windows Platform only. We deliver on-demand hosting solutions including Shared hosting, Reseller Hosting, Cloud Hosting, Dedicated Servers, and IT as a Service for companies of all sizes.
We have offered the latest Windows 2019 Hosting, ASP.NET 5 Hosting, ASP.NET MVC 6 Hosting and SQL 2019 Hosting.
Sign in