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
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()
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 ?
Uttam KumarPosted Mar 31, 2022, 1:26 AM
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
Muhammad Imran AnsariPosted Mar 30, 2022, 7:59 PM