I read that in order to disable caching when using the get and post methods in HttpClient , I need to use WebRequestHandler as my HttpClient HttpClientHandler and change its caching policy. However, WebRequestHandler is not located in System.Net.Http.dll, but rather in System.Net.Http.WebRequest.dll, so I tried to add the DLL to the project as a reference. I got an error message:
Microsoft Visual Studio
Link to a higher version or incompatible assembly cannot be added to the project.
Again, after a short search, I came to the conclusion that the .dll file was blocked because it was downloaded from another source. To unlock it, I kept trying the solution here . However, this did not work either, and I still get the same error when I try to add the .dll file as a link.
All I want to do is disable caching using my HttpClient, am I doing something wrong here? I am open to any advice or help.
My system is Windows 8.1, and I'm using Visual Studio 2013. The project I'm working on is an application for Windows Phone 8. The .dll directory I'm trying to link to is "C: \ Windows \ Microsoft.NET \ Framework \ v4.0.30319 \ System.Net.Http.WebRequest.dll ". Thank you in advance.
halileohalilei
source share