locked
Durandal application optimization and deployment in distributed environment with CORS support RRS feed

  • Question

  • User-558484894 posted

    Hi,
    This is my first application using durandal js. I am facing some issues, it will great if you can share your thoughts on these.
    1. I am using durandal visual studio stater kit for my application development. I need to host this app in a load balanced environment. So there will be some web servers across load balancer which will host my web pages. Then there will be some more servers across second load balancer which will host my Services. The advantage being the web services can be called from my web application as well as my Android/iOS/Windows phone apps. How it will support CORS?


    The question now is where in durandal code I can put my server details (i.e. load balancer IP) so that the client side code points to correct servers. How can I make this configurable.
    2. While preparing for release whenever i change the debug mode in config file to false, I donot see my site output. I get the default output on browser. I think the problem is when i run my program with debug= false the application start referring to main.js.min. Due to some reason this file is never update with my latest code. It still has the same old default code.
    a. Am I missing something here?
    b. Why the wayland config stuff is not working?
    c. Does anyone have step by step instructions to fix this?

    Friday, February 27, 2015 4:32 AM

Answers

  • User1918509225 posted

    Hi Balvvant,

    For Durandal belongs to the third party library  which is out of our support scope, I suggest that you could post it to their forum for a professional solution:

    https://groups.google.com/forum/#!forum/durandaljs

    Best Regards,

    Kevin Shen.

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Wednesday, March 4, 2015 12:37 AM

All replies

  • User1918509225 posted

    Hi Balvvant,

    For Durandal belongs to the third party library  which is out of our support scope, I suggest that you could post it to their forum for a professional solution:

    https://groups.google.com/forum/#!forum/durandaljs

    Best Regards,

    Kevin Shen.

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Wednesday, March 4, 2015 12:37 AM
  • User-558484894 posted

    Thanks Kevin,

    But there is one question which you can defintely help is CORS implementation. My services are residing on a server. These services will be called from my web application as well as mobile application. To support such arrangement my services should implement support for CORS. As mentioned in many blogs and articles I have implemented following code in my web api 2 service configuration to allow CORS globally.

    public static class WebApiConfig
    {
      public static void Register(HttpConfiguration config)
      {
        // Other configuration omitted
        config.EnableCors(new EnableCorsAttribute("*", "*", "*"));
      }
    }

    The issue is still the client get error saying "CORS not enabled"?

    Any help.

    I need to implement 

    Wednesday, March 11, 2015 2:25 AM