06-21-2017 11:55 PM
is it possible to restart the webmap services (or a bat file which do this) with a button from inside the Geospatial Portal (mobile.aspx) application?
(Password protected for administators)
06-22-2017 05:27 AM
I don't want to sound rude, but your question is somewhat vague and prompts the answer that everything is possible given enough effort
In general it shouldn't be a problem to add a new button using the Portal SDK to the mobile.aspx Geospatial Portal layout. This would then make a request to the Geospatial Server server-side components or a different endpoint altogether and trigger the actions you need. Password protecting that button is also achievable. I'm not a Portal SDK expert in any way, so I'm not sure if the authentication functionality is exposed through the API, but I can imagine that with a little effort a custom tailored solution might be cobbled together.
One thing to remember is that the server-side of Geospatial Portal by default runs under the IIS Application Pool user identity. These credentials are by default in the simple Users group and software using those will not be able to do administrative tasks like starting or stopping services. Regardless of whether we are talking about Windows Services or IIS hosted services. One solution to this would be to make the IIS Application Pool identity the member of the computer Administrators group, but that is generally a bad idea for site with a broad server-side API that Geospatial Portal is. Authoring a specific-purpose IIS hosted service, or better yet - Windows Service, that would have the credentials of an Administrator or the Local System and a tightly controlled API is the way to go here.
I'm very curious though as to what are you trying to solve this way? Would you elaborate a bit? Maybe you are experiencing problems which can be solved in some other, less drastic way?
06-27-2017 08:56 AM
Yes you could possibly write a command which can be running the bat files. You would have to do it similar to format converter in the SDK, basically create a custom http handler. However, if you have a batch file you could schedule it on the sever and have it run periodically, As for the actual need of this like in previous GWM 6.1, I would think now WebMap is much better managed by itself and should able to survive without restart for much longer periods .
Hope this helps