ServerUtilities.GetGroupInfo(ServerUtilities.GetServerEnvironment()) is returning null in the public byte[] HandleRESTRequest method of SOI.
What could be causing this, and/or where to look for possible cause/debug?
Thanks.
Solved! Go to Solution.
This was actually occurring in arcgis-enterprise-sdk-resources-master sample, in LayerAccessSOI project... seems error is occurring in FilterRESTRequest (which is downstream) from the HandleRESTRequest method where the user role and group information is retrieved... but in FilterRESTRequest where in line:
var newResponse = restFilterOp.PostFilter(restInput, response, responseProperties, out newResponseProperties);
responseProperties = newResponseProperties;
return newResponse;
returns null to newResponse this behavior occurs... Not 100% sure yet, why, but when I substituted the following:
var newResponse = restFilterOp.PostFilter(restInput, response, responseProperties, out newResponseProperties) ?? response;
where response is the response from call to restRequestHandler.HandleRESTRequest in a line above in the same method, so that newResponse will never be null, then this issue in FilterRESTRequest disappears.
For now this is workaround, which seems to work...
This was actually occurring in arcgis-enterprise-sdk-resources-master sample, in LayerAccessSOI project... seems error is occurring in FilterRESTRequest (which is downstream) from the HandleRESTRequest method where the user role and group information is retrieved... but in FilterRESTRequest where in line:
var newResponse = restFilterOp.PostFilter(restInput, response, responseProperties, out newResponseProperties);
responseProperties = newResponseProperties;
return newResponse;
returns null to newResponse this behavior occurs... Not 100% sure yet, why, but when I substituted the following:
var newResponse = restFilterOp.PostFilter(restInput, response, responseProperties, out newResponseProperties) ?? response;
where response is the response from call to restRequestHandler.HandleRESTRequest in a line above in the same method, so that newResponse will never be null, then this issue in FilterRESTRequest disappears.
For now this is workaround, which seems to work...