|
-
Aug 21st, 2006, 09:31 AM
#1
Thread Starter
Fanatic Member
[RESOLVED] [1.0/1.1] Saving Authentication Information
Hello All,
I have been asked to create a Windows service that will perform some tasks on multiple databases on multiple servers in multiple domains.
The question that I have at the moment is how to save the authentication information for each database. The databases are not in the same Windows domain and the domains are not trusted. Because of this I am not able to use a common OS account between all of the databases. The one option that I can come up with is to encrypt the login information somehow and then decrypt it when I need to make a connection.
Does anyone have a suggestion as to how I may be able to connect to these multiple databases?
Thanks Steve
-
Aug 21st, 2006, 09:52 AM
#2
Re: [1.0/1.1] Saving Authentication Information
Create an XML file to specify each server that you need to access.
For example
<servers>
<server>
<name>SRVR123984</name>
<database>Northwind</database>
<credentials>\Software\CompanyName\ApplicationName\SRVR123984\Credentials</credentials>
</server>
...
</servers>
Note that credentials point to a registry key. You can store the encrypted login credentials in the registry using ASPNET_SETREG.exe (search for this utility).
-
Aug 21st, 2006, 10:44 AM
#3
Thread Starter
Fanatic Member
Re: [1.0/1.1] Saving Authentication Information
Thank you for the information.
Is IIS required on the server that I am going to be saving the authentication information to? If so does .net provide another way to encrypt a registry setting?
-
Aug 21st, 2006, 10:53 AM
#4
Re: [1.0/1.1] Saving Authentication Information
My apologies then. Ignore the aspnet_setreg part.
Try this:
http://channel9.msdn.com/wiki/defaul...ConnStringCode
-
Aug 21st, 2006, 11:30 AM
#5
Thread Starter
Fanatic Member
Re: [1.0/1.1] Saving Authentication Information
Thank you so much for the time and effort you are putting into this question. I am using 1.0/1.1 but the example requires .net framework 2.0. You have pointed me in a couple of directions to look at I will try some variations of them.
-
Aug 21st, 2006, 01:37 PM
#6
Thread Starter
Fanatic Member
Re: [1.0/1.1] Saving Authentication Information
I have started using System.Security.Cryptography and the TripleDES algorithm. I have been able to find a lot of sample code on this topic.
I am still trying to understand what TripleDES.Key and TripleDES.IV are being used for.
I also still have an issue of what to use for a password. I can hardcode the password into my program or base it off of something on the workstation. I'll cross that bridge when I get to it.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|