Error in communicating LabView Client VI with WinCC OPC Server over the network (LAN) - networking

I'm trying to automate some system using Siemens PLC; for that we have developed a WinCC Flexible RT application for control and monitoring, and have also declared the PC based HMI panel as the OPC server. Which is working fine.
Now, when i try to create a OPC Client application either in WinCC or Labview, on the same PC, am able to access all the tags of the server on the client, am able to do so.
When i try to create the client application on some other computer connected over the local area network [perfectly fine and well configured network working], am unable to access the OPC server/tags in that case.
What can be done in this case.?

The easiest way to establish connection between OPC client and server applications is to perform the following:
turn off the firewalls on both machines
create the same windows account on both machines using the same login name and password
for windows account (pointed out in 2) allow all "access permissions" and "Launch and Activation Permissions" by running "dcomcnfg" command and navigating to "console root->component services->computers->my computer->com security"
The more detailed example of how to do steps described above is given in this article http://opc-da.com/Winsetup.html
Also, there is a powerful OPC client API implemented on LabVIEW using OPC .NET API with detailed documentation on how to use: http://opc-da.com

It would be helpful if you mentioned the OS on the server and the client computers. Anyway, I'm guessing that this is a DCOM issue, as #Ken mentioned.
It's been a while since I worked with this sort of thing, but you can try this article: http://www.opcactivex.com/Support/Tutorials/DCOM_Tutorial_-_Configuring_th/DCOM_XP/dcom_xp.html and see if it helps.

Make sure the firewall isn't blocking the connection. Disable it on both sides.

Take a look at this NI article: http://zone.ni.com/reference/en-XX/help/371361G-01/lvhowto/psp_firewall/
keep in mind, the tcp ports used by OPC/shared variables changed somewhere between LV2009 and LV2011, so depending on what version you have, the ports may be different.

In addition to the ports and the firewall...
Make sure that the account in which the the OPC client is running has access to the OPC server, either through the DCOM default settings or the OPC Server-specific settings (also part of DCOM configuration) on the server machine.

Related

How to make My PC work as Host Server?

I have an ASP.NET web application that has been hosted in IIS local Machine.
My Question is :
Is there any free or paid method that allows browsing this web
application from the internet as Host Server ?
Thanks
The easiest way to to publish it directly onto the internet. You do run the risk of attackers then being able to attach your machine, so you will need to brush up on your security skills. It might be worth looking into one of the free hosting options from AWS, Azure or Google Cloud.
To use your local machine as a web server, first, configure it to use a static IP. Its been a while since I've done it on windows, but this looks about right http://www.howtogeek.com/howto/19249/how-to-assign-a-static-ip-address-in-xp-vista-or-windows-7/.
Next you will need to configure port forwarding on your model. You want to send all traffic on port 80 to your machine, using its new fixed IP address. If your using HTTPS as well, configure port 443 to go to your machine. There are too many different modem brands, all of which handle this slightly differently, to consider offering any more help on this. You will need to do some reading up on your particular modem for step-by-step instructions.
If your internet connection is using a fixed IP, then you can stop here.
If not, or if you just want a domain name, then its worth signing up for a dynamic dns service. I use No-ip, its free, it integrates with my modem and I haven't had any problems with it in the last few years. Once this is in place, you will be able to hit your webserver just like a real one. Using something like "http://mypc.no-ip.biz/mydemoapp/
But again, be warned about exposing your machine on the internet. There are nasty people out there who love to hijack other peoples computers.
Update:
This should give you some guidance on port forwarding
http://www.howtogeek.com/66214/how-to-forward-ports-on-your-router/
Try http://www.noip.com I just logged in and it seemed happy. Otherwise, have a click through all the settings in your modem looking for ddns or dynamic DNS. There is usually a drop down of all the providers that it will talk to. And some providers have apps that you run on your PC , which is easier that working with the modem for some. (Or for models that don't support ddns.)

IIS 7.5 running on Win7 Pro - access through a port other than 80 or 8080

I'm not sure I can adequately explain my dilemma, but here goes...
Our company has its own web server at xyz.com. I have a Win 7 Pro machine running a non-HTTP server program that communicates with an iPhone app used by our field crews. The path to this machine from outside the network is abc.xyz.com, and it's set for port 5000. The app, then, is programmed to exchange data (ASCII only) with the server at abc.xyz.com:5000. The server program is written in VB, and the system works very well like that.
What I would like to do now is to add IIS to this same machine and open it on port 5001, so I can run asp.net pages that will enhance the functionality of the app for our crews. The URL would be abc.xyz.com:5001, and they will access it through their phone browsers.
I have IIS 7.5 installed on the machine, and I have started it running with the "default web site," and I have the binding set for port 5001. So far I am able to access the IIS "Welcome" page only from the same machine. I can't get it to come up on any other machine either inside or outside the network.
In searching for clues for this problem, all I read indicates that it's pretty much a snap to get a web server running on your Windows 7 machine. But it hasn't been so much a snap for me. I've checked the sharing settings and the security settings, they seem to be ok, as best I can tell.
I am hoping that someone will help me identify some obscure setting somewhere that I am overlooking and get this going. But I also even wonder if this is something that can't be done, i.e. because there's another server program using the same path running on port 5000.
By the way, I am not the network administrator. I try to avoid getting him involved because he's difficult to work with. I am hoping that this is just between me and my server.
Thanks for any insight anyone can give me.
You mention that you can access the website from the machine itself on port 5001, but you can't access the site from another computer within the same network - this suggests to me that the Windows 7 built-in firewall is blocking the request - as it's a non-standard IIS port.
You should configure the firewall to allow incoming requests on port 5001. Open a command prompt (as administrator) and run the following:
netsh advfirewall firewall add rule name='IIS Website on Port 5001' dir=in protocol=TCP localport=5001 action=allow profile=any
I found the answer elsewhere on StackOverflow. I needed to add IUSR to the list of authorized users. So far I have tested it on my iPhone browser using 3G and it came through. Seems likely that it will work from anywhere, but I'm not yet ready to declare total success.

VPN Connection Manager in asp.net

I want to create a VPN Connection Manager on user's PC. The connection Manager must set up 3 VPN protocols on user's PC for Windows XP, Windows Vista, Windows 7 and Windows 8.
PPTP and
L2TP/IPSec and
OpenVPN
The Connection Manager shall receive server list from our servers.
Please help me to soulve the above issue. I google it since last 2 days bit not find any approproate solution to this. So please help me in this.
You can find details on creating a VPN Connection in .NET using:
Set up VPN Connection using C#
Remote Access Server Spec
However using ASP.NET is unlikely as browsers can't instantiate a VPN connection, they are sandboxed away from that functionality. Even services like GoToMyPC have a desktop client to perform the main functionality.
However you could create the RAS file then provide a download link on a website to it.
You can find the file at:
C:\Documents and Settings\All Users\Application Data\Microsoft\Network\Connections\Pbk\rasphone.pbk
The person downloading the file can then just import that and have all the set up provided.

Website currently being viewed

I have 50 machines in a LAN and each of these have internet access. Can a program be developed using vc++ which will tell what are all the websites which is being opened by users in each machine?
You can easily accomplish this by writing an application which captures packets outbound on port 80 (and the associated DNS information). The problem is that this application must run on every client computer which you want to trace. The easier method, as stated by others, is to take advantage of your network architecture and tunnel all traffic through a central proxy which can record the same information.
There are many-many enterprise tools suited for just this task in the latter instance.
Route your internet traffic through a centralized proxy and monitor the traffic from proxy say using Fiddler, or something else. In case proxying is not possible, use Fiddler to generate data at known location and then collate it at required intervals.
Install a firewall, if you don't already have one, and use it to log connections.

MSDTC communication fails over VPN

I have an application that runs transactions spanning over multiple databases on the same server. Naturally this involves the Microsoft Distributed Transaction Coordinator and everything works like it is supposed to.
Howver, when I remotely connect to the network where the server is hosted via VPN and run the application on my local machine I receive the following error:
System.Transactions.TransactionManagerCommunicationException:
"Communication with the underlying transaction manager has failed."
Caused by:
System.Runtime.InteropServices.COMException:
Error HRESULT E_FAIL has been returned from a call to a COM component.
Here is the stack trace for the originating exception:
at System.Transactions.Oletx.IDtcProxyShimFactory.ReceiveTransaction(UInt32 propgationTokenSize, Byte[] propgationToken, IntPtr managedIdentifier, Guid& transactionIdentifier, OletxTransactionIsolationLevel& isolationLevel, ITransactionShim& transactionShim)
at System.Transactions.TransactionInterop.GetOletxTransactionFromTransmitterPropigationToken(Byte[] propagationToken)
The problem arises only when I connect to the server through a VPN tunnel.
Note also that I have temporarly disabled Windows Firewall on my local machine, just to be sure it doesn't block the MSDTC.
Does anyone know of any issues when running MSDTC through VPN?
I suggest you run DTCPing (available from the Microsoft site somewhere) This is run at the same time on both machines and detects all manner of DTC problems.
Be careful I had great difficulties with this tool until I actually read the instructions and started both sides of the test up before I clicked the start test button.
Do you administer the VPN connection? There might be restricted ports on the VPN. Likewise, do you administer your servers? Your servers might only allow connections from IP addresses on the inside and not on the segment used for VPN service. If you are the administrator, perhaps saying which VPN software you are using will help.
I'm having the same problem using a Windows 7 x64 client and a Server 2003R2 server. I have been able to make it work (on the same vpn, same server) using XP, Vista x86, and Windows 7 x86. I have a support call with Microsoft open and they are looking into it. I'm curious - what operating system are you guys using on your client machines?

Resources