Question

I have an application that needs to connect to an MS SQL db. Normally I would have used SSPI, BUT in this case, I need to impersonate a different user than the current user.

How would I go about this? the only constraints I have is

  1. SSPI is not an option.
  2. Hardcoding credentials is, also, not an option.
  3. Credentials needs to be saved locally
  4. it's a desktop application
  5. Credentials needs to be stored at runtime

if all else fails, i'll just SSPI and design my way out of it, but id like to hear what my options are first.

No correct solution

OTHER TIPS

Just store your connection string in app.config.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top