I'm experimenting with some c# webservice code that is designed to return the most recent say, 3 days of "HOWTOS"
from the MS Search service.
Here is a sample working GET URL. You can paste this into IE and it will return a result page. (sorry about any wrapping):
http://search.support.microsoft.com/kb/psssearch.asp?SPR=msall&KT=ALL&T=N&T1
=3d&LQ=HOWTO&PQ=PastQuery&S=F&A=T&DU=C&FR=0&D=support&LPR=&LNG=ENG&VR=http%3
A%2F%2Fsupport.microsoft.com%2Fsupport%3Bhttp%3A%2F%2Fsupport.microsoft.com%
2Fservicedesks%2Fwebcasts%3Bhttp%3A%2F%2Fsupport.microsoft.com%2Fhighlights&
CAT=Support&VRL=ENG&SA=GN&Go.x=34&Go.y=20
-- My problem is that in a webservice call:
HttpWebRequest webreq = (HttpWebRequest)WebRequest.Create(serverURL);
HttpWebResponse webresp = (HttpWebResponse)webreq.GetResponse();
StreamReader strm = new StreamReader(webresp.GetResponseStream(),
Encoding.ASCII);
StringBuilder strContent = new StringBuilder("");
sTemp="<MSInfoResponse>";
sContentTemp = strm.ReadToEnd();
strContent.Append(sContentTemp);
string contents=strContent.ToString();
strm.Close();
sTemp+=contents+"</MSInfoResponse>";
result=sTemp;
-- this returns the following exception:
System.Net.WebException: Too many automatic redirections attempted.
at System.Net.HttpWebRequest.CheckFinalStatus()
at System.Net.HttpWebRequest.EndGetResponse(IAsyncResult asyncResult)
at System.Net.HttpWebRequest.GetResponse()
at MSInfoService.GetInfo(String sType, String sDays)
Anybody got any ideas?