Options

Accessing Webservice from other computer

aliennavaliennav Member Posts: 449
edited 2010-09-28 in NAV Three Tier
Hi All
I have made a simple webservice to see the list of customers.
When I am accessing it from another PC in the inTRAnet, it is not running.
Please tell me how to access .
Thanx in advance.

Comments

  • Options
    alok_didaalok_dida Member Posts: 73
    aliennav wrote:
    Hi All
    I have made a simple webservice to see the list of customers.
    When I am accessing it from another PC in the inTRAnet, it is not running.
    Please tell me how to access .
    Thanx in advance.
    first check that did you start this service "Microsoft Dynamics NAV Business Web Services"?

    If you have started that service than Is it giving any error or you are not able to find it reference it?

    do one thing.. In visual studio open a project ... add WebReference/Service Reference and in URL write down following URL http://[IP address of PC where webservice deployed]:7047/[Service instance name - in my case "DynamicsNAV"]/WS/Services .

    Please let me know if any more help is required.
  • Options
    aliennavaliennav Member Posts: 449
    Hi
    i also want to tell that i have made the WS in Windows -->Console Application and NOT in WEB....
    Is it why it is not getting accessed from another computer??
  • Options
    vedant18vedant18 Member Posts: 22
    Hi

    1.) Dynamics NAV Web Service should run on which option? "NT AUTHORITY\NETWORK SERVICE" or Local System?
    You can use the Network Service account for the Microsoft Dynamics NAV Web service
    2.) All (Server and Clients) the machines are in same domain. Firewall is off in all the machines
    _________________
    Senior NAV Developer
    Microsoft Dynamics NAV
  • Options
    aliennavaliennav Member Posts: 449
    alok_dida wrote:
    aliennav wrote:
    Hi All
    I have made a simple webservice to see the list of customers.
    When I am accessing it from another PC in the inTRAnet, it is not running.
    Please tell me how to access .
    Thanx in advance.
    first check that did you start this service "Microsoft Dynamics NAV Business Web Services"?

    If you have started that service than Is it giving any error or you are not able to find it reference it?

    do one thing.. In visual studio open a project ... add WebReference/Service Reference and in URL write down following URL http://[IP address of PC where webservice deployed]:7047/[Service instance name - in my case "DynamicsNAV"]/WS/Services .

    Please let me know if any more help is required.

    I checked the web reference in the same PC in which I am working and not in the remote PC.
    It is working fine
  • Options
    aliennavaliennav Member Posts: 449
    @Vedant18
    hi
    i am using my domain account from which i am logged in in the webservice Service.
  • Options
    vedant18vedant18 Member Posts: 22
    hi

    You can use the Network Service account for the Microsoft Dynamics NAV Web service and restart web service
    _________________
    Senior NAV Developer
    Microsoft Dynamics NAV
  • Options
    alok_didaalok_dida Member Posts: 73
    aliennav wrote:
    I checked the web reference in the same PC in which I am working and not in the remote PC.
    It is working fine
    Can you please paste your WebReference URL here...?
  • Options
    aliennavaliennav Member Posts: 449
    vedant18 wrote:
    hi

    You can use the Network Service account for the Microsoft Dynamics NAV Web service and restart web service
    Hi
    Kindly clear what is this N/W Service account.
    I am using domain account --Is it different from that.?
    pl. give an example.
  • Options
    aliennavaliennav Member Posts: 449
    alok_dida wrote:
    aliennav wrote:
    I checked the web reference in the same PC in which I am working and not in the remote PC.
    It is working fine
    Can you please paste your WebReference URL here...?

    [url=http://]http://[/url]<Server Name>:7047/DynamicsNAV/WS/CRONUS%20Australia%20Pty.%20Ltd/Page/CustomerCard
  • Options
    vedant18vedant18 Member Posts: 22
    hi

    Open an elevated command prompt. Click Start, and in the search window, type Command Prompt.
    Right-click Command Prompt, and then click Run as administrator.
    At the command prompt, create the SPN.
    The syntax is:setspn -A InstanceName/FullyQualifiedDomainNameOfServer:Port Domain \User

    After this process u can check this url in u r client pc

    [url=http://]http://[/url]<ServerName>:7047/DynamicsNAV/WS/services
    _________________
    Senior NAV Developer
    Microsoft Dynamics NAV
  • Options
    alok_didaalok_dida Member Posts: 73
    aliennav wrote:
    [url=http://]http://[/url]<Server Name>:7047/DynamicsNAV/WS/CRONUS%20Australia%20Pty.%20Ltd/Page/CustomerCard
    Hey can you please try out IP Adress instead of ServerName.
  • Options
    aliennavaliennav Member Posts: 449
    vedant18 wrote:
    hi

    Open an elevated command prompt. Click Start, and in the search window, type Command Prompt.
    Right-click Command Prompt, and then click Run as administrator.
    At the command prompt, create the SPN.
    The syntax is:setspn -A InstanceName/FullyQualifiedDomainNameOfServer:Port Domain \User

    After this process u can check this url in u r client pc

    [url=http://]http://[/url]<ServerName>:7047/DynamicsNAV/WS/services
    While creating SPN I am getting the following message:
    Failed to assign SPN on account 'CN=<Account Name>,OU=Navision New,DC=<Domain Name>,DC=com', error 0x2098/8344 -> Insufficient access rights to perform the operation.
  • Options
    vedant18vedant18 Member Posts: 22
    hi

    u r current logon user is not "Domain Admin" account . NP U can try this

    Go to Microsoft Dynamics NAV Server service.. than select its properties and than select Logon tab.. In this can u tell me what is Id over that?

    I had this problem because of this ID.

    1)In this if your database is on another PC and if your current user Domain and that database server domain is different than this might be case,

    2)If both are on different pc and both are in same domain and In LogOn if ID is NTNETWORKSERVICE than you have to change it to current user.



    got it?
    _________________
    Senior NAV Developer
    Microsoft Dynamics NAV
  • Options
    aliennavaliennav Member Posts: 449
    vedant18 wrote:
    hi

    u r current logon user is not "Domain Admin" account . NP U can try this

    Go to Microsoft Dynamics NAV Server service.. than select its properties and than select Logon tab.. In this can u tell me what is Id over that?

    I had this problem because of this ID.

    1)In this if your database is on another PC and if your current user Domain and that database server domain is different than this might be case,

    2)If both are on different pc and both are in same domain and In LogOn if ID is NTNETWORKSERVICE than you have to change it to current user.
    Hi vedanta18
    The login name in the Microsoft Dynamics NAV Server service is my domain account (the one which I use to access outlook)
    Also, the database server (Both Dynamics & SQL) are on the same machine

    The case is --> My PC is connected to the domain of the company.I am logged in by my domain name. Sql & Dynamics server are installed on my machine.I have created a WS on my PC only. when I run that in VS, it is giving me the desired output.When I paste the URL of that WS in my PC I am getting the desired o/p.
    But, when I am using that WS in a different PC in intranet (having the same domain range), I am unable to access it.

    I want to access it from another computer and then I want to make it graphical using VS or sm other tool.

    i hope it would provide more clarity.
    Thanks


    got it?
  • Options
    aliennavaliennav Member Posts: 449
    Hi vedanta18
    Sorry for the previous post as the quotes went a bit wrong.
    please read this:

    The login name in the Microsoft Dynamics NAV Server service is my domain account (the one which I use to access outlook)
    Also, the database server (Both Dynamics & SQL) are on the same machine

    The case is --> My PC is connected to the domain of the company.I am logged in by my domain name. Sql & Dynamics server are installed on my machine.I have created a WS on my PC only. when I run that in VS, it is giving me the desired output.When I paste the URL of that WS in my PC I am getting the desired o/p.
    But, when I am using that WS in a different PC in intranet (having the same domain range), I am unable to access it.

    I want to access it from another computer and then I want to make it graphical using VS or sm other tool.

    i hope it would provide more clarity.
    Thanks
  • Options
    vedant18vedant18 Member Posts: 22
    Hi

    If u can chage on LogOn ID is NTNETWORKSERVICE than it can working on diffrent pc
    And it can't disturb for u r current working
    ws.png 110.2K
    _________________
    Senior NAV Developer
    Microsoft Dynamics NAV
  • Options
    aliennavaliennav Member Posts: 449
    vedant18 wrote:
    Hi

    If u can chage on LogOn ID is NTNETWORKSERVICE than it can working on diffrent pc
    And it can't disturb for u r current working
    Hi
    Did the changes i.e.
    1) changed the log On Name as Network service in MS Dynamics Web Service Service.
    2) Similar change in the Dynamics NAV server Service.
    3) added the user in SQL database and designated it as dB owner.
    4) restarted the service.

    Now, On my local system the URL of the service i.e. [url=http://]http://[/url]&lt;ServerName&gt;:7047/DynamicsNAV/WS/CRONUS Australia Pty. Ltd/Page/CustomerCard
    it is working fine.

    :( But when I try to access this URL from another machine it is not getting accessed.
  • Options
    aliennavaliennav Member Posts: 449
    Do i need to change SQL service logon too??
  • Options
    vedant18vedant18 Member Posts: 22
    hi

    Can you please paste a screen shot of the error ?
    _________________
    Senior NAV Developer
    Microsoft Dynamics NAV
  • Options
    vedant18vedant18 Member Posts: 22
    aliennav wrote:
    Do i need to change SQL service logon too??

    yes
    _________________
    Senior NAV Developer
    Microsoft Dynamics NAV
  • Options
    alok_didaalok_dida Member Posts: 73
    aliennav wrote:
    Now, On my local system the URL of the service i.e. [url=http://]http://[/url]&lt;ServerName&gt;:7047/DynamicsNAV/WS/CRONUS Australia Pty. Ltd/Page/CustomerCard
    it is working fine.

    :( But when I try to access this URL from another machine it is not getting accessed.
    Can you please try what error it's showing when you are trying to add on another system?

    Did you try with IP Addreess instead of Server name?
  • Options
    aliennavaliennav Member Posts: 449
    alok_dida wrote:
    aliennav wrote:
    Now, On my local system the URL of the service i.e. [url=http://]http://[/url]&lt;ServerName&gt;:7047/DynamicsNAV/WS/CRONUS Australia Pty. Ltd/Page/CustomerCard
    it is working fine.

    :( But when I try to access this URL from another machine it is not getting accessed.
    Did you try with IP Addreess instead of Server name?

    yes I tried using IP address..But, I am just accessing the URL directly by pasting in the address bar of IE.
    Before doing this do I need to do something on the machine on which I am accessing.
    Something means-->do i need to register the service there too.
    If so then how??
  • Options
    alok_didaalok_dida Member Posts: 73
    aliennav wrote:
    Did you try with IP Addreess instead of Server name?

    yes I tried using IP address..But, I am just accessing the URL directly by pasting in the address bar of IE.
    Before doing this do I need to do something on the machine on which I am accessing.
    Something means-->do i need to register the service there too.
    If so then how??
    [/quote]
    Can you please provide me a screenshot of your IE after entering that URL?
  • Options
    aliennavaliennav Member Posts: 449
    Hi alok
    Sorry for the late reply.
    I cannot access the remote computer currently , but let me tell you the error is same as the Internet Explorer error when we type some un-recognized URL or web address.
  • Options
    aliennavaliennav Member Posts: 449
    Any idea??
    what might be the problem??
  • Options
    vedant18vedant18 Member Posts: 22
    hi aliennav

    U r Rtc Client Is run on remote machine?
    _________________
    Senior NAV Developer
    Microsoft Dynamics NAV
  • Options
    sebsidsebsid Member Posts: 27
    Hi all!
    We have a similar problem. I've tried to serach the forum but i can't find anything like it, unless i've missed it in that case i'm sorry for double posting.

    The problem is this:

    I open up a browser window on my computer. Type the adress, http://servername.domain.local/WS... etc. it asks for a login and then it says:
    <s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/"&gt;
    <s:Body>
    <s:Fault>
    <faultcode xmlns:a="urn:microsoft-dynamics-schemas/error">
    a:Microsoft.Dynamics.Nav.Types.NavDatabasePasswordException
    </faultcode>
    <faultstring xml:lang="en-US">
    The user ID and password are invalid. Try again.
    </faultstring>
    <detail>
    <string xmlns="http://schemas.microsoft.com/2003/10/Serialization/"&gt;
    The user ID and password are invalid. Try again.
    </string>
    </detail>
    </s:Fault>
    </s:Body>
    </s:Envelope>
    _________________________________

    After that i log on the NAV service tier server as that same user. Open up a browser window on that computer go to the same adress except i type localhost instead of ip. and i receive the information as requested.
    After this i go back to my pc which i used in step one, type the ip-adress of the webservice, and know tada.. it works.

    So to put it shortly, when i log on to the Dynamics NAV server with the same account that i use to access the webservice on my regular pc it works.
    So unless i logon to the nav server with the account i use to access it from my pc it won't work.
    Does anyone have any clue on the error?

    All computers are on the same domain, running on a 3-tier sollution with 3 computers. I've tried it both with NT Authority\Network Service account and with a dedicated domain account, i get the same error.

    Any help would be much appreciated.

    Kind regards,
    Sebastian
  • Options
    alok_didaalok_dida Member Posts: 73
    change your NAV Service and NAV Web Service logon to the
    "NT AUTHORITY\NetworkService".. it will work
Sign In or Register to comment.