I am attempting to search files on a website using the Windows Search API, eactly as the accepted answer to this question. Briefly:
var con = new OleDbConnection("Provider=Search.CollatorDSO;EXTENDED PROPERTIES='Application=Windows'");
...
"SELECT System.ItemName FROM SystemIndex WHERE SCOPE='file:C:\inetpub\wwwroot\[MySite]' ";
However, it never returns any items.
I discovered that a wide-open query (no scope) only returns files within C:\Users\[me]
For instance, it finds files on my desktop, but not in C:\Windows. I am a local admin, and can find no mention of permission restrictions.
I've tried it in webforms and winforms both locally and deployed remotely. Same behavior.
Does anyone have a solution?