locked
Lightswitch HTMLclient App loads for ever - spanish is not supported RRS feed

  • Question

  • Hi,

    the loading splash screen of my HTML client LightSwitch application is shown for ever if the page is called from a Chrome Browser that has set his language to Spanish (Latin America).
    In the browser debug window I see this as the last file the browser tries to get:

    https://ajax.aspnetcdn.com/ajax/globalize/0.1.1/cultures/globalize.culture.ES-419.js Failed to load resource: the server responded with a status of 404 (Not Found)

    My target is that i would just load the default language files */HTMLClient/Content/Resources/client.lang-EN-US.resjson and run. The file is actually loaded as well but the application seems to get stuck then with the globalize.culture file.

    Thank you for any help or workaround!

    Spikey

    Tuesday, April 7, 2015 2:52 PM

Answers

  • Good point. I forced my IE language settings to use es-419 (by configurating a custom language code). And it runs without problems. It still does not find the globalize culture file, but the application does not block: it works in IE!

    http://ajax.aspnetcdn.com/ajax/globalize/0.1.1/cultures/globalize.culture.ES-419.js GET 404 text/html 340 B 437 ms <script> 702 0 437 0 0 3167

    The headers, IE sent were like this:
    Request GET /ajax/globalize/0.1.1/cultures/globalize.culture.ES-419.js HTTP/1.1
    Accept application/javascript, */*;q=0.8
    Referer http://localhost:61610/HTMLClient/
    Accept-Language es-419
    User-Agent Mozilla/5.0 (compatible; MSIE 10.0; Windows NT 6.1; WOW64; Trident/6.0)
    Accept-Encoding gzip, deflate
    Host ajax.aspnetcdn.com
    DNT 1
    Connection Keep-Alive


    -> So, I have no clue anymore, because it seems not to come from the globalize code.

    Appendix: I just saw that in IE after 0.5 secs of waiting for globalize.culture.ES-419.js, IE receives the alternative culture file globalize.culture.ES.js.

    On Chrome this file is never accessed.

    • Edited by Sp1key Thursday, April 9, 2015 7:57 AM
    • Marked as answer by Angie Xu Monday, May 11, 2015 1:45 AM
    Thursday, April 9, 2015 7:44 AM
  • HI Sp1key,

    Thanks for sharing your experience with us.

    From your description above, it seems that this issue is related to Chrome browser, you could also submit this issue to Microsoft Connect Site, Microsoft VS team engineers will evaluate this issue seriously, and they will give positive response for this problem.

    Please let me know if there is anything that I can do to help.

    Best regards,

    Angie


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.

    • Marked as answer by Angie Xu Monday, May 11, 2015 1:46 AM
    Monday, April 20, 2015 2:32 AM

All replies

  • Ok, I found out:
    a) Chrome is sending a HTTP request header that causes the problem
    HTTP_ACCEPT_LANGUAGE=es-419,es;q=0.8,en-US;q=0.6,en;q=0.4
    b) according to the RFC http://tools.ietf.org/html/rfc5646 , which especially mentions es-419, this is correct behviour

    -> It seems to me that the latest version of globalize (0.1.1), which is available through ajax.aspnetcdn.com 
    which I use in my default.htm of my LightSwitch HTMLClient, cannot handle this:

    ...
    <script type="text/javascript" src="//ajax.aspnetcdn.com/ajax/globalize/0.1.1/globalize.min.js"></script> <script type="text/javascript" src="//ajax.aspnetcdn.com/ajax/globalize/0.1.1/globalize.js"></script>
    ...

    Not sure how to fix this, if I can not update globalize. Or is it some language related code inside the LightSwitch generated DLL, which cannot handle this tag?

    thank you



    • Edited by Sp1key Wednesday, April 8, 2015 9:33 AM clarified the final thoughts
    Wednesday, April 8, 2015 9:22 AM
  • Ok, I found out:
    a) Chrome is sending a HTTP request header that causes the problem
    HTTP_ACCEPT_LANGUAGE=es-419,es;q=0.8,en-US;q=0.6,en;q=0.4
    b) according to the RFC http://tools.ietf.org/html/rfc5646 , which especially mentions es-419, this is correct behviour

    Great point. Does it work fine using IE browser?
    Wednesday, April 8, 2015 9:44 AM
  • Good point. I forced my IE language settings to use es-419 (by configurating a custom language code). And it runs without problems. It still does not find the globalize culture file, but the application does not block: it works in IE!

    http://ajax.aspnetcdn.com/ajax/globalize/0.1.1/cultures/globalize.culture.ES-419.js GET 404 text/html 340 B 437 ms <script> 702 0 437 0 0 3167

    The headers, IE sent were like this:
    Request GET /ajax/globalize/0.1.1/cultures/globalize.culture.ES-419.js HTTP/1.1
    Accept application/javascript, */*;q=0.8
    Referer http://localhost:61610/HTMLClient/
    Accept-Language es-419
    User-Agent Mozilla/5.0 (compatible; MSIE 10.0; Windows NT 6.1; WOW64; Trident/6.0)
    Accept-Encoding gzip, deflate
    Host ajax.aspnetcdn.com
    DNT 1
    Connection Keep-Alive


    -> So, I have no clue anymore, because it seems not to come from the globalize code.

    Appendix: I just saw that in IE after 0.5 secs of waiting for globalize.culture.ES-419.js, IE receives the alternative culture file globalize.culture.ES.js.

    On Chrome this file is never accessed.

    • Edited by Sp1key Thursday, April 9, 2015 7:57 AM
    • Marked as answer by Angie Xu Monday, May 11, 2015 1:45 AM
    Thursday, April 9, 2015 7:44 AM
  • HI Sp1key,

    Thanks for sharing your experience with us.

    From your description above, it seems that this issue is related to Chrome browser, you could also submit this issue to Microsoft Connect Site, Microsoft VS team engineers will evaluate this issue seriously, and they will give positive response for this problem.

    Please let me know if there is anything that I can do to help.

    Best regards,

    Angie


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.

    • Marked as answer by Angie Xu Monday, May 11, 2015 1:46 AM
    Monday, April 20, 2015 2:32 AM