次の方法で共有


MMS Demo - Discovery and operational data insertion via SDK

I put together and presented a short demostration on the SDK at MMS on Monday. I think it went over well and was a short glimspe on some of the power of the SDK. I wanted to make my demo available so here it is. Let me know if there are any issues with it.

MMS2007.Demo.zip

Comments

  • Anonymous
    April 05, 2007
    I have ran into some problems. I have my sdk client (remote to RMS) running for several times. Then I disconnected from the network before shutting down the client. Then everytime when I run the client again, it cause the ServerDisconnectedException ->The client has been disconnected from the server. Please call ManagementGroup.Reconnect() to reestablish the connection. Through the stack trace, it points to this function: ManagementGroup^ mg = gcnew ManagementGroup(host); Question: How can I call reconnect without creating the ManagementGroup first? How can I solve or get around the problem? Thanks. Steve

  • Anonymous
    April 05, 2007
    I am not sure I fully understand. If you client completely shuts down, upon restart creating a new ManagementGroup object fails? If this is the case, any errors in the event log on the RMS? If you mean that while running your client begins to get these exceptions, then you need to call Reconnect on the ManagementGroup instance.

  • Anonymous
    April 05, 2007
    The comment has been removed

  • Anonymous
    April 05, 2007
    Can you open the UI from this machine? When you say you deleted the db, you just mean you uninstalled, deleted db and reinstalled, correct?

  • Anonymous
    April 05, 2007
    The UI Console generates the same exception.

  • Anonymous
    April 05, 2007
    I move my app to RMS, it runs ok there. There must be some cache on client computer.

  • Anonymous
    April 05, 2007
    Uninstall/reinstall UI console on this computer does not solve the problem. Yes uninstall RMS, delete directory, delete db, reinstall.

  • Anonymous
    April 05, 2007
    Here is the exception from UI: ========================================== Date: 4/5/2007 9:18:43 PM Application: System Center Operations Manager 2007 Application Version: 6.0.5000.0 Severity: Error Message: Failed to connect to server 'mom2sim2007' Microsoft.EnterpriseManagement.Common.ServerDisconnectedException: The client has been disconnected from the server. Please call ManagementGroup.Reconnect() to reestablish the connection. ---> System.ServiceModel.CommunicationException: The server did not provide a meaningful reply; this might be caused by a contract mismatch, a premature session shutdown or an internal server error. Server stack trace:   at System.ServiceModel.Channels.ServiceChannel.Call(String action, Boolean oneway, ProxyOperationRuntime operation, Object[] ins, Object[] outs, TimeSpan timeout)   at System.ServiceModel.Channels.ServiceChannel.Call(String action, Boolean oneway, ProxyOperationRuntime operation, Object[] ins, Object[] outs)   at System.ServiceModel.Channels.ServiceChannelProxy.InvokeService(IMethodCallMessage methodCall, ProxyOperationRuntime operation)   at System.ServiceModel.Channels.ServiceChannelProxy.Invoke(IMessage message) Exception rethrown at [0]:   at System.Runtime.Remoting.Proxies.RealProxy.HandleReturnMessage(IMessage reqMsg, IMessage retMsg)   at System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke(MessageData& msgData, Int32 type)   at Microsoft.EnterpriseManagement.Common.ISessionManager.Connect(Boolean useCache)   at Microsoft.EnterpriseManagement.DataAbstractionLayer.SdkDataAbstractionLayer.CreateChannel(TieredManagementGroupConnectionSettings managementGroupTier)   --- End of inner exception stack trace ---   at Microsoft.EnterpriseManagement.DataAbstractionLayer.SdkDataAbstractionLayer.HandleIndigoExceptions(Exception ex)   at Microsoft.EnterpriseManagement.DataAbstractionLayer.SdkDataAbstractionLayer.CreateChannel(TieredManagementGroupConnectionSettings managementGroupTier)   at Microsoft.EnterpriseManagement.DataAbstractionLayer.SdkDataAbstractionLayer..ctor(DuplexChannelFactory`1 channelFactory, TieredManagementGroupConnectionSettings managementGroupTier, IClientDataAccess callback, CacheMode cacheMode)   at Microsoft.EnterpriseManagement.DataAbstractionLayer.SdkDataAbstractionLayer.CreateEndpoint(ManagementGroupConnectionSettings connectionSettings, IClientDataAccess clientCallback)   at Microsoft.EnterpriseManagement.DataAbstractionLayer.SdkDataAbstractionLayer.Connect(ManagementGroupConnectionSettings connectionSettings)   at Microsoft.EnterpriseManagement.ManagementGroup..ctor(ManagementGroupConnectionSettings connectionSettings)   at Microsoft.EnterpriseManagement.ManagementGroup.Connect(ManagementGroupConnectionSettings connectionSettings)   at Microsoft.EnterpriseManagement.Mom.Internal.UI.Common.ManagementGroupSessionManager.Connect(String server, String username, SecureString password, String domain)   at Microsoft.EnterpriseManagement.Mom.Internal.UI.Console.ConsoleWindowBase.ConnectWithCredentials(Exception ex, ConsoleJobEventArgs args) System.ServiceModel.CommunicationException: The server did not provide a meaningful reply; this might be caused by a contract mismatch, a premature session shutdown or an internal server error. Server stack trace:   at System.ServiceModel.Channels.ServiceChannel.Call(String action, Boolean oneway, ProxyOperationRuntime operation, Object[] ins, Object[] outs, TimeSpan timeout)   at System.ServiceModel.Channels.ServiceChannel.Call(String action, Boolean oneway, ProxyOperationRuntime operation, Object[] ins, Object[] outs)   at System.ServiceModel.Channels.ServiceChannelProxy.InvokeService(IMethodCallMessage methodCall, ProxyOperationRuntime operation)   at System.ServiceModel.Channels.ServiceChannelProxy.Invoke(IMessage message) Exception rethrown at [0]:   at System.Runtime.Remoting.Proxies.RealProxy.HandleReturnMessage(IMessage reqMsg, IMessage retMsg)   at System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke(MessageData& msgData, Int32 type)   at Microsoft.EnterpriseManagement.Common.ISessionManager.Connect(Boolean useCache)   at Microsoft.EnterpriseManagement.DataAbstractionLayer.SdkDataAbstractionLayer.CreateChannel(TieredManagementGroupConnectionSettings managementGroupTier)

  • Anonymous
    April 05, 2007
    The only thing I can think of is that perhaps the UI is a different version than the server. Is everything RTM? Also, have you tried this from another remote machine?

  • Anonymous
    April 06, 2007
    I am using the eval version of SCOM (MMS2007). The exception says "this might be caused by a contract mismatch, a premature session shutdown or an internal server error." I believe "a premature session shutdown" is the reason. But how come it becomes to a fatal error? I will try to find another machine to install UI. But I believe it will run OK.

  • Anonymous
    April 06, 2007
    How comfortable are you with debugging? =) The problem here is that somewhere on the WCF stack we are getting an exception that is termintating the channel. This is happening either on the server or the client, but it is happening outside of any code that we own and thus is manifesting itself as a ServerDisconnectedException. Since we can't connect, it is effectively a fatal error.

  • Anonymous
    November 02, 2007
    The comment has been removed