I work on csharp application when i make shared path and create directory in it it tell me
The network path was not found
so why this issue display
although i can create folder 3 on this path \\10.253.x.xx\ImportExport\testImporter\
but i can't create it from code
code i use it as below
from debug it have value
C#
exception details
exception details
at System.IO.FileSystem.CreateDirectory(String fullPath)
at System.IO.Directory.CreateDirectory(String path)
at Framework.WebApi.Controllers.ZDataDelivery.Z2DeliveryController.Upload() in D:\moved\TestInternalSystemZ2Data\FullProjectAngApiLastUpdate\Z2DataApp\Framework.WebApi\Controllers\ZDataDelivery\Z2DeliveryController.cs:line 123
at lambda_method(Closure , Object , Object[] )
at Microsoft.Extensions.Internal.ObjectMethodExecutor.Execute(Object target, Object[] parameters)
at Microsoft.AspNetCore.Mvc.Internal.ActionMethodExecutor.SyncActionResultExecutor.Execute(IActionResultTypeMapper mapper, ObjectMethodExecutor executor, Object controller, Object[] arguments)
at Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker.InvokeActionMethodAsync()
C#
PathDirectory = "\\\\10.253.x.xx\\ImportExport\\testImporter\\3"
string PathDirectory = myValue1 + "\\" + Month;
if (!Directory.Exists(PathDirectory))
{
Directory.CreateDirectory(PathDirectory);
}i can access path above and create folder 3 on it manually
but from code it give me path was not found on network
so why this error display ?

Muhammad Imran AnsariRank #326 · 7.6K reputationPosted Mar 30, 2022, 3:59 PM EDT
Uttam KumarRank #1,076 · 1.8K reputationPosted Mar 30, 2022, 9:26 PM EDT
In this error, it’s telling about network path issue.
Can you check using cmd prompt whether you can telnet to the IP and port 80?
Use the below cmd
telnet x.x.x.x 80