0

I have a working NodeJS API being called from a WPF C# app.

It has been running for 12 months with no issues, using RestSharp from my C# end.

My server went down today (weird spike) and since then about 50% of my calls are responding with cached data from before the crash.

  • NODEJS log shows me the calls.
  • Some calls show up on the log and the correct response is given
  • some calls SAY in C# there is a response but there is NO log of the call occuring in NodeJS. The response is OLD
  • I have changed a NON working call to POST (from GET), ran the call, got exception THEN changed back to GET and now it is working again and appearing in nodejs log.
  • My ngnix cache is off on the server

Also tried:

  • Turning OFF the api completely and running the calls. They are STILL GETTING RESPONSES even though the API is offline.
  • Restoring a backup of the project from before I had the server crash, the old file is doing exactly the same thing/
  • Tried adding pragma and no-cache headers, this didnt fix anything.

Things I checked:

  • My current app is still running fine with all calls working correctly, it is just my vis studio project that is not working (eg. I can't update my app or it will break all terminals).

Does anyone know:

  • Does RESTSHARP have some kind of internal CACHE that it would be getting these fake responses from even then the api is shut down??
  • Or does Vis Studio have some kind of cache that would do that?
GAngel
  • 1
  • 2
  • Check your connection string. – jdweng Jul 07 '22 at 15:38
  • RestSharp has no cache. You can easily check the source code. – Alexey Zimarev Jul 07 '22 at 17:25
  • @AlexeyZimarev thanks for confirming, I've very new and learning so I don't really know how to even figure that out myelf, thanks for helping. – GAngel Jul 07 '22 at 23:17
  • @jdweng All Calls go through the same function using the same con string. C# log shows the path the call was made with. if i copy that path and past into Postman it runs and gives the correct solution. As mentioned, if I make the call with API turned OFF it will still give the same call.. even with the API OFF!! – GAngel Jul 07 '22 at 23:19
  • Are you an ADMIN? Are you running your code from inside VS? VS does not automatically run AS ADMIN. You have to right click the VS shortcut and select Run AS ADMIN. If you run the executable you will run with ADMIN. Inside VS you are not running AS ADMIN. The API server is running different if you are an ADMIN vs regular user. – jdweng Jul 08 '22 at 00:29
  • You simply might have a caching proxy somewhere in your org, and it returns you a cached response. – Alexey Zimarev Jul 08 '22 at 07:55
  • Hi guys, Yes I'm an admin but I will check that. As for proxy.. I have set no proxy up at all. As metnioned.. if I can disconnect the INTERNET and still get a response (but postman fails) wtf is happenign!? – GAngel Jul 11 '22 at 00:36
  • All I can think is I reinstalled microsoft edge the other day.. Some people have been talking about DefaultWebProxy?? Could there be any connection here? – GAngel Jul 11 '22 at 05:52

0 Answers0