Home

Configuring the location of LINQPad.UserQuery.exe

edited August 2019
This is essentially a question about LINQPad configuration. I tried posting it on StackOverflow (link) and didn't get any answers, but I guess the LINQPad user forum is a better place to ask.

I am trying to perform a SQL query, in LINQPad, with impersonation but the impersonating user does not have access to the original user's AppData folder, which causes my SqlConnection constructor to throw a TypeInitializationException:
using (var db = new SqlConnection(ConnectionString))
{
// ...
}
The InnerException here is a FileNotFoundException on the actual executable for the LINQPad query:
C:\Users\MyUser\AppData\Local\LINQPad\ProcessServer5AnyCPUB\LINQPad.UserQuery.exe
There was a workaround suggested here, which doesn't work for me. It simply changes my inner exception to:
Catastrophic failure (Exception from HRESULT: 0x8000FFFF (E_UNEXPECTED))
Is there some way for me to configure that folder so that LINQPad will try to run with an executable in a location accessible by all user accounts? I have looked at LINQPad's preferences but I couldn't find any place to specify the folder for the LINQPad.UserQuery.exe

Comments

Sign In or Register to comment.