.AspNetApplicationCookie and ASP.NET_SessionId not created - asp.net

I have application developed in ASP.Net 4.5 Web forms.
My Issue is I have hosted this site in IIS and first login .AspNetApplicationCookie and ASP.NET_SessionId cookies are created and log-in works fine.
Let say if user clears browser history and tries again to log-in, these 2 cookies are not created and hence not able to go to next page. I have used
default Application Cookie authentication.
I have tested IE, chrome and firefox browsers.
I tried to reset IIS and cookies are created again by site.
I have worked on some know issue
• installed framework from 4.0 to 4.5.
• Creating app_browser files specific to IE
I am stuck with this issue. Any help would be great. Thanks!

Related

How to Get Authentication working on IIS 8.5 after migration from IIS6

I have migrated a asp.net web site from IIS6 to IIS8.5. Almost all issues are fixed. But it seems that the identity of the user gets lost.
Related questions I found:
Cannot get authentication working in IIS 8.5
Configure windows Authentication in IIS 8.5 on Windows Server 2012
Receiving login prompt using integrated windows authentication
When I open the webpage from the server IE browser there is no login prompt (which would be fine if the integrated authentication was used)
When I open the webpage from a remote client I should get a login prompt for authentication (since the user on the client does not exist on the server). But there is none.
On the old platform IE6 was used. On the new platform IE is used with compatibility mode
In the old web page integrated windows authentication (only) is enabled and working.
In the new web page on IIS 8.5 I tried all kind of settings but none seem to do the trick.
Found out that actually the authentication itself is working.
This link was very helpful finding this out:
https://forums.asp.net/t/1179997.aspx?Get+Username+for+logged+in+user
But the user name gets lost in a different way. I will close this question and post another one.

Safari, ASP.NET 4, and LinkButton

I have an ASP.NET Web Application using .NET Framework 4 and it is working fine on all browser when I test it locally using my Visual Studio Pro 2010, but when we deploy it to our server (IIS7 on Windows Server 2008 R2), the LinkButtons of my Web Application is not working correctly on Safari Browser on all platforms.
What was happening was when the LinkButton has a function that uses Response.Redirect, it somewhat clears the session or doesn't save it. I can check this since when I redirect to another page, I save the values inputted to a session first before redirecting, and validate it to the redirected page and if there's no session, bring it back to the previous page.
I have already implemented this fix to add a .browser file to my webapp but it doesn't fix my problem. I also tried this answer from SO to add a Page_PreInit and a configuration but to no avail.
My IIS Configuration has enabled for both Session and Cookies, and I honestly do not see why it will only affect Safari Browser if it is a server configuration error.
I've been working on this bug for a whole day and I can't still fix this. Please help, thanks in advance.
Update: I forgot to mention that my website is inside an iframe, after researching further I have found this question that says that Safari doesn't allow Third-Party Cookie by default. Now I can't use the said fix since my application is in ASP.NET not in PHP.

Postback is not working in Safari in Windows 7

Our QA team reported that one of our applications is not working in Safari in Windows 7. After checking the problem we figured out that any postback event is not working. After some tries we found that Page.IsPostback() reports false and thinks it’s a first-time load of the page and postback did not include ViewState.
We tried many solutions including
ASP.Net postback problem with ViewState in Safari on Windows 7
Viewstate invalid when using Safari
ViewState Chunking in ASP.NET 2.0 (maxPageStateFieldLength)
but all didn't bring Safari to work.
There is nothing special about this application. It is normal pages that use one master page that is a very normal master page.
Any suggestions?
Safari has an issue when working with Windows Authentication under IIS if Negotiate provider is enabled so AJAX POST is not working.
How to resolve?
In IIS, go to the Authentication settings of your website. Right click on Windows Authentication, choose providers and remove Negotiate, leaving NTLM this makes everything works fine.
[References]
AJAX POST Request Only Works Once in Safari 5
Negotiate Mechanism article in Wikipedia shows that it is not implemented in Safari

iis7 integrated mode asp.net 4.0 forms authentication problem using IE8

Anyone experience any issues with IIS7, integrated mode forms authentication while using IE8? I have a website with a login form, once logged in, any postback causes the user to be logged out. This doesn't even happen consistently, sometimes I can login and not experience this issue, other times it happens instantly. I can not replicate the problem in any other browser and I cannot replicate on my development machine running / debugging vs2010.
Is your application on a server farm? If so, ensure your web.config's have matching machine keys - http://msdn.microsoft.com/en-us/library/w8h3skw9(v=VS.100).aspx

Does Integrated Windows Authentication work in Firefox?

If my ASP.NET app is set up for ADFS using Windows Integrated Authentication, I know this will work in IE, but will it work in Firefox?
I've seen some things on the web that indicate that there are problems, and you need to put a workaround in each client browser - http://codebetter.com/blogs/eric.wise/archive/2006/11/16/Note-to-self_3A00_-Firefox-Windows-Authentication.aspx
It's not a workaround. Firefox will not send your Windows Integrated Credentials to a website by default. You have to tell it to "trust" the website.
You could display those instructions on a page you direct unauthenticated users to.

Resources