I am trying to access a folder on server to get the files in it.
foreach (string filename in Directory.GetFiles(System.Web.HttpContext.Current.Server.MapPath(@"\\108.163.190.98:3306\home\mybizscard\Ads\")))
{
list.Add(filename);
}
but I get this exception:
An unhandled exception of type 'System.NullReferenceException' occurred in WindowsFormsApplication1.exe
Additional information: Object reference not set to an instance of an object.
what is the problem ?? and how can I solve it ?