WebDev mounted folder and playing a .MKV file

Hi all,

I'm currently working on accessing files out of a mounted folder through the WebDev module. The folder in question is stored on a NAS server. I went in an did the necessary configurations to be able to access the network drive via ignition. [See: Mapping a Network Drive | Ignition User Manual]

However, I am facing two main issues and one sub issue. One: The mounted folder endpoints do not exist and I constantly receive 404 errors when I try to access the endpoint with the folder.

Two: The folder contains .MKV video files that I would like to play in Ignition via the video player but get 'File Not Valid'. [Note: I also tried .MP4 file and I got the same issue :expressionless:] Also, when I try to access the endpoint containing just the video file - not through the mounted folder at the moment - I get this error:


Sub issue: It will download the file again for some reason (not sure why this is being downloaded again...)

There is defiantly quite a bit in this post in terms of explanations required. Hopefully there is some insight to help me get over the learning curve with the WebDev module.

Thank you,

Cam

Is the gateway running on Windows? Are you trying to access the NAS via drive letters? If so, you need to have the Ignition background service map the drive letter(s).

However, if your NAS forces any disconnect, drive letters won't reconnect until the gateway restarts. Instead, use UNC paths and run the gateway service with suitable credentials. (Logging in on the gateway's desktop has no bearing on how the service itself runs.)

Or, better, use Linux.

Yes the gateway is running on windows. I believe that is what I am doing, yes. So, how do I map the drive letter? (in this case Z:) And I simply linked the share folder via network drive mapping.
image

How do I go about using UNC paths in relation to the gateway? That is not something I've ever done. Oddly enough the gateway and the gateway desktop are the same machine at the moment. But I will keep the no bearing remark in mind.

Unfortunately, I cannot swap to Linux :sweat_smile:

See the \\LS210DC5 in parentheses next to the share name? That's the UNC path to the shared folder you have mounted. Generally UNC path is something along the lines of //Server/Folder/file.extension.

Accessing a file, you would use //LS210DC15/someFileNameHere.mkv as the file path, instead of Z:/someFileNameHere.mkv (forward slashes so you don't have to double the back slashes)

Okay, that makes a lot more sense as to what a UNC path actually is. However, when I'm using it on the video component as "//LS210DC15/Test Folder/test.mp4" or "//LS210DC15/Test Folder/1.mvk" it is still telling me "File Not Valid" after attempting to buffer for a moment.

But I was under the impression from a different post that if I wanted to display videos in the session (mobile or on the actual machine) they needed to be mounted through a mounted WebDev folder. I found this page a little while ago but I'm not sure how to 'Point the directories' as it says: Web Dev | Ignition User Manual.

You are correct, you would use a mounted folder, just point it at the UNC path instead. The example path in my previous post was just about accessing a file in a script using UNC path.

I used to do something similar to this to access digital work instruction structure JSON files, before I switched to using an actual http endpoint in webdev.

And don't forget to change the user that runs the Ignition background service to a user that has permission to access your UNC paths. By default, it will be the local system account, which won't have network permissions.

1 Like

How do I change that user? :sweat_smile:

The GUI way is to open services.msc (you can search for it in the Windows search bar), scroll down to Ignition and double click:
image

image

Then you can set to "This account" and set the desired service account.

I added a new account that has Administrator privileges. I then made that user the 'This account' user and stopped and started the Ignition service. I am still getting 404 errors when I try to access the endpoint with the mounted folder.


image
image

I'm not sure what the next thing to fix would be other than maybe the ignition server directories but I don't know where those are located

That appears to be the machine's Local Administrators group. You need a domain user with privileges on the target machine.

Or, if using a workgroup, you might be able to create a user that has exactly matching name and password in both machines.

1 Like

I made a domain administrator account that has permissions on this PC (as it is an admin)


then attempted to stop and then start the service I have this error

image

which from what I can tell its a catch all for the inability to connect to a network by any means

Also I should note that the PC I am running the gateway off of is the same PC I am working on. Everything is local to this machine.

You'll have to get someone who uses Windows more than I to help you.

(I avoid it like the plague. There's a reason I suggested Linux above.)

So I'm one of those unfortunate folks.

I took a look at our gateway, we have the service running as local user but we have wrapper.ntservice.account and wrapper.ntservice.password defined in our ignition.conf file, and are using the credentials for the account with network access there.

Not sure if this is the 'correct' way to do this, but we use windows so..

2 Likes