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:

    Setup Windows Local Account without the Internet

    During the Windows setup,  On the WiFi screen, press SHIFT + F10  or  FN + SHIFT + F10  This will open the command prompt window with admini...