ASP.NET ID cannot log in

I have a web application that is created using the asp.net webforms template. It uses the Asp.net identifier for the login process. To make an identifier, use my database, I changed the default connection string to indicate my own database.

I have not made any remarkable changes to the default template for asp.net webforms application.

I published my website and will add it to IIS sites. Now I can get to my website by writing http: // myip in my browser. However, after some time, my login page starts to work. When I log in with my correct username and password, it should redirect me to the page I’m trying to access, but it behaves as if I’m not logged in and returns to the login page again with the reset form .

This is the same as I reload the login page instead of the login.

When I reset my application through IIS, I can log in as usual. It is working correctly.

What is the problem?

Why does my login page sometimes work and sometimes not? Are these my IIS settings? I have not made any wonderful changes to them. They are almost by default.

My operating system is Windows 8.1 Enterprise N

And I am using Visual Studio 2013 (.NET 4.5)

+4
source share
3 answers

It's not very clear if you use Owin + Asp.NET Identity, but (I suppose you are) check out this link, another similar question in SO, which explains this question in great detail and a workaround.

Partial Quote:

System.Web has its own main source of cookie information, and it is not the Set-Cookie header. Owin only knows about the Set-Cookie header. The workaround is to make sure that any cookies set by Owin also

+1
source

, , Crystal Report. " [" "] = 0; ' , : ASP.NET_SessionId + OWIN Cookies

0

. , . - , ?

UPDATE: , Owin (Tools > NuGet Package Manager Console) "Update-Package Microsoft.Owin" . Packages.config, , jQuery.

From several resources, this led to a Response.Flush or .End problem when Owin tried to check / set the login cookie.

http://katanaproject.codeplex.com/discussions/540202 https://www.nuget.org/packages/Microsoft.Owin/3.0.1

Event ID 1309 ASP.NET 4.0.30319.0 Exception message: The server cannot add a header after sending HTTP headers.

-1
source

All Articles