Get IFeatureServerInfo within Server Object Interceptor?

976
3
Jump to solution
05-29-2017 11:16 PM
JordanKing3
New Contributor III

Hey All,

I'm trying to get an instance of an IFeatureServerInfo within my Server Object Interceptor. I want to do this so that I can get the MaxRecorcdCount property on the Feature Service (http://desktop.arcgis.com/en/arcobjects/latest/net/webframe.htm#IFeatureServerInfo.htm ).

Does anyone know of a way to use the IServerObjectHelper (or something else...) to create an instance of IFeatureServerInfo?

Alternatively, does anyone know of another way to get the MaxRecordCount from the Feature Service within the SOI?

Cheers,

Jordan

0 Kudos
1 Solution

Accepted Solutions
nicogis
MVP Frequent Contributor

you can use MaxRecordCount of IMapServerInit

Feature service (no hosted) as a special case of a map server's services, map service is a prerequisite for a feature service

View solution in original post

3 Replies
MirHashmi
Occasional Contributor

Hi Jordan,

After checking the class references there is nowhere I could find FeatureServer to be accessed by ServerObject.

IServerObjectHelper has a class "ServerObject" as its member.

And unfortunately i see that IServerObject have access to all others except FeatureServer.

nicogis
MVP Frequent Contributor

you can use MaxRecordCount of IMapServerInit

Feature service (no hosted) as a special case of a map server's services, map service is a prerequisite for a feature service

JordanKing3
New Contributor III

Hey Domenico,

Awesome find, thanks for the help!

IMapServerInit2 mapServerInit = (IMapServerInit2)pSOH.ServerObject;

mapServerInit.MaxRecordCount;

Cheers,

Jordan

0 Kudos