Cookie Munger (ISAPI Filter) - I have no points but very difficult!!

I am using Personalization & Membership features of Site Server in my ecommerce sites.  The basic store setup depends on cookies to track users and and their shopping carts.  P&M has a default way of handling browsers that don't accept cookies - redirect them to a page that says "Your browser must accept cookies to use this site."  

Included in the IIS Resource Kit is an ISAPI filter called "Cookie Munger".  This filter intercepts the data on the way to the server and if there is a request for cookie info is replaces it with a sessionID at the end of the URL.  To use the filter you simply register it with the site in Internet Mgt Console - which I did.  But when I browse the site (with Cookies disabled) I still get redirected to the P&M no cookies error page.

Can Cookie Munger be used in conjunction with P&M?

Did I miss a step setting up Cookie Munger?

Are there are any resources I can refer to for Info on this ISAPI filter? I have found very little info anywhere on the web.

If noone has heard of "Cookie Munger" - do you know of any other ways around the P&M dependence on cookies?

Any help greatly appreciated - if I get more points in the meantime I will up the ante to answer this question.

September Weir
SeptemberAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

nikhilhCommented:
The sites that are done with site server have to have the cookies enabled. There is a option of using cookie munger to pass the data in the cookies to be passed through the URL, but even then site server forces some cookies to be written even if you use cookie munger.

I am not too sure of why it does that. but in my experience with site server it never worked with cookies option turned off in the browser.
0
SeptemberAuthor Commented:
What did you do in the end?  Just accept the fact that browsers not accepting cookies can't use portions of the site?  Or did you rewrite parts of the site to not use cookies?  What do big sites like amazon.com do?
0
nikhilhCommented:
We have not rewritten the site. We just assume the fact that the users will have their cookies enabled on their browsers.

And we ignore that segment which does not accept cookies in their browser
0
Upgrade your Question Security!

Your question, your audience. Choose who sees your identity—and your question—with question security.

SeptemberAuthor Commented:
Adjusted points to 100
0
SeptemberAuthor Commented:
So did you use Cookie Munger?  I would like to give it a try?  Do I have turn off the P&M no cookie error handling to make the site use the Cookie Munger?  Or do you think there are other reasons that it did not work?
0
nikhilhCommented:
There is also some exxplanation on cookie munger in the book Personalization and Membership using Site Server. This book is by Wrox press and written by Robert Howard
0
nikhilhCommented:
No I think that there are other reasons for which the cookie munger might not be working.

Also have you generated the site through the wizard?

If so there is a function which generates the shopperid if it does not find one. I think it is the function getshopperid. What are the parameters that are passed to this function

Also are you using Membership security or NT security?
0
SeptemberAuthor Commented:
Yes, we used the wizards to create the sites (then modified them).  We are using Membership authentication (security?).  And there is a method(not a function) called GetShopperID and it has no parameters.  Anything else you want to know?
0
nikhilhCommented:
I may not be too correct about the syntax, but in the global.asa file there is a SSFunction.Initmanager or something like this.

Change the parameter there from "cookieurl" to just "url"
0
SeptemberAuthor Commented:
I think I have implemented it - it is not quite working right.  

I can look around my site - put stuff in my shopping basket, take stuff out etc.  but when I go to 'purchase' it says my basket is empty.  I can see the sessionID attached to the end of the URL but the site doesn't seem to be picking that up.

I tried changing the paramter to "url" (you had the syntax right) and it couldn't track anything (ie I would add something to the basket and it would take me right to an 'empty basket' page).

Right now I have my cookies turned off and the cookie munger set to 'filter all'.  I feel like I am close (the id is appended to the url), but it is not clicking together.

Thanks so much for help so far ; )

September
0
nikhilhCommented:
Could you check that when you go from one page to another does the Shopperid remain the same?

Also could you just paste a sample url argument string?
0
SeptemberAuthor Commented:
OK, I am new to the world of ISAPI filters, so I might be messing something else up.

After my last post - I removed and "reinstalled" the CkyMunge DLL.  And I have been able to get it do anything since then.  I think it was actually working before and it was a page error causing my last problem.

So you can have the points, but I need some help setting up CkyMunge AGAIN! Just a couple of questions...

Do I have to stop the entire IIS service to add the CkyMunge filter - or just the web service for that one site?

Does the CkyMunge.dll have to be stored in any particular folder (like the InetSrv folder) or can they be placed anywhere?

Sometimes when I add the CkyMunge DLL to the list of filters (only stopping the site's web service - not IIS) it doesn't load (click OK - reopen properties and it can't seem to find it).  Other times it loads no problem - I can't seem to find a pattern, other than placing the DLL in the InetSrv directory seems to more troublesome than elsewhere.

Is it advisable to run CkyMunge filter in it's own namespace for a live site (I haven't tried this yet - but it seems like a good plan).

I a realize most of these questions are general ISAPI filter questions, and I am trying very hard to understand the interaction between the asp page and the filter - if you have any general tips??

Please try your best to answer some of my questions and you can have my points!

Thanks very much
September
0
SeptemberAuthor Commented:
OK, I am new to the world of ISAPI filters, so I might be messing something else up.

After my last post - I removed and "reinstalled" the CkyMunge DLL.  And I have been able to get it do anything since then.  I think it was actually working before and it was a page error causing my last problem.

So you can have the points, but I need some help setting up CkyMunge AGAIN! Just a couple of questions...

Do I have to stop the entire IIS service to add the CkyMunge filter - or just the web service for that one site?

Does the CkyMunge.dll have to be stored in any particular folder (like the InetSrv folder) or can they be placed anywhere?

Sometimes when I add the CkyMunge DLL to the list of filters (only stopping the site's web service - not IIS) it doesn't load (click OK - reopen properties and it can't seem to find it).  Other times it loads no problem - I can't seem to find a pattern, other than placing the DLL in the InetSrv directory seems to more troublesome than elsewhere.

Is it advisable to run CkyMunge filter in it's own namespace for a live site (I haven't tried this yet - but it seems like a good plan).

I a realize most of these questions are general ISAPI filter questions, and I am trying very hard to understand the interaction between the asp page and the filter - if you have any general tips??

Please try your best to answer some of my questions and you can have my points!

Thanks very much
September
0
nikhilhCommented:
I have not worked with ISAPI at all. So I am answering with the best theoritical knowledge that I have

1. You need to stop and restart the entire IIS service.
2. The DLL can be placed anywhere. There are certain other conditions, the path to the directory where you have placed the DLL should be in the NT environment variables, if it is an NTFS partition, the DLL and the directory should have the permission to the user IUSR_MACHINENAME and the other DLs that are required should be present in the NT Path.
3. I would advise you to run the DLL in its own namespace, because it would be much more .

0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
SeptemberAuthor Commented:

Thanks very much nikhilh (is that your name?).

How does this work - can I keep the dialogue going after I assigned the points?  

I can't work on it this morning because out test server is dow.  But I will let you know how it turns out.

Thanks again
September
0
ctrlaltdelCommented:


To install Cookie Munger, do the following:

1. Copy Ckymunge.dll to a suitable location, such as \InetPub\Scripts or \Winnt\System32\InetSrv.

2. Use the Internet Service Manager to stop the WWW service.

3. Add Ckymunge.dll to the list of ISAPI filters in the system registry (HKEY_LOCAL_MACHINE\ System\CurrentControlSet\Services\W3Svc\Parameters\Filter DLLs). To do so, use the Internet Service Manager. In the Properties dialog for the Web site, click the ISAPI Filters tab. Add the Ckymunge.dll to the list of ISAPI filters.

Be sure to use the full path for Ckymunge.dll. This value is a comma-separated list. The filter should be added to the end of the list. When the filter is uninstalled, the string that was added should be removed with care in respect to those situations where other ISAPI filters have been added or removed since the DLL was installed.

If you have other filters installed, the order in which they are executed may become important. Cookie Munger is a medium-priority filter.

4. The first time the filter is used, it will create the \HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\ckymunge\MungeMode registry value. Set the Cookie Munger operating mode in this registry setting to one of the following values:

0 = Off. No filtering occurs (the same result could be achieved by removing the Cookie Munger from the list of filters).
1 = On. Basic operation: All outgoing cookies are filtered, and URLs are munged as normal.

2 = Smart.The filter will first munge URLs but let the cookies go out to the browser. If the cookie comes back, URLs will no longer be munged, and cookies will not be eaten. If the cookie does not come back, all other outgoing cookies will be filtered and URLs will be munged.

5. Start the WWW service.
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
ASP

From novice to tech pro — start learning today.