I see several responses to this issue however none seem to work in my case. Here is the situation.
I’m working with the API from thetvdb.com.
I am loading XML via API. If I run the application it will give me a 401 error. If I load the URL in IE first then run the application it loads fine.
I suspect its a cookie issue but I am not sure how to pass that cookie during my request below.
var _doc = new XmlDocument();
_doc.Load(_url);
Thanks in advance for your help.
HTTP error 401 means “unauthorized”.
It means you need to contact the people providing the API and ask them how to authenticate.
It’s different with every provider.
The right people to ask are the ones that provide the web services/API.