I’ve created an MVC project with windows authentication.
From my views, I use Jquery to retrieve data from the controller asynchronously in order to provide a better user experience and reduce loading times.
These functions look like
public JsonResult someFunction(string parameter)
return Json(result, JsonRequestBehavior.AllowGet);
Everythings works as I want in Chrome, where it prompts me for login when I open the page and no more for the duration of that session. However, in IE, it prompts me for login when I open the page, and on every single ajax call…
Why is this happening and how can I avoid it?
I need to use windows authentication and IE, I can’t change that…
I’m quite new to MVC, so maybe there’s another way to do what I want.
I can live with only having authentication on certain functions and when first opening the web application.
If it prompts you for a login you’re not using windows authentication, you’re using basic authentication. Windows Auth is seamless with no pop-up box.
go through the below link, if you are administration in your machine, you would be able to make this setting in IE. the pop will not be shown anymore.
Ok. Strangely enough, when I published the site on a server, it worked exactly as I wanted. It only occurs when running it from Visual Studio.
Thanks, that helped, I already got the "Enable Integrated Windows Authentication" option enabled, as I found that when trying to find solutions for my problem. However, I hadn’t added the page to the sites section. It works like a charm now!