On .net core while trying load my url to XMLDocument i getting that 500 Internal Server Error. While i get datas from same url with HTTPWebRequest it was have same error but after i add
request.Headers.Add("user-agent", "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.2; .NET CLR 1.0.3705;)");
That line it was solved my problem. But now i trying get datas with XML But getting that error again. How can i solve it ? Thanks for replies! My codes for XMLDocument :
string url = "https://www.antalyaeo.org.tr/tr/nobetci-eczaneler";
var xml = new XmlDocument();
xml.Load(url);