Previous Next

Thread: IIS 7 and Content Indexer

Last post 09-14-2008 11:29 PM by ShqTth. 11 replies.

Average Rating Rate It (5)

RSS

Page 1 of 1 (12 items)

Sort Posts:

  • 11-14-2007, 3:11 PM

    • stiphy
    • Not Ranked
    • Joined on 11-14-2007, 7:57 PM
    • Posts 4

    IIS 7 and Content Indexer

    Hi all,

     We have a product that has been around for many years that we just recently tried to get running on IIS 7.  It has failed, both on a Vista machine and on a Windows Server 2008 Beta 3 machine. 

     Our product uses the Microsoft Content Index service.  We access the index via an IDQ file.  The IDQ file contains "wildcards" such as CiLocale=%CiLocale%.  The wildcard is filled in via the Querystring which would be something like http://<servername>/myfile.idq?CiLocale=EN-US.  This has worked since the Windows NT days and is valid per MSDN article (http://msdn2.microsoft.com/en-us/library/ms693006.aspx).  What we are seeing with IIS 7 is that it is not treating the %CiLocale% as a wildcard and replacing it with EN-US, it is instead just treating it like a literal and passing it to the idq.dll file.  Consequently the idq.dll file returns "An invalid locale was specified on the 'CiLocale=' line in IDQ file myfile.idq."  If I hardcode the string "EN-US" in our IDQ file it works fine so the problem seems to be isolated to the replacing of the wildcard in IIS 7.0.  It does this for other fields as well, including the CiRestriction which is how you actually specify your search terms.  Thus the Content Indexer is basically useless unless you build a hardcoded IDQ file for each and every search (not practical).

     Has anyone seen this?  Is this a bug in IIS 7 or have I missed something in my configuration.  I have created the Handler mappings for *.idq, *.ida (both to idq.dll), and *.htw (to webhits.dll).  I've givent these handlers read script and execute access.

     Any help is greatly appreciated.  Indexing is the cornerstone of our product and if we cannot resolve this our clients will not be able to use IIS 7 based versions of Windows with our product.

     Sean

  • 11-20-2007, 2:32 PM In reply to

    • davcox
    • Top 50 Contributor
    • Joined on 07-21-2006, 6:28 PM
    • Redmond
    • Posts 113

    Re: IIS 7 and Content Indexer

    This isn't an IIS bug ... you've configured the handler mappings properly.  (Installing the Index Server Feature via the Server Manager tool in Windows Server 2008 will create these handler mappings for you).  The Indexing service team may have made changes to their handler or perhaps this was a bug.  Have you tried the RC0 version of Windows Server 2008

    Dave

  • 11-20-2007, 3:31 PM In reply to

    • stiphy
    • Not Ranked
    • Joined on 11-14-2007, 7:57 PM
    • Posts 4

    Re: IIS 7 and Content Indexer

    I did install the Index Server Feature via the Server Manager tool and it did not create the handler mappings for me, I did them myself.  IIS 7.0 was installed already when I added the Content Index Server but I'm not sure if all the application server components were installed (can't remember the exact order).  I guess I can try an uninstall of CI and reinstall. 

    Let me add that I am having the same problem under IIS 7 and the Content Indexer in Windows Vista which is what leads me to believe that this is something in IIS 7 and not Windows Server specific.

    I haven't tried the RC0 version of Windows Server...I will have to build a Virtual PC based on that one I guess (I am using the preconfigured virtual pc for the beta version).

     Any further thoughts/help are greatly appreciated.

  • 11-21-2007, 12:52 PM In reply to

    • davcox
    • Top 50 Contributor
    • Joined on 07-21-2006, 6:28 PM
    • Redmond
    • Posts 113

    Re: IIS 7 and Content Indexer

    With the immiment release of RC1, adding the Index Server role will add the handler mappings to IIS (as I just tried it on the latest builds).  Assuming you've already installed IIS (it may prompt you to install the dependency). 

    This bug may also be fixed in SP1 for Vista (as well as newer builds of Windows Server 2008). 

     If you send me a snippet of your code, I'll give it a try.

    Dave

  • 11-30-2007, 2:32 PM In reply to

    • stiphy
    • Not Ranked
    • Joined on 11-14-2007, 7:57 PM
    • Posts 4

    Re: IIS 7 and Content Indexer

    I downloaded and built an RC0 virtual machine of Wink2k8.  After doing so I did the following:

    Added Server Roles:
    File Services
     Indexing Service
    Web Server
     ASP and ASP.net
     IIS 6 Management Compatibility
     Basic WIndows and Digest Authentication

    I then installed our server product.  It was much easier with RC0 then with Beta 3.  Our server product's installer sets up an IIS site on 10505, adds some virtual directories, creates a catalog in content indexer and some other things.  All of this worked in RC0.  RC0 also added the handler mappings to IIS automatically.

     However, my issue is still present with IIS 7.0 not passing in query string values to IDQ files.  Our IDQ file called enps.idq looks like this:

     [Query]
    CiColumns=filename,vpath,Characterization
    CiFlags=DEEP
    CiRestriction=%CiRestriction%
    CiMaxRecordsInResultSet=%CiMaxRecordsInResultSet%
    CiMaxRecordsPerPage=%CiMaxRecordsPerPage%
    CiScope=%CiScope%
    CiTemplate=/scripts/enps/%TemplateName%.htx
    CiSort=%CiSort%
    CiForceUseCi=True
    CiLocale=%CiLocale%
    CiDialect=1
    CiCatalog=ENPSWork

    And we access the query through IIS via this query string:
    http://usvwin2k8rc0sean:10505/scripts/enps/enps.idq?CiRestriction=bush%2A%2A%20AND%20((%23vpath%20\nws\%2A)%20OR%20((%23vPath%20%22\USVWIN2K8RC0SEAN\U%5FSCULLINAN\C\%2A%22%20OR%20%23vPath%20%22\USVWIN2K8RC0SEAN\U%5FSCULLINAN\W\%2A%22%20OR%20%23vPath%20\USVWIN2K8RC0SEAN\P%5FSYSTEM\C\%2A%20OR%20%23vPath%20\USVWIN2K8RC0SEAN\P%5F!CONTACTS\C\%2A%20OR%20%23vPath%20\USVWIN2K8RC0SEAN\P%5F!READINS\W\%2A%20OR%20%23vPath%20\USVWIN2K8RC0SEAN\P%5FSYSTEM\W\%2A%20OR%20%23vPath%20\USVWIN2K8RC0SEAN\EXTFILES\%2A)))&CiMaxRecordsPerPage=134&CiMaxRecordsInResultSet=2000&CiScope=%2F&TemplateName=enps&CiSort=Filename%5Bd%5D&CiLocale=EN-US

    The response we get back is:
    An invalid locale was specified on the 'CiLocale=' line in IDQ file enps.idq.

    If I then modify the idq file and replace CiLocale=%CiLocale with CiLocale=en-us I get response saying that the template name (again a parameter that is not being replaced) is incorrect.  If I hardcode all the values in the idq file from the query string it returns the results just fine.  Of course this is not practical as all the query's are for the same thing (can't hardcode ciRestriction...it would be like having a hardcoded textbox on the live search page :))  This tells me that the sole problem is that the idq file is not having the parameters that are specified in % replaced with the values from the querystring. 

    I see this same problem in IIS7 under Vista.  Note that this method has been in use since Windows NT and IIS 4.

    I just need to figure out how to get IDQ files to accept the querystring parameters in IIS 7.0 the way they always have in the past.

    Thanks again for any help....this is all the relevant "code" I can think of, but if there is anything else you need feel free to contact me!

     Sean

  • 12-05-2007, 5:32 PM In reply to

    • davcox
    • Top 50 Contributor
    • Joined on 07-21-2006, 6:28 PM
    • Redmond
    • Posts 113

    Re: IIS 7 and Content Indexer

    This seems like a bug ... I've filed it internally ...

  • 12-10-2007, 4:44 PM In reply to

    • davcox
    • Top 50 Contributor
    • Joined on 07-21-2006, 6:28 PM
    • Redmond
    • Posts 113

    Re: IIS 7 and Content Indexer

    We have contacted the team that owns idq.dll (the Index Server team) and we will need more data to escalate at this stage in Windows Server 2008. 

    Also, you might want to contact Customer Support Services, to raise this issue directly. 

    Is this a packaged application, or a home-grown application that you're using?
    What size organization is application used by?  (looking for impact)
    Have you considered migrating the application to using classic ASP?  http://msdn2.microsoft.com/en-us/library/ms952612.aspx 

    Dave

  • 12-11-2007, 9:44 AM In reply to

    • stiphy
    • Not Ranked
    • Joined on 11-14-2007, 7:57 PM
    • Posts 4

    Re: IIS 7 and Content Indexer

    Davcox,

    Our's is a packaged commercial application that is used daily by over 50,000 users at 681 sites in 53 countries supporting over 40 languages. 

     We are currently in the process of upgrading it to the latest WPF/Enterprise Search/WCF etc. but this process will take a lot of time considering the scope of our software.

    With the userbase that we have for our application I'm sure that you can appreciate that logistically, migrating the application to classic ASP is not a great option.

     If you'd like to contact me offline please feel free to email/PM me!

    Thanks, 

    Sean

  • 12-20-2007, 6:13 PM In reply to

    • dkuzmen
    • Not Ranked
    • Joined on 12-20-2007, 11:04 PM
    • Posts 1

    Re: IIS 7 and Content Indexer

    I've sent you an e-mail to discuss this issue offline. Please let me know if you didn't receive it.

    Thanks

    Dmitry.

  • 09-14-2008, 11:21 PM In reply to

    • ShqTth
    • Not Ranked
    • Joined on 09-14-2008, 11:04 PM
    • Posts 3

    Re: IIS 7 and Content Indexer

    I have to exact same problem

     

    In frontpage UserRestriction is not passed to the idq file.

     CiRestriction=$contents %UserRestriction%

    Basically nothing is searched.

     I modified the template so the form posts CiRestriction, and still same result.

    I put <script>alert("<%CiRestriction%>")</script> to track the changes and still it returns $content ....

    I also did this test. alert("<%UserRestriction%>") and it returns USERRESTRICTION. meaning the idq file doesn't reconize UserResctiction as its not set even if the template posts that value.

    So, I know 100% the idq.dll is not reading GET/ POST properly.

     

    Also there is another problem, is that in Index Server, I cannot get the Catalog to track one of my Virtual Servers. When I Select one and Push apply/ok. I see that it saves the Reg settings, but when I go back into the properties for the Catalog, the Virtual Server name is blank and I need to reselect one. If I don't select one, the Reg setting is changed to -1. If I select none, the Reg setting is set to 0.

    So, if I set it to track Virtual Server 1, (either threw properties or threw regedit) I notice the virtual directories are not automatically added to the Catalog, so I need to manually add them using Regedit. I add the directores setting them to 3 (for enable vpath) or 5 (for directory). When they are set to 3, no documents are added to the catalog, when I set it to 5 all files are added to the catalog.

    When I set it to 3, in Index Server (computer management) it shows a little web icon next to the directory name. (like it does in windows 2000 server).

     

    So something is totally messed up with Index Server. I think Index Server does not have direct access to IIS 7.0, so it doesn't know what to do.

     

    In the case of idq files, they wont accept parameters from Post or get. So I have no way for the user to submit what they want to search for.

     

     Funny thing, is that I cannot get frontpage extensions to use Index Server for search results, instead it uses shtml.dll.(that uses an catalog) I guess they had to do this so they could work around the broken idq.dll.

     <!--webbot bot="Search" s-index="All" s-dsn="default"
    s-fields="timestamp,weight,"
    TAG="BODY"
    S-Text="Search for:"
    I-Size="20"
    S-Submit="Search Site"
    S-Clear="Reset" b-useindexserver="1" S-Scope="All" S-FieldsEx="write,rank,hitcount," S-

    CiMaxRecordsPerPage="25" S-CiMaxRecordsInResultSet="200" startspan U-DOC-URL="search.htm"
    -->

     

    On published pages b-useindexserver="1" defaults to b-useindexserver="0" and no idq is generated etc only shtml.dll is used to post to.

  • 09-14-2008, 11:25 PM In reply to

    • ShqTth
    • Not Ranked
    • Joined on 09-14-2008, 11:04 PM
    • Posts 3

    Re: IIS 7 and Content Indexer

    I am using Vista Ultimate 64bit w/SP1 installed

  • 09-14-2008, 11:29 PM In reply to

    • ShqTth
    • Not Ranked
    • Joined on 09-14-2008, 11:04 PM
    • Posts 3

    Re: IIS 7 and Content Indexer

    HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\ContentIndex\Catalogs\web\Scopes

     c:\inetpub\wwwrootnew string ,,3

     HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\ContentIndex\Catalogs\web

    IsIndexingW3Svc dword 1
    W3SvcInstance dword 1

    W3SvcInstance defaults to -1 do to catalog properties track vserver being blank, so an Instance needs to be reselected to avoid this.

Page 1 of 1 (12 items)
Page view counter