Skip to main content

Posts

Showing posts with the label IIS

How to access a remote SQL Server Database (not exist in same network domain) from ASP.NET Web Application Without Credentials

How to access a remote SQL Server Database (not exist in same network domain) from ASP.NET Web Application Without Credentials. Enable the Windows Authentication | Trust Domain | Impersonation / Delegation vs. Trusted Subsystem | Using Constrained Delegation through Multiple Tiers | Application Pool Settings/ ASP.NET Security Content Page /Web.Config encrypt/ SPN Double Hop Issues for IIS Server & SQL Server As I mentioned in my previous post about " How to access SQL Server Database from ASP.NET Web Application Without Credentials ", I just continued my research towards finding a better approach for enable the Windows Integration Authentication between Web Server (IIS) and SQL Server that exists in different network domain or remote server. During this span of analysis, I found various new technical terms such as “Trust Domain”, “User Delegation”, ”Set SPN”, which are basically Windows Active Directory and Domain oriented changes that should be done by System Administra...

Fix: “Login failed for user '(null)'. Reason: Not associated with a trusted SQL Server connection" and "cannot open database requested by the login the login failed login failed for user"

Access a SQL Server Database from ASP.NET Web Application through Windows Authentication | Integrated Security=SSPI in Web.Config.     In this post, let's learn how to access the SQL Server Database from ASP.NET Web Application through Windows Authentication and what are the changes required in SQL server connection string in details. In general, we used to define the Connection String in Web.Config file to connect a database from a Web Application. That means SQL Server login credentials (User ID and Password) are maintained in Web.Config file as plain text which is not a secured approach. To overcome the security issue, we can implement standard Encrypt and Decrypt mechanism (System.Security.Cryptography) so that credentials can not be stolen or tampered very easily. However, the requirement taken into consideration here is completely different that is “we need to enable the Windows authentication instead of SQL authentication so that credentials need not be stored in co...