Ken Kolda
8/24/2004 3:10:00 PM
The error sounds pretty clear from the error message:
"Well-known service entries must contain a 'mode' attribute with a value of
'Singleton' or 'SingleCall'"
Looking at your config file, you have "SingleCall" misspelled -- remember
that it's case sensitive.
Ken
".NetHelpWanted" <sasijrao@gmail.com> wrote in message
news:816A192A-C294-4BD3-B91D-677E11BDBC77@microsoft.com...
> This is the error from the even log when i try to start a service
> Description:
> Service cannot be started. System.Runtime.Remoting.RemotingException:
> .Config file
>
D:\vbremoting\WindowsService\WindowsService12\bin\windowsservice.exe.config
> can not be read successfully due to exception
> System.Runtime.Remoting.RemotingException: Well-known service entries must
> contain a 'mode' attribute with a value of 'Singleton' or 'SingleCall'.
> at
>
System.Runtime.Remoting.Activation.RemotingXmlConfigFileParser.ReportError(S
tring errorStr, RemotingXmlConfigFileData configData)
> at
>
System.Runtime.Remoting.Activation.RemotingXmlConfigFileParser.ProcessServic
eWellKnownNode(ConfigNode node, RemotingXmlConfigFileData configData)
> at
>
System.Runtime.Remoting.Activation.RemotingXmlConfigFileParser.ProcessServic
eNode(ConfigNode node, RemotingXmlConfigFileData configData)
> at
>
System.Runtime.Remoting.Activation.RemotingXmlConfigFileParser.ProcessApplic
ationNode(ConfigNode node, RemotingXmlConfigFileData configData)
> at
>
System.Runtime.Remoting.Activation.RemotingXmlConfigFileParser.ParseConfigFi
le(String filename)
> at
>
System.Runtime.Remoting.RemotingConfigHandler.LoadConfigurationFromXmlFile(S
tring filename).
> at
>
System.Runtime.Remoting.RemotingConfigHandler.LoadConfigurationFromXmlFile(S
tring filename)
> at System.Runtime.Remoting.RemotingConfiguration.Configure(String
filename)
> at WindowsService.RemotingService.OnStart(String[] args) in
> D:\vbremoting\WindowsService12\RemSvc.vb:line 42
> at System.ServiceProcess.ServiceBase.ServiceQueuedMainCallback(Object
> state)
>
> This is how my CONFIG file looks
>
> Config File
> <configuration>
> <system.runtime.remoting>
> <application>
> <channels>
> <channel ref="tcp" port="5151" />
> </channels>
> <service>
> <wellknown mode="Singlecall" type="WindowsService.CustomerManager,
> WindowsService" objectUri="CustomerManager.soap" />
> </service>
>
> </application>
> </system.runtime.remoting>
> </configuration>
>
> "Ken Kolda" wrote:
>
> > This error is occurring on the server side. Can you show:
> >
> > 1) The server-side code where you setup the channel and the remoted
object
> > 2) The complete error message you're getting (you showed the call stack
but
> > not the error message itself, e.g. Exception.Message).
> >
> > Ken
> >
> >
> > ".NetHelpWanted" <sasijrao@gmail.com> wrote in message
> > news:C68AE817-4FA8-4C00-8CA1-576078C0015A@microsoft.com...
> > > Hi Get the error when I try to connect to the service.
> > > This is the call in Client :
> > >
> > > Dim filename As String = "client.exe.config"
> > > RemotingConfiguration.Configure(filename)
> > > Dim MyRemoteClass As RemotingSample.SingleCallCustomer =
> > > CType(Activator.GetObject(GetType(RemotingSample.SingleCallCustomer),
> > > "tcp://nt82:6666/RemoteObjectUri"), RemotingSample.SingleCallCustomer)
> > > Dim returnstring As String
> > > Try
> > > returnstring = MyRemoteClass.UpdateCustomerInfo("SASA",
12)
> > > ------ I GET ERROR AT THE ABOVE LINE
> > > Catch ex As Exception
> > > MsgBox(ex.Message & "--->" & ex.StackTrace)
> > > End Try
> > >
> > > The Configuration File
> > > <configuration>
> > > <system.runtime.remoting>
> > > <application>
> > > <client url="http://nt82:6666">
> > > <activated type="DMPIInterface.RemotingSample.Customer,RemoteCustomer"
/>
> > > <wellknown
> > > type="DMPIInterface.RemotingSample.SingleCallCustomer,RemoteCustomer"
> > > url="tcp://nt82:6666/SingleCallCustomer" />
> > > <wellknown
> > > type="DMPIInterface.RemotingSample.SingletonCustomer,RemoteCustomer"
> > > url="tcp://nt82:6666/SingletonCustomer" />
> > > </client>
> > >
> > > The server is running on port nt82:6666
> > >
> > > Whats the error in code?
> > >
> > >
> > > Server stack trace:
> > > at
> > >
> >
System.Runtime.Remoting.Channels.BinaryServerFormatterSink.ProcessMessage(IS
> > erverChannelSinkStack
> > > sinkStack, IMessage requestMsg, ITransportHeaders requestHeaders,
Stream
> > > requestStream, IMessage& responseMsg, ITransportHeaders&
responseHeaders,
> > > Stream& responseStream)
> > >
> > > 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 RemotingSample.SingleCallCustomer.UpdateCustomerInfo(String
NewName,
> > > Byte NewAge)
> > > at Client.Form1.calllnewdata(Int32 intfolderid, String strusername,
> > > String actionid, String comment) in D:\SasiWorking\vbremoting\Chapter
> > > 04\WindowsService\Client\Form1.vb:line 129"
> > >
> > > --
> > > .NetHelpWanted
> >
> >
> >