none
Winform app not working with SQL Filestream outside of LAN

    Question

  • Wrote a simple photo storage Winform app that simply stores and lists photos in a grid. Application works %100 even with a non-domain workstation inside the LAN. However, when I attempt run the app outside the LAN, the grid works but when attempting to persist a new image or load a stored image I get "The network path was not found" error. Looking at the file path it is trying to use shows the SQL Server  machine name (ex. \\<server>\\MSSQLSERVER\\v1\\..........). From a network point of view it makes sense that the outside app does not know of the internal name of the SQL server - it shouldn't!!!!. From my reading on SQL Filestream, the data still flows through the SQL connection. But I have seen some posts where they say you need ports 139 and 445 open for a SMB share. So that would mean that the external app needs to know the internal name of the SQL Server. I opened those ports on the server but it still does not work. Looking for clarification on the correct flow of data. Does the external app need to access the image files on the SQL Server machine via SMB or does the data flow through the SQL connection? 

    Civilization has brought Evolution to a screeching halt.

    Monday, July 22, 2013 2:48 PM

Answers

All replies

  • Use a Networked shared location for storing the photos and store the path in sql server tables. The firewall must be opened to that network location

    Thanks and Regards, Prajesh Please use Marked as Answer if my post solved your problem and use Vote As Helpful if a post was useful.

    Monday, July 22, 2013 3:21 PM
  • I know that will work. This is more just for POC. Plus I can see a nice advantage from a security standpoint - one less port hole. Anybody?

    Civilization has brought Evolution to a screeching halt.

    Monday, July 22, 2013 8:40 PM
  • Hi,

    Thank you for your question.

    I am trying to involve someone more familiar with this topic for a further look at this issue. Sometime delay might be expected from the job transferring. Your patience is greatly appreciated.

    Thank you for your understanding and support.

    Thanks,
    Mike Yin

    If you have any feedback on our support, please click here


    Mike Yin
    TechNet Community Support

    Tuesday, July 23, 2013 8:58 AM
  • Hi,

    http://technet.microsoft.com/en-us/library/dd283098%28v=sql.105%29.aspx

    "both the client and server must be able to resolve DNS names to the server that contains the FILESTREAM files. FILESTREAM requires the Windows file-sharing ports 139 and 445 be open"


    Regards,
    Christian HL
    Microsoft Online Community Support


    Please remember to click “Mark as Answer” on the post that helps you, and to click “Unmark as Answer” if a marked post does not actually answer your question. This can be beneficial to other community members reading the thread.

    Tuesday, July 23, 2013 9:22 AM