Posts

Showing posts from November, 2019

avoid Caching in asp net mvc

for all actions in controller: [OutputCache(NoStore = true, Duration = 0, Location="None", VaryByParam = "*")] OR [OutputCache(NoStore = true, Duration = 0, VaryByParam = "None")] for special action: [ NoCache ] https://docs.microsoft.com/en-us/iis/configuration/system.webServer/caching/ https://forums.asp.net/t/2146531.aspx?Disable+cache+in+ASPNET+MVC

API web server get error: {"message":"an error has occurred"}

in web.config, add: < system . web > < customErrors mode = "Off" ></ customErrors > </ system . web > and < system . webServer > < httpErrors errorMode = "Detailed" existingResponse = "PassThrough" ></ httpErrors > </ system . webServer >