Options

DynamicsNAV Service reporting an error

boxerkeboxerke Member Posts: 24
edited 2009-09-17 in NAV Three Tier
When connecting with Dynamics NAV 2009 RTC we get the error added in the attachment below:


Also in the event viewer we get an error on the Dynamics Service:
Log Name: Application
Source: MicrosoftDynamicsNAVServer
Date: 2/02/2009 10:26:39
Event ID: 0
Task Category: None
Level: Error
Keywords: Classic
User: N/A
Computer: SPHINXWVBPVPS.Sphinx-it.local
Description:
User:
Type: System.ObjectDisposedException
Message:
Cannot access a disposed object.
Object name: 'System.ServiceModel.Channels.ServiceChannel'.
ObjectName: System.ServiceModel.Channels.ServiceChannel
StackTrace:

Server stack trace:
at System.ServiceModel.Channels.CommunicationObject.ThrowIfDisposedOrNotOpen()
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.Dynamics.Nav.Types.IClientContract.OnServerTerminating()
at Microsoft.Dynamics.Nav.Service.Application.ServerTerminating(Object unused)
Source: mscorlib

Event Xml:
<Event xmlns="http://schemas.microsoft.com/win/2004/08/events/event"&gt;
<System>
<Provider Name="MicrosoftDynamicsNAVServer" />
<EventID Qualifiers="0">0</EventID>
<Level>2</Level>
<Task>0</Task>
<Keywords>0x80000000000000</Keywords>
<TimeCreated SystemTime="2009-02-02T09:26:39.000Z" />
<EventRecordID>1560</EventRecordID>
<Channel>Application</Channel>
<Computer>SPHINXWVBPVPS.Sphinx-it.local</Computer>
<Security />
</System>
<EventData>
<Data>User:
Type: System.ObjectDisposedException
Message:
Cannot access a disposed object.
Object name: 'System.ServiceModel.Channels.ServiceChannel'.
ObjectName: System.ServiceModel.Channels.ServiceChannel
StackTrace:

Server stack trace:
at System.ServiceModel.Channels.CommunicationObject.ThrowIfDisposedOrNotOpen()
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.Dynamics.Nav.Types.IClientContract.OnServerTerminating()
at Microsoft.Dynamics.Nav.Service.Application.ServerTerminating(Object unused)
Source: mscorlib
</Data>
</EventData>
</Event>

Connecting with classic client is no problem, but seems for some reason the service is acting not like it is supposed to. This was a fresh install and Dynamics NAV installation didn't report any problems.

I hope i'm not the first with this error, and that peoples could guide me into the right direction. I have also made sure SQL Browser service was enabled and that the Remote Connection was put on Local and remote for TCP/IP and named pipes.

Client and server are actually also both on the same machine.

Answers

  • Options
    kinekine Member Posts: 12,562
    Can you describe your infrastructure? Where is what installed (MS SQL, NST, CLient - on same PC, three different PCs etc.), version of MS SQL, if it is named instance, Developer edition or another one etc...
    Kamil Sacek
    MVP - Dynamics NAV
    My BLOG
    NAVERTICA a.s.
  • Options
    boxerkeboxerke Member Posts: 24
    SQL Server 2005 Standard SP2, RTC client, Classic client, Service are all on the same machine. Its for a developer and he needs all these programs on same machine.
    Its just the service of dynamicsNav that seems to have some problems this time.

    Service also has been removed completly already and reinstalled with same error. P has been shutdown to see if it might have been cause it was newly installed but problem remains. I have checked some things out on google and seems it might have to do something with WCF.
  • Options
    boxerkeboxerke Member Posts: 24
    Problem seems to be solved now. It seemed like to be an error related to the DNS.
    I added the hostname to the host file under system32/drivers/etc
    I did a dnsflush afterwards and this solved the problem. Which still has to be looked after why it didn't resolve the name, but less important at this time.

    So i just wanted to add that this issue can be seen as solved. Still thx for those who looked after it ;)
  • Options
    kinekine Member Posts: 12,562
    boxerke wrote:
    So i just wanted to add that this issue can be seen as solved. Still thx for those who looked after it ;)

    THis is on you... you need to edit your first pos and set the mark...
    Kamil Sacek
    MVP - Dynamics NAV
    My BLOG
    NAVERTICA a.s.
  • Options
    ara3nara3n Member Posts: 9,256
    I am getting the same error.
    User: 
    Type: System.ObjectDisposedException
    Message:
      Cannot access a disposed object.
      Object name: 'System.ServiceModel.Channels.ServiceChannel'.
    ObjectName: System.ServiceModel.Channels.ServiceChannel
    StackTrace:
      
      Server stack trace: 
         at System.ServiceModel.Channels.CommunicationObject.ThrowIfDisposedOrNotOpen()
         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.Dynamics.Nav.Types.IClientContract.OnServerTerminating()
         at Microsoft.Dynamics.Nav.Service.Application.ServerTerminating(Object unused)
    Source: mscorlib
    
    
    For more information, see Help and Support Center at http://go.microsoft.com/fwlink/events.asp.
    

    what did you add the host file?
    Ahmed Rashed Amini
    Independent Consultant/Developer


    blog: https://dynamicsuser.net/nav/b/ara3n
  • Options
    baunpbaunp Member Posts: 1
    me too. I get the same error. I would also like to now what was added to the host file? Is it the DNS to the SQL server or the Nav?
  • Options
    ara3nara3n Member Posts: 9,256
    If I remember correctly, I had to add the Nav server to the host file.
    Ahmed Rashed Amini
    Independent Consultant/Developer


    blog: https://dynamicsuser.net/nav/b/ara3n
  • Options
    knightknight Member Posts: 45
    Hi guys,

    I have had the same issue. When I first ran the service after the server started, all was well. But if I stopped the service and then restarted it, I was getting that dispose error.

    I found the reason was that even though I stopped the service via services.msc, it was still apparently running under the process list. After I managed to kill the process manually (via Task manager), the restarting of the service was successful.

    I hope this helps someone.
Sign In or Register to comment.