Yes, you can easily remedy this undesired situation by following the instructions listed below.
If your TV is from 2011 to 2014:
On your Samsung TV, please go to Network/Allshare Settings/Content Sharing, and select the device with “Denied” next to it. Click it and change the setting to “Allow”. Then you can stream media files to your TV just fine.
If your TV is from 2015 to 2017:
On your Samsung TV, please go to Network/Multimedia Device Manager, find the device with “Denied” and select “Allow”. Then you can stream media files to your TV just fine.