WS Url problem

sbillysbilly Posts: 230Member
edited 2012-05-30 in NAV Three Tier
I configured a 3 Tiers architecture.
I published web services , when I call thios url "http://localhost:7047/DynamicsNAV/WS/MAGRO_DISTR_REEL/services" on the localhos ( the navserver server) everything is alright, but when I change localhost by the server name "http://smgwebnavhvb:7047/DynamicsNAV/WS/Services"
It pops up asking for username and password and when I type the domain\user and login ( the same as Logon Account for the Microsoft Dynamics NAV Server Service), when I click Ok I get this error : HTTP 500 internal error
Hepl Please

Comments

  • kinekine Posts: 12,549Member
    This is mark that delegation is not set correctly. Check your SPNs, delegation settings for the NAV Server account etc. There are many articles about this.
    Kamil Sacek
    MVP - Dynamics NAV
    My BLOG
    NAVERTICA a.s.
  • sbillysbilly Posts: 230Member
    Shall I add this spn "DynamicsNAV/NAVSERV.bs.local:7047" for the navserv service account??
  • kinekine Posts: 12,549Member
    7047 is port for webservices, which have http protocol. DynamicsNAV protocol is for RTC service on port 7046... All is described on the blogs, what is not clear there? ;-)
    Kamil Sacek
    MVP - Dynamics NAV
    My BLOG
    NAVERTICA a.s.
  • sbillysbilly Posts: 230Member
    It's Okay Now.
    Thanks very much
  • sbillysbilly Posts: 230Member
    Please a last clarification, I want to know if can I call a web service in 3 tiers installation from computer which isn't in the domaine??
    My problem is that I want consume this web service from distance.
    thanks
  • kinekine Posts: 12,549Member
    All depends on the calling process. If it is able to use kerberos or NTLM, you can use it. In most cases, e.g. .NET languages are able to authenticate without problems (passing user name, password and domain).
    Kamil Sacek
    MVP - Dynamics NAV
    My BLOG
    NAVERTICA a.s.
  • sbillysbilly Posts: 230Member
    I want to tell u that, when I'm using any computer in my domain (bs.local) I can run RTC and see published web services using Internet explorer without problems.
    My problem is when I try to see the published web services using Internet explorer from a computer that's not in the domaine but is connected to the same network as the domaine, I have the error HTTP 500.
    Is there any other SPN to add it and to which server.
    Thanks and I hpe that I was clear in my description
  • kinekine Posts: 12,549Member
    THan it must ask you for login (IE), if not, it is trying to authenticate with something, what the server don't understand.
    Kamil Sacek
    MVP - Dynamics NAV
    My BLOG
    NAVERTICA a.s.
  • sbillysbilly Posts: 230Member
    It asks me for the login, When I log in with the login and password, I have this problem HTTP 500. ( I try to log in with the same account as the sql service and nav service);
  • kinekine Posts: 12,549Member
    have you entered the domain too? Have you used login which have permissions in NAV?
    Kamil Sacek
    MVP - Dynamics NAV
    My BLOG
    NAVERTICA a.s.
  • sbillysbilly Posts: 230Member
    Yes I entrerd the entire domaine account "domain\user" and It have SUPER as role in NAV
  • kinekine Posts: 12,549Member
    Than yes, the SPNs/delegation is not correctly set (between NAV Server and SQL).
    Kamil Sacek
    MVP - Dynamics NAV
    My BLOG
    NAVERTICA a.s.
  • sbillysbilly Posts: 230Member
    please which spn shall I add??
  • kinekine Posts: 12,549Member
    Have you tried to read some documentation about this? It is not just "run this and this...". You need to understand the problem. There are articles about this, even on the MSDN...
    Kamil Sacek
    MVP - Dynamics NAV
    My BLOG
    NAVERTICA a.s.
  • sbillysbilly Posts: 230Member
    Of corse I understand the problem, and I read many article about this.
    I successed to configure 3 tiers architecture (RTC and WS) and I can run them from any computer in my domain without login and password.
    I added all neede SPNs for the nav service and sql service domaine account, even HTTP spn.
  • kinekine Posts: 12,549Member
    Thus it should work even when called from outside and correct login and password is provided.
    Kamil Sacek
    MVP - Dynamics NAV
    My BLOG
    NAVERTICA a.s.
  • lthomsenlthomsen Posts: 2Member
    Actually, you can really help yourself a lot by doing the following:
    Use IE
    Go to tools->internet options
    Then go to advanced and REMOVE the mark in "Show friendly HTTP error messages"

    It will give you the true error from the NST and not just "500 Internal server errror".
  • RawHeatRawHeat Posts: 63Member
    Hi Sbilly,

    1. Check if all the SPNs are properly set.
    2. Two User accounts should not have SPN with same name. If exists then delete the duplicate ones.
    3. Check the event viewer when you run the url in browser. do you get event id 10 or 13? if yes then duplicate SPNs still exists.
    4. YOu need to provide delegations properly..
  • sbillysbilly Posts: 230Member
    I checked all SPN. I don't have duplicate one.
    When I call the web services from any computer on the domaine, it works very well.
    But When I try to call it from an external computer ( this computer is not on the domaine) It pops up asking for username and password and when I type the domain\user and login ( the same as Logon Account for the Microsoft Dynamics NAV Server Service) nothing happen and that 3 times.
    When I consult the event viewer on the nav serv I found this error:
    User:
    Type: Microsoft.Dynamics.Nav.Types.NavDatabasePasswordException
    SuppressMessage: False
    FatalityScope: None
    Message: The login failed when connecting to SQL Server smgsqlhvb01.
    StackTrace:
    à Microsoft.Dynamics.Nav.Runtime.NavRuntimeAdapter.ErrorHandler(Int32 errorCode, Int32 errorNumber, Int32 moduleNumber, String errorText)
    à Microsoft.Dynamics.Nav.Runtime.NativeMethods.AdapterOpenConnection(IntPtr databaseHandle, String serverName, NetProtocolType netType, String databaseName, Int32 clientConnectionType, DeadConnectionHandler deadConnectionHandler)
    à Microsoft.Dynamics.Nav.Runtime.NavConnection.Open()
    à Microsoft.Dynamics.Nav.Service.WebServices.ServiceBroker.Invoke(Boolean isSoapMessage, String serviceName, Uri url, XmlReader input, TextWriter output)
    à Microsoft.Dynamics.Nav.Service.WebServices.NavWebService.<>c__DisplayClass2.<>c__DisplayClass4.<ProcessMessage>b__1()
    à Microsoft.Dynamics.Nav.Service.WebServices.Disposer.Scope(Code code)
    à Microsoft.Dynamics.Nav.Service.WebServices.NavWebService.<>c__DisplayClass2.<ProcessMessage>b__0(StreamWriter streamWriter)
    à Microsoft.Dynamics.Nav.Service.WebServices.WCFUtil.GetPopulatedMemoryStream(StreamFillingCallback callback)
    à Microsoft.Dynamics.Nav.Service.WebServices.NavWebService.ProcessMessage(Message message)
    à SyncInvokeProcessMessage(Object , Object[] , Object[] )
    à System.ServiceModel.Dispatcher.SyncMethodInvoker.Invoke(Object instance, Object[] inputs, Object[]& outputs)
    à System.ServiceModel.Dispatcher.DispatchOperationRuntime.InvokeBegin(MessageRpc& rpc)
    à System.ServiceModel.Dispatcher.ImmutableDispatchRuntime.ProcessMessage5(MessageRpc& rpc)
    à System.ServiceModel.Dispatcher.ImmutableDispatchRuntime.ProcessMessage4(MessageRpc& rpc)
    à System.ServiceModel.Dispatcher.ImmutableDispatchRuntime.ProcessMessage3(MessageRpc& rpc)
    à System.ServiceModel.Dispatcher.ImmutableDispatchRuntime.ProcessMessage2(MessageRpc& rpc)
    à System.ServiceModel.Dispatcher.ImmutableDispatchRuntime.ProcessMessage1(MessageRpc& rpc)
    à System.ServiceModel.Dispatcher.MessageRpc.Process(Boolean isOperationContextSet)
    Source: Microsoft.Dynamics.Nav.Ncl
  • kinekine Posts: 12,549Member
    Try to switch the WS into NTLM instead NEGO (Kerberos)...
    Kamil Sacek
    MVP - Dynamics NAV
    My BLOG
    NAVERTICA a.s.
  • sbillysbilly Posts: 230Member
    Please Kine, how can I do it ?
  • kinekine Posts: 12,549Member
    In the customsettings.config of the service tier.
    Kamil Sacek
    MVP - Dynamics NAV
    My BLOG
    NAVERTICA a.s.
Sign In or Register to comment.