none
Remote Server Authentication RRS feed

  • Question

  •  

    How do I authenticate to a Win2K3 server for access to SQL Server 2005? I am currently using a strategy that allows me to access  the server, but it only works in the scenario where my local PC is domain attached or I impersonate a local user configured the same way as a server user. I guess the real question is how do I impersonate a domain user on my local PC if I'm not domain attached or without creating a local user to match a domain user? I was wondering how explorer authenticates the local machine when browsing for files on said remote server, because I found that if you authenticate in explorer then you can access the SQL Server fine.
    Monday, May 19, 2008 10:23 AM

Answers

  • You may want to try connecting to the resource using the WMI library. See the following:

    http://msdn.microsoft.com/en-us/library/system.management.connectionoptions.aspx

    You will probably need to specify the UserName and Password in the ConnectionOptions class.

    An alternative method would be to map to a drive letter in code. Not sure if you're mapping to a drive letter using Windows Explorer to browse SQL Server files.






    Monday, May 19, 2008 2:03 PM

All replies

  • You don't mention whether you're referring to Windows or Internet Explorer so I'm not exactly clear by what means you are authenticating or browsing files. Perhaps you could provide some clarification and detail.

    In any event, you *are* providing authentication credentials to the domain. It could very well be transparent because of the type of authentication your system is configured for, but w/o a little more information it would be difficult to say for certain.

    Monday, May 19, 2008 12:46 PM
  • I was referring to Windows explorer. If you query a network resource in windows explorer, you are prompted with a login dialog to enter your network credentials to the machine you are trying to access. I want know how to do this programmatically without using LogonUser (which only works in a few scenarios) or a having to create the dummy local user. I was reading a page at support.microsoft.com which mentions SSPLogonUser. Is this the way to go??
    Monday, May 19, 2008 1:12 PM
  • You may want to try connecting to the resource using the WMI library. See the following:

    http://msdn.microsoft.com/en-us/library/system.management.connectionoptions.aspx

    You will probably need to specify the UserName and Password in the ConnectionOptions class.

    An alternative method would be to map to a drive letter in code. Not sure if you're mapping to a drive letter using Windows Explorer to browse SQL Server files.






    Monday, May 19, 2008 2:03 PM