Good morning,
I have an application in Navision with .Net and web services , and I have a little problem.
If I'm connected to my office network works perfectly, but if I disconnect and run the program in my house for instance, does not work.
Should we create a reference to the Navision server?
I'm a bit lost if you could lend a hand to me, I would greatly appreciate it.
A greeting and thanks in advance
0
Comments
MVP - Dynamics NAV
My BLOG
NAVERTICA a.s.
How I can fix it? How I can connect to the web service without being connected to the domain?
MVP - Dynamics NAV
My BLOG
NAVERTICA a.s.
Do not quite understand what you mean, to connect to the webservice use the property "name." Credentials ("user", "pass", "domain")
and the function "name." URL ("The address of webservices)
What am I doing wrong?
I just tried to run the network cable disconnected, and I do not work ... idk if this detail will do any good
A greeting and thanks
Example for the Customer Page:
baseURL is the address to the webservice
string customerPageURL = baseURL + Uri.EscapeDataString(cur) + "/Page/Customer";
customerService = new Customer_PortClient(navWSBinding, new EndpointAddress(customerPageURL));
customerService.ClientCredentials.Windows.ClientCredential = new NetworkCredential("User","Pwd","Domain");
customerService.ClientCredentials.Windows.AllowedImpersonationLevel = System.Security.Principal.TokenImpersonationLevel.Delegation;
Regards,
egnaz
My question now is: Where should I enter the code you provided? Every time you connect to web services I have to enter that code?
Thank you very much for your contribution.
Greetings
you need the "login" just one time for the connection to the webservices. I had a login process and after that I use the services without another login because the objects were initialised and "logged in".
If you have more questions or problems please let me know and I can go more in detail if you need.
Best regards,
egnaz
My problem is:
I have a project in VB.net and published several pages and codeunit of Navision, and I refer in different events at different webServices VB.net.
In the office I have no problem to connect to the program and use webServices to go home but I say I'm not authorized.
Honestly I am newbie in this of Navision and VB.net and I have little idea about networks.
If I could spell like a 5 year old I would appreciate it because I am quite lost.
Is that the server is private IP. Does that have anything to do?
Something must be done in the Navision server or my office to access it from another domain?
Thank you very much for your help.
- VB.net project with several webservices to NAV
- in your office (in the correct domain) you have no problem to connect
- when you were at home you try to connect to the NAV server by the VB.net program
How is your access to your company network from your home office?
Can you connect to NAV by using the RTC from your home office?
I'll do some research and will post the things I hopefully found for that issue.
I'm very interested in the solution of this problem because this is a future feature I need to.
So let's keep on finding a solution
Regards,
eganz
You're right in all your statements, and with regard to your questions, I've never tried to access the RTC from home, since I'm new in the company and I have many privileges.
Could it be server permissions?
Do I need any special permission to give the server?
Thank you very much for your support / help
A greeting, and if I find the solution will not hesitate to put it in this forum.
after lots of research it should be possible to connect over the web without being in the domain.
Can you ping the server IP from your home?
Have you tried your connection with a fixed value in the NetworkCredential? (fixed domain value)
Do you connect by vpn tunneling to your company? This could be a problem. I found an interesting posting here, https://community.dynamics.com/product/ ... 43361.aspx
I keep an eye on this topic
The problem is that we believe we have assembled a VPN, because at home we can not access the office, neither I nor anyone else (I just learned of this detail, sorry)
NetworkCredential the domain is fixed.
Do you think if we create a VPN would solve the problem?
Do you have any link on how to manually create a VPN and what requirements are necessary?
Thanks,
sorry my knowledge about VPN setup is worse.
I'll do some testing at home this evening. Maybe I can get it running or I can find the same error. I have to do some configuration tests by my own. My small test code is roughly finished.
After doing the tests I'll post my results but I can't do it until evening because I'm in the office at the moment.
So stay tuned.
Estare esperando tu solucion, y de todas formas si yo consigo algo lo subire tambien
Un saludo.
So feel free to ask your questions maybe we can find a solution.
Regards,
egnaz
Cause if you can ping your server from home, it's just a problem of code in your .net app.
Maybe you can share the .vb too...
now I'm in the office and do not remember the error, so when I get home (about 7) I upload the error.
Thanks.
just in this moment I made a test with my .net program and I can connect to the server across the network.
Started my vpn tunnel and run the code. It is slow but without any problems.
So please tell us your error message and we can go on to find the solution or maybe we can locate the problem.
Greetings,
egnaz
The message is: "Unable to connect to the remote server"
thank you
Why??
Thank you!!
When your vpn is activ you can't ping the server. Is this right?
pinging might not work but connecting to Nav could work. Firewall can drop a ping request (which is ICMP network protocol) but allow tcp or udp connections on specific ports, like tcp 7047, which is Nav Webservice connection entry point, I believe.
You need to check with your infrastructure that any firewall between your station and the Nav server has rule to let TCP 7047 pass.
It is slightly important to indicate your infrastructure department that you want this to work through VPN.
When saying Firewall, I am including Windows firewalls both on your client machine and on the Nav server.
For the latter, I think Nav Installer already created a inbound rule for Nav webservice server during install.
Good Luck