halit
halit

Reputation: 1128

ASP.NET Session state has created a session id, but cannot save

I get error below,

Session state has created a session id, but cannot save it because the response was already flushed by the application.

But I dont'use Session any where. My application works as API and It doesn't use session State.

And in Web.config

 <system.web>
  <sessionState mode="Off"></sessionState>
  </system.web>

Why this error going on every request.

I have read that topic. but He uses Session state. but I won't

What's causing “Session state has created a session id, but cannot save it because the response was already flushed by the application.”

Thanks

Upvotes: 1

Views: 2381

Answers (1)

Aristos
Aristos

Reputation: 66641

Try to remove also the session module on web.config as

<httpModules>
  <remove name="Session" />
</httpModules>

After that, there is always the possibility some part of your code, or other code that you include to your application, to try to use session -

Upvotes: 2

Related Questions