Problem using a WebService from a Web App
AitorEG
Member Posts: 342
Hi everyone,
I'm finding an issue with the upgrad and migration of NAV. In the old server, I was running a self developed WebApp, that was consuming different webServices from NAV2013 without any problem. The WebApp is develoepd in C#.
Now, I've migrated NAV to a new server, and upgraded to NAV2018. In the WebApp, I've changed the references to the webService in the new server. I'm connecfting to the app forms without any problem, but when it needs to use any of the webServices, I found this error in the Event Viewer:
The access to Nav is navUserPassword.
Any hint with this issue? If any infor is needed, I will ansewr inmediately, I'm quite desperate with this...
Thank you all
I'm finding an issue with the upgrad and migration of NAV. In the old server, I was running a self developed WebApp, that was consuming different webServices from NAV2013 without any problem. The WebApp is develoepd in C#.
Now, I've migrated NAV to a new server, and upgraded to NAV2018. In the WebApp, I've changed the references to the webService in the new server. I'm connecfting to the app forms without any problem, but when it needs to use any of the webServices, I found this error in the Event Viewer:
Event code: 3005
Event message: Excepción no controlada.
Event time: 17/04/2018 9:33:56
Event time (UTC): 17/04/2018 7:33:56
Event ID: 1377ba09b69b4676912727c7c2a74b71
Event sequence: 12
Event occurrence: 1
Event detail code: 0
Application information:
Application domain: /LM/W3SVC/2/ROOT/Picking-1-131684240033263190
Trust level: Full
Application Virtual Path: /Picking
Application Path: C:\Websites\Picking\
Machine name: SRV-DC01
Process information:
Process ID: 4724
Process name: w3wp.exe
Account name: IIS APPPOOL\Website
Exception information:
Exception type: WebException
Exception message: Error de la solicitud con el código de estado HTTP 401: Unauthorized.
en System.Web.Services.Protocols.SoapHttpClientProtocol.ReadResponse(SoapClientMessage message, WebResponse response, Stream responseStream, Boolean asyncCall)
en System.Web.Services.Protocols.SoapHttpClientProtocol.Invoke(String methodName, Object[] parameters)
en WebService.PDAMgt.ExistePicking(String numPicking)
en Picking.Entrada.txtCodigo_TextChanged(Object sender, EventArgs e)
en System.Web.UI.WebControls.TextBox.OnTextChanged(EventArgs e)
en System.Web.UI.Page.RaiseChangedEvents()
en System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
Request information:
Request URL: http://srv-dc01:8090/Picking/Entrada.aspx
Request path: /Picking/Entrada.aspx
User host address: 192.168.2.140
User:
Is authenticated: False
Authentication Type:
Thread account name: IIS APPPOOL\Website
Thread information:
Thread ID: 7
Thread account name: IIS APPPOOL\Website
Is impersonating: False
Stack trace: en System.Web.Services.Protocols.SoapHttpClientProtocol.ReadResponse(SoapClientMessage message, WebResponse response, Stream responseStream, Boolean asyncCall)
en System.Web.Services.Protocols.SoapHttpClientProtocol.Invoke(String methodName, Object[] parameters)
en WebService.PDAMgt.ExistePicking(String numPicking)
en Picking.Entrada.txtCodigo_TextChanged(Object sender, EventArgs e)
en System.Web.UI.WebControls.TextBox.OnTextChanged(EventArgs e)
en System.Web.UI.Page.RaiseChangedEvents()
en System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
Custom event details:
The access to Nav is navUserPassword.
Any hint with this issue? If any infor is needed, I will ansewr inmediately, I'm quite desperate with this...
Thank you all
0
Best Answer
-
Thanks for your answer @Peter+is1 . I've just solved the problem. The issue was that the authentication mode, now is navUserPassword, so the "betea" user, isn't part of any domain.
I should configure the credentials this way:ws.Credentials = new System.Net.NetworkCredential("betea", "xxxxxxxxx");0
Answers
-
The sentence I am using for the credentials in Visual Studio is:
ws.Credentials = new System.Net.NetworkCredential("betea", "xxxxxxxxx", "localhost");
Where "betea" is a valid user in NAV
0 -
Hi,
Perhaps you can check the (security) settings on the ISS APPOOL?
And you can check the authorisation for IUSR on the wwwroot folder. (and C:\Websites\Picking\ )
Regards, Peter\\The truth exists in seven versions.0 -
Thanks for your answer @Peter+is1 . I've just solved the problem. The issue was that the authentication mode, now is navUserPassword, so the "betea" user, isn't part of any domain.
I should configure the credentials this way:ws.Credentials = new System.Net.NetworkCredential("betea", "xxxxxxxxx");0
Categories
- All Categories
- 73 General
- 73 Announcements
- 66.7K Microsoft Dynamics NAV
- 18.8K NAV Three Tier
- 38.4K NAV/Navision Classic Client
- 3.6K Navision Attain
- 2.4K Navision Financials
- 116 Navision DOS
- 851 Navision e-Commerce
- 1K NAV Tips & Tricks
- 772 NAV Dutch speaking only
- 617 NAV Courses, Exams & Certification
- 2K Microsoft Dynamics-Other
- 1.5K Dynamics AX
- 328 Dynamics CRM
- 111 Dynamics GP
- 10 Dynamics SL
- 1.5K Other
- 990 SQL General
- 383 SQL Performance
- 34 SQL Tips & Tricks
- 35 Design Patterns (General & Best Practices)
- 1 Architectural Patterns
- 10 Design Patterns
- 5 Implementation Patterns
- 53 3rd Party Products, Services & Events
- 1.6K General
- 1.1K General Chat
- 1.6K Website
- 83 Testing
- 1.2K Download section
- 23 How Tos section
- 252 Feedback
- 12 NAV TechDays 2013 Sessions
- 13 NAV TechDays 2012 Sessions
