Results 1 to 6 of 6

Thread: [RESOLVED] [1.0/1.1] Saving Authentication Information

  1. #1

    Thread Starter
    Fanatic Member steve65's Avatar
    Join Date
    Jun 2000
    Posts
    610

    Resolved [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
    This space for rent...

  2. #2
    I'm about to be a PowerPoster! mendhak's Avatar
    Join Date
    Feb 2002
    Location
    Ulaan Baator GooGoo: Frog
    Posts
    38,170

    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).

  3. #3

    Thread Starter
    Fanatic Member steve65's Avatar
    Join Date
    Jun 2000
    Posts
    610

    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?
    This space for rent...

  4. #4
    I'm about to be a PowerPoster! mendhak's Avatar
    Join Date
    Feb 2002
    Location
    Ulaan Baator GooGoo: Frog
    Posts
    38,170

    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

  5. #5

    Thread Starter
    Fanatic Member steve65's Avatar
    Join Date
    Jun 2000
    Posts
    610

    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.
    This space for rent...

  6. #6

    Thread Starter
    Fanatic Member steve65's Avatar
    Join Date
    Jun 2000
    Posts
    610

    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.
    This space for rent...

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width