Just curious as to best practice for managing db access from an asp.net web application. We were currently putting the username and password in the web.config, but this wasn't good enough internal security (obviously), so I decided to use a windows domain user instead by modifying the web.config to use windows domain, and then adding the user to the app pool identity. This all works fine, but what happens when the domain user's password changes? Does that mean that all the webapps that use this user's identity in app pool will require the password change too? This would be an IT nightmare. Does anyone have suggestions on best approach for allowing webapp to access database without exposing password and without having to update passwords in all webapps if the password changes? Thanks
How to manage passwords for database access from an asp.net website
1.5k Views Asked by u84six At
2
There are 2 best solutions below
3
Glenn Ferrie
On
I would recommend using SQL Mixed-mode Authentication and using a SQL account for your app. The username and password in the web.config and encrypt that section of the config file.
Here is some information about configuration encryption.
http://msdn.microsoft.com/en-us/library/zhhddkxy(v=vs.100).aspx
Related Questions in ASP.NET
- Create an IIS web request activity light
- Writing/Overwriting to specific XML file from ASP.NET code behind
- What is the point of definnig Asp.net Intrinsic Objects In different places and what is the different betwen them?
- Deleting Orphans with Fluent NHibernate
- IOrderedEnumerable to vb.net IOrderedEnumerable Conversion
- Entity Framework Code First with Fluent API Concurrency `DbUpdateConcurrencyException` Not Raising
- Getting deeply embedded XML element values
- What is best way to check if any of the property of object is null or empty?
- NuGet - Given a type name or a DLL, how can I find the NuGet package?
- ASP-MVC Code-first migrations checkbox not active
- How do i add onclient click to my jquery button
- Jquery: Change contents of <select> tag dynamically
- Retrieving data from Oracle database
- ASP.NET: Fill Textbox field upon dropdownlist selection by user
- Why web API return 404 when deploy to IIS
Related Questions in IIS-7
- Create an IIS web request activity light
- SSL certificate error 403.13 in IIS 7.5
- IIS 7 ERR_CONNECTION_TIMED_OUT only with public IP
- ASP.Net 1.1 app on IIS 7 waiting threads
- Node.js with Socket.io - Long Polling fails and throws "code":1,"message":"Session ID unknown" response
- Publishing a website under IIS 7 and getting ��Y�o�8�}���x��� (odd characters)
- ASP ProcessModel and WCF
- IIS Rewrite Rule for path
- What are the PHPMailer requirement for sending mail and receiving mail in IIS 7
- HTTP Error 405.0 - Method not allowed error in asp.net mvc 4 post method
- Deploying a classic ASP site from IIS 6 (2003 WS) to IIS 7 (WS 2008). Tried Manual deploy and msdeploy
- Unauthorized Access Exception on IIS7 virtual directory with proper permissions
- IIS 7 no images when friendly url is on
- Zend Application Redirection Not Working After Migrated on Windows with IIS
- Can I find out which user php is running under from php_info()
Related Questions in WEB-CONFIG
- IIS 7 ERR_CONNECTION_TIMED_OUT only with public IP
- Nop Commerce automatically redirecting to different URL
- How do you declare or use variables in web.config
- ASP.NET Webforms project is reading from a web.config in a completely different solution on my PC when debugging
- Issue with maxStringContentLength on WCF
- IIS Rewrite problems - catching all .php files
- Just want to change url in address bar but backend request will be same?
- How to store cookie permanently
- Web Config ConnectionStringCollection limitations
- Enterprise Library 6 - dynamically change log file name
- Deploying a classic ASP site from IIS 6 (2003 WS) to IIS 7 (WS 2008). Tried Manual deploy and msdeploy
- Exception of type 'System.Web.HttpUnhandledException' was thrown. while modifying web.config file
- Convert 404/500 or any other error code to 301
- Can't deny access to role in web.config authorization element
- how to authorize a specific page to be accessed anonymously in asp.net MVC using the web.config?
Related Questions in CONNECTION-STRING
- Connection string error between projects with EF
- Powershell Pass SQL connection object
- Unsure how to set C# Connection string depending on solution configuration
- Passing Connection From TableAdapter Produces connectionstring property has not been initialized
- Connection String Error in OleDB
- How to manage multiple connections for different users
- What is the connection URL to be used for Cassandra?
- I try to use connectionstring connect to netezza but can't truncate table
- "Unable to find the requested .Net Framework Data Provider", MySQL. tried using odbc too
- c# - Entity Framework ConnectionString won't update after changing App.Config in runtime
- What Database Information Applies to What Connection String Attributes
- How do I abstract and secure the same connection string from many applications centrally?
- Difference between InitialCatalog and Database Name
- SQL Server connection string with "$" in password
- ADODB Connection is empty, Unable to read CSV file
Related Questions in WINDOWSDOMAINACCOUNT
- Windows 7 Domain Account cannot read/write inside AppData folder
- .sqlproj publish scripts require domains and users that don't exist on development workstation. Are there workarounds?
- Is it possible to change domain account password remotely on a domain-joined server which is not DC?
- Windows service - use domain account and run with admin privileges
- Domain credentials for a WebClient class don't work
- How to determine if the request is coming from a particular windows domain
- Powershell Search for AD Users
- How to formate JNDI to authenticate with a domain user instead of SQL user
- Get the ID? of the current user like SharePoint can?
- Is it possible/advisable to run multiple sites app pools using the same domain account
- Change of domain deleted data in Team Foundation Server?
- Unlocking Locked Out accounts using PowerShell (not with Quest AD cmdlets)
- Kerberos Double Hop and Impersonate calls
- Algorithm to find a windows domain (AD) in the network
- Change browser search engine for every user/machine in windows domain
Trending Questions
- UIImageView Frame Doesn't Reflect Constraints
- Is it possible to use adb commands to click on a view by finding its ID?
- How to create a new web character symbol recognizable by html/javascript?
- Why isn't my CSS3 animation smooth in Google Chrome (but very smooth on other browsers)?
- Heap Gives Page Fault
- Connect ffmpeg to Visual Studio 2008
- Both Object- and ValueAnimator jumps when Duration is set above API LvL 24
- How to avoid default initialization of objects in std::vector?
- second argument of the command line arguments in a format other than char** argv or char* argv[]
- How to improve efficiency of algorithm which generates next lexicographic permutation?
- Navigating to the another actvity app getting crash in android
- How to read the particular message format in android and store in sqlite database?
- Resetting inventory status after order is cancelled
- Efficiently compute powers of X in SSE/AVX
- Insert into an external database using ajax and php : POST 500 (Internal Server Error)
Popular Questions
- How do I undo the most recent local commits in Git?
- How can I remove a specific item from an array in JavaScript?
- How do I delete a Git branch locally and remotely?
- Find all files containing a specific text (string) on Linux?
- How do I revert a Git repository to a previous commit?
- How do I create an HTML button that acts like a link?
- How do I check out a remote Git branch?
- How do I force "git pull" to overwrite local files?
- How do I list all files of a directory?
- How to check whether a string contains a substring in JavaScript?
- How do I redirect to another webpage?
- How can I iterate over rows in a Pandas DataFrame?
- How do I convert a String to an int in Java?
- Does Python have a string 'contains' substring method?
- How do I check if a string contains a specific word?
A better solution would be to set up a separate app pool that is set up with a service account that has full access to the database restart the web app after selecting the new app pool and use integrated security.
Use a very strong ( and lengthy ) password and set the account to password does not expire and user can not change password.
This prevents using clear text in the web.config files.