TempData and Session Variables not working in IIS 8.5 (Deploy), on my local machine with visual studio iis it works

My application is developed in asp.netcore 5 mvc, in a controller method I assign values ​​to TempData and then redirect to a view, the method that does this is of type Post. Then in the called view I use the values ​​of the TempData.

When I run the aplication on my local machine (I'm using Visual studio 2019) with the iis built into visual studio everything works fine. If I do a deploy and run the application from IIS (8.5) the application does not work correctly, the TempData values ​​are not shown. The same problem occurs if I use session variables.

In the IIS site I already have the Session State configured and it doesn't work.

If you can help me I would appreciate it.

I would like TempData to work correctly when doing a redirect action on the controller when the application is in IIS, because it currently only works correctly on my local machine.

I would like to know if it is an IIS configuration problem or something should be done in the application code so that it does not only work locally.

Upvotes: 0

Views: 170

Answers (0)

Related Questions