Wednesday, 4 November 2015

Setup IIS 7 AppPool Identities as SQL Server Logons

C# application can access SQL Database and fetch the data when it runs in IIS Express but cannot connect to SQL Database when runs in IIS. To solve the problem, IIS APPPOOL\AppPoolName must be created and have control over the desired database. To do this:
  • In SQL Server Management Studio, look for the Security folder (the security folder at the same level as the Databases, Server Objects, etc. folders...not the security folder within each individual database)
  • Right click logins and select "New Login"
  • In the Login name field, type IIS APPPOOL\AppPoolName - do not click search
  • Fill whatever other values you like (i.e., authentication type, default database, etc.)
  • Click OK

'AppPoolName' can be fine by:
  • Select the desire website in IIS
  • Click on Basic Bindings
  • Application Pool Name will be the values of the 'Application Pool' 



    No comments:

    Connect PowerBI to SQL Server - TrustServerCertificate

    Under the server that Power BI installed,  Go to System Properties -> Advanced -> Environment Variables  Add this Variable Name PBI_S...