SmartConnector Forum
Schneider Electric support forum about SmartConnector applications for integration of other building management systems (BMS) into EcoStruxure Building Operation.
Link copied. Please paste this link to share this article on your social media post.
I'm using an EndPoint SoapEwsRestProvider to get some data from an ES. Everything is working fine except with some Containers that I cannot browse.
For ex, for the container with the id:
00/GTB - SERM/Servers/Serveur Neos_Lazard/1 AS Neos Lazard/1.2- Communication/1.2.2- Réseau IP/Interface Modbus Client TCP/PowerTag - Groupe a Absorbtion/Modbus Signals/Device Configuration Advanced
If I try the request:
/Containers/00%252FGTB%2520-%2520SERM%252FServers%252FServeur%2520Neos_Lazard%252F1%2520AS%2520Neos%2520Lazard%252F1.2-%2520Communication%252F1.2.2-%2520R%25C3%25A9seau%2520IP%252FInterface%2520Modbus%2520Client%2520TCP%252FPowerTag%2520-%2520Groupe%2520a%2520Absorbtion%252FModbus%2520Signals%252FDevice%2520Configuration%2520Advanced/Children?type=Container
I have the error:
<HTML><HEAD><TITLE>Bad Request</TITLE>
<META HTTP-EQUIV="Content-Type" Content="text/html; charset=us-ascii"></HEAD>
<BODY><h2>Bad Request - Invalid URL</h2>
<hr><p>HTTP Error 400. The request URL is invalid.</p>
</BODY></HTML>
The problem is probably the length of the id (or of the url) because if I remove some chars, it works.
Is it a known limitation ?
Thank you.
Link copied. Please paste this link to share this article on your social media post.
Hello!
This is not something I have heard about, I will look into it and see if it is someone on the REST gateways end that can be fixed.
Thank you for bringing this to our attention. I will update when I find something out.
Best Regards,
-Jeff
Link copied. Please paste this link to share this article on your social media post.
Hi!
So I did some digging and this issue actually seems to be an issue with the default Windows "UrlSegmentMaxLength" parameter. This defaults to 260. Since the ID of an object is contain in a URL segment, and your ID is longer than 260, you are receiving this error.
In order to change it, you need to add a registry key at HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\HTTP\Parameters
Name: UrlSegmentMaxLength
type: DWORD
Value: 0 - 32,766 (I did 1000 in my test)
Once you add this registry key, restart your computer, and it should work. You can find more info about how to add this key in the below link.
https://support.microsoft.com/en-us/help/820129/http-sys-registry-settings-for-windows
Let me know if you run into any problems.
Best Regards,
-Jeff
Create your free account or log in to subscribe to the board - and gain access to more than 10,000+ support articles along with insights from experts and peers.