I've discussed this problem earlier but I feel it's time to start at new. We are in CMS 6R2 and we have about 1900 errors on Google Webmaster Tools saying that our TrackHandler.ashx generates 404's. The file doesn't exist. How can I go about starting to troubleshoot this and get it up and running?
The file exists in the EPiServer application folder but is perhaps something missing in web.config?
I guess you have Live Monitor installed on your website and this is Live Monitor tracking handler that should be added in /configuration/system.webServer/handlers section in web.config file:
<add name="EPiTraceTracker" path="TrackerHandler.ashx" verb="*" type="EPiServer.Trace.CMS.Web.Handlers.TrackerHandler" />
Please check that your web.config contains this handler registration and it is the first item in the handlers list.
It looks like tracking script is injected on pages but handler is missing.
Live Monitor is installed but the type says EPiServer.Trace.CMS.Handlers.TrackerHandler (without Web). Think that might be the problem? I can't try it until later tonight since there are to many important users working on the site right now. If that would be the case, how come it has worked before? Has the path changed since the earlier versions, perhaps?
I found a window to try and swap the line with the old one and it didn't make any difference. Still says "...can't be found". As I mentioned we've had it up and running in earlier versions of CMS but just recently installed it at new, since the module was missing. The installationed added the "Live monitor" option in the menu in edit mode but when clicked the Silverlight interface is loaded but it says "Error! Failed to load root node!". Does that give any more clues?
I don't know if it's suppose to be there but the TrackerHandler is mentioned in another place, Configuration/System.Web/httpHandlers. The following line: <add path="TrackerHandler.ashx" verb="*" type="EPiServer.Trace.CMS.Handlers.TrackerHandler" /> It doesn't make any difference removing it.
Where in the order of handlers should the TrackerHandler be added? Right now it's at the bottom. Tried moving it to the top without any luck.
The correct type for TrackerHandler is EPiServer.Trace.CMS.Handlers.TrackerHandler. The location for it depends on the IIS version used. If the site is hosted on IIS6 then the handler should be in /configuration/system.web/httpHandlers, if on IIS7 then in /configuration/system.webServer/handlers. It is also Ok to have it registered in both locations. As a last resort you can run Live Monitor installation in Deployment Center and just reinstall it on the site.
Everything is correct and according to how you describe it. I've reinstalled twice still not working.
In EPiServer CMS6R2 the full URL to TrackerHandler.ashx, injected on a site page, should look like: <yourSiteUrl>/EPiTrace/Handlers/TrackerHandler.ashx. Does it look the same in your case?
Do you have a virtual path provider registered with virtualPath="~/EPiTrace” (normally it should be virtualPath="~/<youEditUi>/EPiTrace”)
Do you have a folder in your site root named “EPiTrace”?
The TrackerHandler.ashx-path is correct but the EPiTrace-folder is not accessible. I looked at the virtualPaths provided in episerver.config and the one for EPiTrace actually says virtualPath="~/administration/EPiTrace". Removing the administration part of it fixes the 404 on the links (and shows a white page) but also the link for the Live Monitor disappears.
Are we perhaps on to something?
Ok. You should have a virtual path provider, but you should not have a folder named “EPiTrace” on the site root. The reason why I have asked about the folder, is because it might interfere with the path to the handler. The virtual path provider should be added to the episerver.config:
<add name="EPiTrace" virtualPath="~/<yourUIPath>/EPiTrace" physicalPath="C:\Program Files\EPiServer\CMS\6.1.379.0\Install\Modules\EPiTrace\Application\EPiTrace" type="EPiServer.Web.Hosting.VirtualPathNonUnifiedProvider,EPiServer" />
This provider should have been added to the configuration file by the installer, when you reinstalled the Live Monitor. Please, check if you have a namespace defined in your episerver section in episerver.config. It should look like this:
Adding the provider will not resolve the issue with 404 on TrackerHandler.ashx since handler should be accessible even without the VPP configured.
Could you check if you have any location definitions in your web.config that might prevent access to the handler? Check if there are any location paths that includes “EPiTrace”.
Probably you have a generic *.ashx handler defined before the TrackerHandler.ashx. Could you try to place the TrackerHandler registration on the top of your handlers list in the web.confg?
Sorry, if I was unclear. There is no folder created in the site root so there shouldn't be any interferance.
The virtual path is added and according to the line you wrote above. My UIPath is administration and if enter site/administration/EPiTrace/Handlers/TrackerHandler.ashx?pageId=21001 I get a white page, just like this one from the EPiServer site. http://www.episerver.se/EPiTrace/Handlers/TrackerHandler.ashx?pageId=2802 However, if I view the source of the page I just visited the EPiTrace link generated is not "/administration/EPiTrace/Hand..." but instead "/EPiTrace/Hand...". Those links are the once gerenating the 404's. So, if I change the virtual path in episerver.config by removing the administration part of the virtualPath the link generated in the source link works fine and brings me to the blank page. But now the Live Monitor button in edit mode is gone.
The namespace in episerver.config is correct.
The only place in the web.config that mentions EPiTrace is the following:
<protectedModules rootPath="~/administration/"> <add name="Shell" /> <add name="CMS" /> <add name="EPiTrace" /> </protectedModules>
These are the two sections where TrackerHandler is mentioned in web.config:
<httpHandlers> <add path="TrackerHandler.ashx" verb="*" type="EPiServer.Trace.CMS.Handlers.TrackerHandler" /> <remove verb="*" path="*.asmx" /> <add verb="*" path="*.asmx" validate="false" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=184.108.40.206, Culture=neutral, PublicKeyToken=31BF3856AD364E35" /> <add verb="*" path="*_AppService.axd" validate="false" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=220.127.116.11, Culture=neutral, PublicKeyToken=31BF3856AD364E35" /> <add verb="GET,HEAD" path="ScriptResource.axd" type="System.Web.Handlers.ScriptResourceHandler, System.Web.Extensions, Version=18.104.22.168, Culture=neutral, PublicKeyToken=31BF3856AD364E35" validate="false" /> <add verb="*" path="*.mvc" type="System.Web.Mvc.MvcHttpHandler, System.Web.Mvc, Version=22.214.171.124, Culture=neutral, PublicKeyToken=31BF3856AD364E35" /> <add verb="*" path="UrlRouting.axd" type="System.Web.HttpForbiddenHandler, System.Web, Version=126.96.36.199, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" /> </httpHandlers>
Apparently there is a problem with the handler.
As a workaround you can create "EPiTrace" folder in the site root and copy c:\Program Files\EPiServer\CMS\6.1.379.0\Install\Modules\EPiTrace\Application\EPiTrace\Handlers folder inside it. So that requests will be handled through the web handler file instead.
It's so strange that it used to work earlier. Perhaps that was in CMS 5. I'll leave this for now and hope that it just hope that it's solved in version 7. Until then I put a nofollow on the EPiTrace-folder in robots.txt.
Thanks for all your help!