Querying Index Services from ASP.NET page

J

Jay.Pemberton

I have stored procedure that does the following select into Indexing
Services.

SELECT LEFT(FILENAME, 21) AS Filename,
LEFT(REVERSE(SUBSTRING(REVERSE(DIRECTORY), 1, CHARINDEX('\',
REVERSE(DIRECTORY)) - 1)) + '/' + FILENAME, 40) AS Relative_Filename,
RANK, HITCOUNT, CHARACTERIZATION FROM OPENQUERY(web_content,'SELECT
FileName, Directory, Rank, Hitcount, Characterization FROM
psc016.docket..SCOPE() WHERE filename <> ''index.htm'' ORDER BY rank
desc') Q

It works fine when I run it from an administrator account from within
Query Anaylzer, but when I try to execute the sp from an ASP.NET page,
I get the following error:

Login failed for user '(null)'. Reason: Not associated with a trusted
SQL Server connection.

I assume that the issue is accessing web_content, which is the link to
the Index Services. In Query Analyzer, the a standard SQL login
returns no records. So is it even possible for this to work? I can
post specfics if needed. Any help would greatly be appreciated.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,994
Messages
2,570,223
Members
46,815
Latest member
treekmostly22

Latest Threads

Top