We are moving a published SharePoint site from ISA 2006 to TMG 2010. The listener uses a customized FBA page. After moving the custom FBA directory to the ..\Templates\CookieAuthTemplates directory and restarting the firewall services on each array member, the page displays, but all requests for images fail (e.g. CookieAuth.dll?GetPic?formdir=6&image=icon_help.jpg) with a 500 error "The data is invalid." We have other customized FBA pages on other publishes sites and they work normally. They were also moved over from our old ISA 2006 servers.
I've seen mention of this error in other posts, but it's been related to forward proxies accessing external sites. I can't find anything that falls into this scenario. I've verified that the file system permissions match the other directories, including the default ISA directory. I can open the images on the array servers in paint. Requests for css files work fine, for example CookieAuth.dll?GetPic?formdir=9&image=layout.css returns the css file.
Any ideas?