All webtests I run from VS2005 RTM are failing with a response of:
RequestFailed: The value of the date string in the header is invalid.
The request looks like this:
GET /Angel63/sidebar.asp HTTP/1.1
User-Agent : Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1)
Accept : */*
Accept-Language : en-US
Host : 600m01
Cookie : ASPSESSIONIDSATDSCQA=LMGPKPGDJNEPFDPPJKBKILEP
Accept-Encoding : gzip
I can successfully run the same test using the beta 2 release of VS2005. The only thing I can see that is different is that the request is slightly different.
Request from VS2005 beta 2:
GET /Angel63/sidebar.asp HTTP/1.1
User-Agent : Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1)
Host : 600m01
Cookie : ASPSESSIONIDSATDSCQA=NMGPKPGDMBICICLNHBOBLFIH
The response header I get from VS2005 beta2 is:
HTTP/1.1 200 OK
Date : Wed, 07 Dec 2005 13:17:38 GMT
Last-Modified : 12/7/2005 8:12:38 AM,12/7/2005 8:12:38 AM,12/7/2005 8:12:38 AM,12/7/2005 8:12:38 AM,12/7/2005 8:12:38 AM
Server : Microsoft-IIS/5.1
X-Powered-By : ASP.NET
Content-Length : 4275
Content-Type : text/html
Expires : Wed, 07 Dec 2005 13:07:38 GMT
Cache-control : private
Does anyone know what causes this error, or what differences in the beta and rtm that may cause this
Thanks,
Chad

Web test failing RequestFailed: The value of the date string in the header is invalid.
Andrew Sims
Josh
Anand Nambisan
Yes, I try it is not possible to change software. So if it is possible to get those changes as soon as possible I will be glad to have them. Now we are testing our portal trying to find perfomance issuers. So I really want to use VS2005 for this and try to make VS as test tool standard. But this problem does not allow me to make VS as a standard test environment.
Eugene
Mike Eheler
Evgeny,
I've identified a way we can correct this bug, but it involves recompiling the web test engine. This fix will be included in the upcoming service pack. If you have a support contract, you could request a QFE for this bug and possibly get it sooner.
Have you tried contacting the makers of the software that's generating the invalid Last-Modified header
Josh
Jawad Munir
Does your web app set the Last-Modified header multiple times I believe that's where the bug exists since that header value is not valid. Beta 2 was less sophisticated about how it cached requests, so it must not have been trying to parse that Last-Modified value.
Josh
martinbl
Josh
Jeff Lynch - MVP
Can you tell me what version you have listed in the Visual Studio about box We did some more investigation and it appears I actually fixed this bug a few weeks before RTM.
Thanks,
Josh
Ars_Maxer
Response.AddHeader "LAST-MODIFIED", FormatDateTime(DateAdd("n", -5, Now()))
I assume this was added to try to keep pages from caching.
emeshuris
I now have a repro for this bug on my machine. The bug we fixed applied to the Date header, but it looks like an invalid Last-Modified header is throwing a ProtocolViolationException in a helper class used by System.Net.HttpWebResponse. We'll work with the team that owns that code to get a resolution to this bug. In the meantime, I'd suggest trying to figure out why that invalid Last-Modified header is being set. That will surely cause client-side caching not to work properly even if IE does permit the header.
Josh
codoherty
Here's a workaround that should allow you to test against web servers returning invalid Last-Modified headers. Just add the following XML to vstesthost.exe.config in your \program files\vs...\common7\ide directory. It needs to go in between the <configuration> and </configuration> tags.
Please let me know if this works for you.
<system.net>< xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" />
<settings>
<httpWebRequest useUnsafeHeaderParsing="true" />
</settings>
</system.net>
JurgenJ
Josh
Chuck Fain
HTTP/1.1 200 OK
Server: Microsoft-IIS/5.1
Date: Thu, 08 Dec 2005 18:41:23 GMT
X-Powered-By: ASP.NET
X-AspNet-Version: 1.1.4322
Pragma: no-cache
Content-Language: en
Set-Cookie: ASP.NET_SessionId=cfgjo0qj0vpegf55ygn43y3u; path=/
Expires: 1133980883540
Cache-Control: no-store, no-cache, must-revalidate, max-age=0
Cache-Control: post-check=0, pre-check=0
Last-Modified: 1134067283540
Content-Type: text/html; charset=utf-8
Content-Length: 25385
Is there some work around to make this test working
Yifat
I hope that helps.
Josh
ArunRajan
Version 8.0.50727.42 (RTM.050727-4200)
Microsoft .NET Framework
Version 2.0.50727
dlausch