dtSearch Web document access problems
Article: dts0129
Applies to: dtSearch Web
Symptoms
1. dtSearch Web says it cannot display a document because the document is not in a virtual directory folder.
2. Users are prompted for a password when attempting to search with dtSearch Web, or when attempting to view a document in search results.
Cause
1. dtSearch Web says it cannot display a document because the document is not in a virtual directory folder.
Documents on an internet site are usually placed in virtual directory folders. These are folders that have been designated as part of your site and that have been given a "virtual directory" or "alias" such as /Docs. By default, dtSearch Web will only display documents that are located in a virtual directory folder, and will display an error message if a user tries to access documents located in other folders. The purpose of this is to provide an additional layer of protection against unauthorized access to documents.
If you see the message that a document is not in a virtual directory, you will need to create a virtual directory definition in IIS that includes the folder containing the document. If you have many document folders in a tree that all need to be included, you can just add the top of the tree to IIS as a virtual directory.
After creating the virtual directory, click Start > Programs > dtSearch > dtSearch Web Setup, and when the dtSearch Web Setup dialog box appears, close it.
You do not need to reindex your documents after creating a new virtual directory. However, you do have to run dtSearch Web Setup again so that dtSearch Web will know about the new virtual directory. (It is not necessary to reinstall dtSearch Web or to create a new search form. All that is needed is to start dtSearch Web Setup and then to close the program. This will refresh the registry tables that dtSearch Web uses to identify virtual directories.)
Allowing access to non-virtual folders. dtSearch Web includes an option to allow documents outside of a virtual directory to be displayed. To enable access to non-virtual folders, check the Allow access to non-virtual folders box in the Options tab in the dtSearch Web Setup dialog box. If this option is checked it is very important that all files accessible from the web server be properly secured against unauthorized access. Please see the "Security" topic in the dtSearch Web help file for more information. Generally, instead of allowing access to non-virtual folders, it is better to create new virtual directory for any additional documents that you want to make available.
2. Users are prompted for a password when attempting to search with dtSearch Web, or when attempting to view a document in search results.
A password prompt means that dtSearch Web tried to access the document or index using the rights of the user currently accessing the site, and access was denied. When dtSearch Web receives an "access denied" error trying to open an index or a document, it returns a code to the web browser that tells the web browser to prompt for a user name and password.
A password prompt that appears when a user clicks the Search button indicates that access was denied to the index. A password prompt that appears when a user clicks on a document in search results indicates that access was denied to the document.
Troubleshooting Access Problems
1. If the document or index that cannot be accessed is on a different server, see "Delegation" under "Additional Information," below. The remainder of this troubleshooting section will assume that the resource is on the same server as dtSearch Web.
2. In Internet Information Services (IIS) Manager, create a virtual root for the folder containing the document or index with the access problem, if one does not already exist.
3. Put a sample HTML file in the same folder as the document or index with the access problem.
4. Attempt to access the sample HTML file from a client machine. You should see the same password prompt that appeared in dtSearch Web.
5. Adjust the security settings for the folder until the HTML file can be accessed from the client machine. To change the security settings for the folder, right-click it in Explorer, select "Properties," and then click the Web Sharing tab.
Example 1. Problems accessing the file c:\docs\abc.doc.
Create a virtual root making "/docs" an alias for "c:\docs", and put a sample html file, sample.htm, in c:\docs. Then try to access /docs/sample.htm through a browser, and adjust the security settings until the file can be accessed.
Example 2. Problems searching the index c:\docs\index.
Create a virtual root making "/docs" an alias for "c:\docs", and put a sample html file, sample.htm, in c:\docs\index. Then try to access /docs/index/sample.htm through a browser, and just the security settings until the file can be accessed.
Once you are able to access the sample HTML file from a client machine, you should be able to access the dtSearch Web index and documents as well.
Additional Information
Delegation
Delegation problems occur when a user on a client workstation tries to use Web Server A to access a resource on Server B. For example, Web Server A may contain dtSearch Web and Server B may have the documents and indexes to be searched. When the administrator tries a search while sitting at Server A, the administrator is able to access documents and indexes on Server B. However, when sitting at a client workstation, the administrator cannot get access to the Server B indexes and documents through dtSearch Web on Server A. The same problems will occur with any other resource on Server B, such as a web page. The administrator is unable to access the documents or indexes even after logging in with the Administrator user name and password.
Recommended Workarounds
(1) Transfer the resources from Server B to Web Server A so that they can be accessed directly,
(2) Put dtSearch Web on Server B and give it its own search page,
(3) Link directly to the documents in search results (so hits will not be highlighted). To do this, change %%HighlightLink%% to %%DirectLink%% in your dtsearch_options.html file.
(4) Build an index that caches documents, so dtSearch Web can highlight hits by using the cached copy of each document instead of accessing the original server. (Note that cached documents will be accessible to any user with search access to the index.)