locked
System.ComponentModel.Win32Exception (0x80004005): The system cannot find the path specified RRS feed

  • Question

  • User2028719869 posted

    Hi,

    I am trying to generate a report by using SQL Server 2008 R2 File Stream and WCF Service. I am able to generate reports if the service is hosted in the same server which database is located i.e. Database and service is hosted in the same server.

    If I hosted the service in different server I am getting the "System.ComponentModel.Win32Exception (0x80004005): The system cannot find the path specified" exception. I have given all the necessary permissions to the SQL FileStream share location like IIS_User, Everyone etc and I am able to access the share path from the new server also. Still getting the same error.

    Please help me to get out this.

    Thanks,

    Suresh

    Monday, November 2, 2020 7:03 AM

All replies

  • User-939850651 posted

    Hi sureshamsala,

    Based on your description, I did some searches on the issue.

    The possible causes of this issue are:

    • firewall settings from the web server to the database server
    • connection string errors
    • enable the appropriate protocol pipes/ tcp-ip

    You could also get more possible information from the detailed errorlogs.

    Best regards,

    Xudong Peng

    Tuesday, November 3, 2020 7:51 AM
  • User2028719869 posted

    Hi XuDong Peng,

    Thanks for reply, I have tried the possible causes but no luck

    • firewall settings from the web server to the database server [ I have tried by setting firewall off in the web server and database server ]
    • connection string errors [No issue with the connection string, tried with Integrated Security True also]
    • enable the appropriate protocol pipes/ tcp-ip [ Yes, enabled TCP/IP (445 and 139) protocols also ]

    Note: I am able to ping the Database server from Web server.

    Am I missing anything regarding permission ?

    Thanks,

    Suresh

    Wednesday, November 4, 2020 1:24 PM
  • User-939850651 posted

    Hi sureshamsala,

    I think the most effective solution is to find the cause of the problem step by step from the detailed error loggings.

    In addition, I found the following two cases, hope they can help you.

    WCF + The system cannot find the file specified + Error

    Adding service reference gives the system cannot find the path specified error

    Best regards,

    Xudong Peng

    Monday, November 9, 2020 7:36 AM
  • User303363814 posted

    What is the path you are specifying?  If it can't be found then it is probably wrong.  Show your code!

    (Note that this is not asking what do you think the path is but rather "What is actually happening at runtime")

    Tuesday, November 10, 2020 9:22 PM
  • User2028719869 posted

    Hi PaulTheSmith,

    The file path is not a normal file path. It's generated by the SQL server 2008(which is integrated within it) and can't be used like other normal file path. It looks like below:

    \\Machine_Name\FolderName\v1\DBName\dbo\TableName\ColumName\06E9456C-A090-24Ge-9C35-25FDG54FE78RR25

    which can't be access via folder. The application runs fine when both SQL server and application is running from same machine and in the same way, the above path is not accessible from the explorer.

    Thanks,

    Suresh

    Wednesday, November 11, 2020 8:37 AM
  • User303363814 posted

    Is this what you are talking about? https://docs.microsoft.com/en-us/sql/relational-databases/blob/enable-and-configure-filestream?view=sql-server-ver15

    (Step 8 looks interesting).

    I would suggest that you ask in a SQL/Server forum.  If "which can't be access via folder" is true then this doesn't seem to have much to do with ASP.Net

    Wednesday, November 11, 2020 8:52 PM