[UWP] How to authenticate a UNC network share

Ben Vincent 0 Reputation points
2023-09-28T00:04:10.2+00:00

I have a UWP app that grabs photos from a camera, I want to upload these to a network share. That share requires authentication. I have added the appropriate capabilities to the app, and when running on Win11 it works, but when deployed to Windows IOT it fails.

I get a variety of errors depending on whether I try IP address, name or a mapped drive.

The system cannot find the file specified. (Exception from HRESULT: 0x80070002)

Error HRESULT E_FAIL has been returned from a call to a COM component.

StorageFolder networkFolderToTest = await StorageFolder.GetFolderFromPathAsync(@"\\192.168.1.1\DropFolder");

Windows for IoT
Windows for IoT
A family of Microsoft operating systems designed for use in Internet of Things (IoT) devices.
381 questions
0 comments No comments
{count} votes