M
Mats-Erik Grundh
Remoting calls problem!
I have problem with remoting calls, sometimes the application "locks" about
2 minutes when i call the server before it releases the remoting call and
everything is normal again. Sometimes the application just ends without any
exception.
Problem code:
Client remoting setup:
======================
' Register the HTTP Channel
Dim channelProperties As New ListDictionary
channelProperties.Add("useDefaultCredentials", True)
channelProperties.Add("machineName",
CO.Win.Data.DataSingleton.RemotingServer)
' The machineName property must be set to the same server as the http code
download was made from
' Otherwise a 2 minute delay will occur before client starts.
Dim formatterProperties As New ListDictionary
formatterProperties.Add("includeVersions", False)
Dim providerProperties As New ListDictionary
Dim serverProvider As New BinaryServerFormatterSinkProvider
serverProvider.TypeFilterLevel =
Runtime.Serialization.Formatters.TypeFilterLevel.Full
' Create and register channel
Dim channel As New HttpChannel(channelProperties, New
BinaryClientFormatterSinkProvider(formatterProperties, providerProperties),
serverProvider)
ChannelServices.RegisterChannel(channel)
..
..
..
RemotingConfiguration.RegisterWellKnownClientType(GetType(CO.Scenario.coScen
arioAG), "http://" + CO.Win.Data.DataSingleton.RemotingServer +
"/conet/coScenarioAG.soap")
..
..
..
Client Winforms Code:
=====================
Dim arrayListOfDatasets As New ArrayList
Dim scenarioAG As New CO.Scenario.coScenarioAG
scenarioAG = New CO.Scenario.coScenarioAG
Dim index As Integer
index = arrayListOfDatasets.Add(AGData.DatasetAG.GetChanges)
scenarioAG.Save(arrayListOfDatasets)
scenarioAG = Nothing
Server remoting setup:
======================
<system.runtime.remoting>
<application>
<channels>
<channel ref="http">
<serverProviders>
<formatter ref="binary" includeVersions="false" strictBinding="false"
typeFilterLevel="Full"/>
</serverProviders>
</channel>
</channels>
I have problem with remoting calls, sometimes the application "locks" about
2 minutes when i call the server before it releases the remoting call and
everything is normal again. Sometimes the application just ends without any
exception.
Problem code:
Client remoting setup:
======================
' Register the HTTP Channel
Dim channelProperties As New ListDictionary
channelProperties.Add("useDefaultCredentials", True)
channelProperties.Add("machineName",
CO.Win.Data.DataSingleton.RemotingServer)
' The machineName property must be set to the same server as the http code
download was made from
' Otherwise a 2 minute delay will occur before client starts.
Dim formatterProperties As New ListDictionary
formatterProperties.Add("includeVersions", False)
Dim providerProperties As New ListDictionary
Dim serverProvider As New BinaryServerFormatterSinkProvider
serverProvider.TypeFilterLevel =
Runtime.Serialization.Formatters.TypeFilterLevel.Full
' Create and register channel
Dim channel As New HttpChannel(channelProperties, New
BinaryClientFormatterSinkProvider(formatterProperties, providerProperties),
serverProvider)
ChannelServices.RegisterChannel(channel)
..
..
..
RemotingConfiguration.RegisterWellKnownClientType(GetType(CO.Scenario.coScen
arioAG), "http://" + CO.Win.Data.DataSingleton.RemotingServer +
"/conet/coScenarioAG.soap")
..
..
..
Client Winforms Code:
=====================
Dim arrayListOfDatasets As New ArrayList
Dim scenarioAG As New CO.Scenario.coScenarioAG
scenarioAG = New CO.Scenario.coScenarioAG
Dim index As Integer
index = arrayListOfDatasets.Add(AGData.DatasetAG.GetChanges)
scenarioAG.Save(arrayListOfDatasets)
scenarioAG = Nothing
Server remoting setup:
======================
<system.runtime.remoting>
<application>
<channels>
<channel ref="http">
<serverProviders>
<formatter ref="binary" includeVersions="false" strictBinding="false"
typeFilterLevel="Full"/>
</serverProviders>
</channel>
</channels>