- Moderator
- #291
So i think it crash here :
Can you try attached bin ?
Code:
/// <summary>
/// Attempt to get XML web response via HTTP
/// </summary>
/// <param name="querystring">Querystring to be passed to webservice</param>
/// <param name="httpMethod">GET or POST</param>
/// <param name="useHttps">Whether to use HTTPS</param>
/// <returns>The xml returned by Webservice</returns>
/// <exception cref="LastFMException">Details of last.fm error or will wrap actual exception as inner exception</exception>
private static XDocument GetXml(string querystring, string httpMethod, bool useHttps)
{
HttpWebResponse response;
XDocument xDoc;
var url = useHttps ? BaseURLHttps : BaseURL;
if (httpMethod == "GET")
{
url = url + "?" + querystring;
}
bool webExceptionStatus = false;
var postArray = Encoding.UTF8.GetBytes(querystring);
var request = (HttpWebRequest) WebRequest.Create(url);
request.Method = httpMethod;
request.ServicePoint.Expect100Continue = false;
if (httpMethod == "POST")
{
request.ContentType = "application/x-www-form-urlencoded";
request.ContentLength = postArray.Length;
var s = request.GetRequestStream();
s.Write(postArray, 0, postArray.Length);
s.Close();
}
Can you try attached bin ?