System.Web.Services.Protocols.SoapException Invalid ID,PSWD

RawHeatRawHeat Member Posts: 63
edited 2012-04-13 in NAV Three Tier
Hi,

I have exposed a codeunit and calling it from Visual Studio. While debugging i found following error/exception when the webservice is called.
Error
[System.Web.Services.Protocols.SoapException] = {"System.Web.Services.Protocols.SoapException: The user ID and password are invalid. Try again.\n at System.Web.Services.Protocols.

The username is already a member of the A/D and has Super rights in navision.
Does anyone has any clue regarding the same.

Comments

  • RawHeatRawHeat Member Posts: 63
    Any solution?
  • krikikriki Member, Moderator Posts: 9,112
    [Topic moved from 'NAV/Navision Classic Client' forum to 'NAV Three Tier' forum]

    How do you give it a username? I also did this kind of work but without giving it a username. It uses the credentials of the current user (which you can change by using the "runas-command").
    Regards,Alain Krikilion
    No PM,please use the forum. || May the <SOLVED>-attribute be in your title!


  • kinekine Member Posts: 12,562
    It means that the delegation is not working correctly. You need to check that all SPNs are correctly set and that delegation is allowed for the account under which the NAV Server is running.
    Kamil Sacek
    MVP - Dynamics NAV
    My BLOG
    NAVERTICA a.s.
  • RawHeatRawHeat Member Posts: 63
    Thanks Kriki and Kine for the replies
    @Kriki: I dont specify username anywhere. I run it with my userid and it has SUPER rights in Navision.
    However I have specified UseDefaultCredentials = True before calling the webservice.

    @Kine: Can you please elaborate it as to what exactly do you mean delegation. The Nav server and nav webservice are running with my account and my account has administrator rights in my system.

    To be more specific, the scenario is as below
    1. I have an application say MyApplication.
    2. My application calls a webservice say ParentWS that is a part of IIS web application. (Developed in VB)
    3. ParentWS calls my webservice say NavisionWS (NavisionWS is a codeunit published as webservice)
    4. At this point i get the error [System.Web.Services.Protocols.SoapException] = {"System.Web.Services.Protocols.SoapException: The user ID and password are invalid. Try again.\n at System.Web.Services.Protocols
    5. However if i call NavisionWS webservice directly from MyApplication no error comes and the codeunit runs perfectly.

    Please help as this stuff is really freaking me out.
  • mdPartnerNLmdPartnerNL Member Posts: 802
    ParentWS calls my webservice say NavisionWS

    The user under which ParentWS is running cannot connect. The links should help you.
  • RawHeatRawHeat Member Posts: 63
    Thanks friends but still i am not through yet.
    Is there any way to find out what credentials the webservices use in C#. Alteast that would help me to know where to change the credentials b4 running the webservice.
  • kinekine Member Posts: 12,562
    NAV WS is using credentials passed by the calling party. Depends on "who" is the calling party. If web application running on IIS, than it could pass some authentication, ot it will be passing the authentication of the browsing user (depends on settings). But to connect this string, all must be set correctly. The "delegation" must be working. And it looks like it is not. It is why you need to understand the delegation and SPN concept to be able to set all correctly.
    Kamil Sacek
    MVP - Dynamics NAV
    My BLOG
    NAVERTICA a.s.
Sign In or Register to comment.