I am getting the following error while asp.net app trying to connect database.
Login failed for user 'IIS APPPOOL\myAppPoolName'.
'IIS APPPOOL\myAppPoolName' is not a valid name because it contains invalid characters. (Microsoft SQL Server, Error: 15006)
By default, custom application pools receive the 'Network Service' user credentials. Simply try adding a new login for your mssql server (and database, of course) for the 'Network Service' account. Read more here