XProtect Mobile Server app on different server

My web application uses mobile protocol on a different machine than the one that Mobile Server is installed so i followed this :

https://supportcommunity.milestonesys.com/s/article/XProtect-Mobile-Server-app-on-different-server-CORS?language=en_US

but it did not work, the response is:

“Failed to load http://10.20.100.129:8081/XProtectMobile/Communication: Response to preflight request doesn’t pass access control check: No ‘Access-Control-Allow-Origin’ header is present on the requested resource. Origin ‘http://localhost:13595’ is therefore not allowed access.”

someone can help me?

Perhaps you have an old Mobile Server version. Please make sure you have the newest version. Currently the newest version is 2018R1.

OK perfect, with the new version it works ty.

The 2018 version only supports Ajax (and not WebSocket) as type of communication?

When i try to use WS channel it gives me this error:

“WebSocket connection to ‘ws://10.20.67.105:8081/XProtectMobile/Video/2a91bbd8-469a-42af-8931-cd1e52e1435d/’ failed: Error during WebSocket handshake: Unexpected response code: 200”

Hi Arianna,

The latest version of the Mobile server does support WebSockets (as well as AJAX).

It however depends also on the OS where the server is installed (should be Windows 8 / 2012 Server or higher).

If the Problem is not in the OS, probably something else is preventing the client to open a web socket.

1. Are you using the XProtect Mobile SDK, or your integration is based on the older Demo app ?

It seems there is an issue in the latest SDK and it tries to open WebSocket connections to the address where the client is running, but not where is connected to.

1.1. I see that addresses in the initial and the secondary post are different.

Is this normal/expected ?

2. Have you tried with different setting in the config file ?

For example instead of:

You can try with

You know that establishing WebSocket is actually a request to different address, because the protocol is different: w[s:\\MyMobileServer](file:s://MyMobileServer):8081.

Another option is try with wildcard:

(It is good at least for test purposes).

3. If none of above work, you could think of disabling the WebSockets. At least as a temporary workaround.