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.

没有正确的解决方案

其他提示

Just store your connection string in app.config.

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top