none
Sys.Services.AuthenticationService on IE 11 RRS feed

  • Question

  • I have been using Sys.Services.AuthenticationService for a couple of years on my website but since I installed Internet Explorer 11 it is giving me problems. It is a javascript method that does an ajax style login. It calls the ASP.NET authentication service and I use it for logging in a user without the page refreshing. I used this code that I found as an example (I have pretty much the same code myself):http://msdn.microsoft.com/en-us/library/vstudio/bb398896%28v=vs.100%29.aspx

    It is a very good way of logging in a user as it works in conjunction with the users that are in the ASP.NET membership tables. The above link does not show the web service but I am using one. I have a file called AuthService.asmx which calls AuthService.cs in the App_Code folder. This contains all the methods that correspond to the javascript (login, log out etc.) When they are called in the javascript they get called in the C# also.

    My site is a Visual Studio ASP.NET website and I have placed all the javascript code from that link in the site.master page. It takes the username and password values from the aspx page. Once it goes into the Sys.Services.AuthenticationService.login part it goes to a back-end web service and calls a WebMethod called login. When I set a breakpoint on this method, run my site on localhost and call the login on Firefox or Chrome, it jumps into the method and works perfectly, logging the user in everytime.

    In Internet Explorer it does not jump into the method, it just goes as far as the javascript call Sys.Services.AuthenticationService.login. The usernames and passwords are correct and I have authenticationService enabled in the web.config file. It is only an issue with Internet Explorer 11 as it worked perfectly on older versions.

    If I type the name of the web service into IE 11's address bar, it displays the login web method and I can actually enter the username and password and then it jumps into the method in Visual Studio. It just won't do it in the javascript and as I say, it is only in IE 11.

    I found some other posts online by people that had the same issue but not using Sys.Services.AuthenticationService. There seems to be a problem with Windows Authentication on this version of IE. The solutions I was advised to try were downloading fixes but they didn't work.

    I know there have been issues with Ajax on IE 11 since it was released, this seems like another one. Has anyone had this issue before and resolved it?

    Thank you for any replies.

    Friday, September 5, 2014 6:36 PM

Answers

  • I have been using Sys.Services.AuthenticationService for a couple of years on my website but since I installed Internet Explorer 11 it is giving me problems. It is a javascript method that does an ajax style login. It calls the ASP.NET authentication service and I use it for logging in a user without the page refreshing. I used this code that I found as an example (I have pretty much the same code myself):http://msdn.microsoft.com/en-us/library/vstudio/bb398896%28v=vs.100%29.aspx

    It is a very good way of logging in a user as it works in conjunction with the users that are in the ASP.NET membership tables. The above link does not show the web service but I am using one. I have a file called AuthService.asmx which calls AuthService.cs in the App_Code folder. This contains all the methods that correspond to the javascript (login, log out etc.) When they are called in the javascript they get called in the C# also.

    My site is a Visual Studio ASP.NET website and I have placed all the javascript code from that link in the site.master page. It takes the username and password values from the aspx page. Once it goes into the Sys.Services.AuthenticationService.login part it goes to a back-end web service and calls a WebMethod called login. When I set a breakpoint on this method, run my site on localhost and call the login on Firefox or Chrome, it jumps into the method and works perfectly, logging the user in everytime.

    In Internet Explorer it does not jump into the method, it just goes as far as the javascript call Sys.Services.AuthenticationService.login. The usernames and passwords are correct and I have authenticationService enabled in the web.config file. It is only an issue with Internet Explorer 11 as it worked perfectly on older versions.

    If I type the name of the web service into IE 11's address bar, it displays the login web method and I can actually enter the username and password and then it jumps into the method in Visual Studio. It just won't do it in the javascript and as I say, it is only in IE 11.

    I found some other posts online by people that had the same issue but not using Sys.Services.AuthenticationService. There seems to be a problem with Windows Authentication on this version of IE. The solutions I was advised to try were downloading fixes but they didn't work.

    I know there have been issues with Ajax on IE 11 since it was released, this seems like another one. Has anyone had this issue before and resolved it?

    Thank you for any replies.

    IE10 introduced changes to how content can be written to the DOM. toStaticHTML is applied on any element.innerHTML statements. This can prevent javascript from being injected with the ajax response body.

    Use the F12>Networking tab to examine the ajax response body content....

    If it contains scripts, remove them and place them with calls from an asp.net script manager in the head section.

    Post questions about html, css and scripting to the IE web development forum. Include with your questions a link to your website or a publicly accessible mashup that shows the issue.

    Questions regarding Internet Explorer 8, 9 and 10 and Internet Explorer 11 for the IT Pro Audience. Topics covered are: Installation, Deployment, Configuration, Security, Group Policy, Management questions. If you are a consumer looking for answers or to raise a question, it's highly recommended you head on over to http://answers.microsoft.com


    Rob^_^

    Saturday, September 6, 2014 4:22 AM

All replies

  • In Internet Explorer it does not jump into the method, it just goes as far as the javascript call Sys.Services.AuthenticationService.login. The usernames and passwords are correct and I have authenticationService enabled in the web.config file. It is only an issue with Internet Explorer 11 as it worked perfectly on older versions.

    .

    I'm not clear if you are debugging from the point of view of your website or the IE client.  E.g. on the client have you tried using the script debugger to understand the symptom?  Also, any change if the client requests emulation, either with Compatibility view (for IE7 Quirks mode) or the Developer Tools, Emulation tab (for anything else)?


    Robert Aldwinckle
    ---

    Friday, September 5, 2014 8:03 PM
    Answerer
  • It doesn't work when debugging the website in Visual Studio or when it is on a live site (just accessed in a normal browser session). It doesn't request emulation either.
    Friday, September 5, 2014 8:17 PM
  • I have been using Sys.Services.AuthenticationService for a couple of years on my website but since I installed Internet Explorer 11 it is giving me problems. It is a javascript method that does an ajax style login. It calls the ASP.NET authentication service and I use it for logging in a user without the page refreshing. I used this code that I found as an example (I have pretty much the same code myself):http://msdn.microsoft.com/en-us/library/vstudio/bb398896%28v=vs.100%29.aspx

    It is a very good way of logging in a user as it works in conjunction with the users that are in the ASP.NET membership tables. The above link does not show the web service but I am using one. I have a file called AuthService.asmx which calls AuthService.cs in the App_Code folder. This contains all the methods that correspond to the javascript (login, log out etc.) When they are called in the javascript they get called in the C# also.

    My site is a Visual Studio ASP.NET website and I have placed all the javascript code from that link in the site.master page. It takes the username and password values from the aspx page. Once it goes into the Sys.Services.AuthenticationService.login part it goes to a back-end web service and calls a WebMethod called login. When I set a breakpoint on this method, run my site on localhost and call the login on Firefox or Chrome, it jumps into the method and works perfectly, logging the user in everytime.

    In Internet Explorer it does not jump into the method, it just goes as far as the javascript call Sys.Services.AuthenticationService.login. The usernames and passwords are correct and I have authenticationService enabled in the web.config file. It is only an issue with Internet Explorer 11 as it worked perfectly on older versions.

    If I type the name of the web service into IE 11's address bar, it displays the login web method and I can actually enter the username and password and then it jumps into the method in Visual Studio. It just won't do it in the javascript and as I say, it is only in IE 11.

    I found some other posts online by people that had the same issue but not using Sys.Services.AuthenticationService. There seems to be a problem with Windows Authentication on this version of IE. The solutions I was advised to try were downloading fixes but they didn't work.

    I know there have been issues with Ajax on IE 11 since it was released, this seems like another one. Has anyone had this issue before and resolved it?

    Thank you for any replies.

    IE10 introduced changes to how content can be written to the DOM. toStaticHTML is applied on any element.innerHTML statements. This can prevent javascript from being injected with the ajax response body.

    Use the F12>Networking tab to examine the ajax response body content....

    If it contains scripts, remove them and place them with calls from an asp.net script manager in the head section.

    Post questions about html, css and scripting to the IE web development forum. Include with your questions a link to your website or a publicly accessible mashup that shows the issue.

    Questions regarding Internet Explorer 8, 9 and 10 and Internet Explorer 11 for the IT Pro Audience. Topics covered are: Installation, Deployment, Configuration, Security, Group Policy, Management questions. If you are a consumer looking for answers or to raise a question, it's highly recommended you head on over to http://answers.microsoft.com


    Rob^_^

    Saturday, September 6, 2014 4:22 AM