.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Top 5 Contributors of the Month
Sandeep Singh
Post New Web Links

FileWatcherTask - Path specified is not a valid directory

Posted By:      Posted Date: October 14, 2010    Points: 0   Category :Sql Server

I get this error when using a FileWatcherTask. I have a mapped path that will not work in the FileWatcherTask. I have given permissions to the domain account used by SQL Agent to the folder being attempted.


1. Are the spaces in the folder name the issue?

2. If a mapped drive or UNC not workable in SSIS, how do you reference a directory on a remote server?


When I test using  E:\Workbooks (a local folder) I get this error:


[FileWatcherTask] Error: Fatal error during Task Execute. Second path fragment must not be a drive or UNC name. Parameter name: path2


Question: What is Parameter name: path2 and how do you set the properties?


When I use the \\fileserver\finDeptData$\[Daily Count Totals], I get this error on package validation:


TITLE: Package Validation Error

Package Validation Error


Error at File Watcher Task [FileWatcherTask]: The Path specified is not a valid directory. Please check directory

View Complete Post

More Related Resource Links

How to set SearchRoot Path in Active Directory in this scenario


How to set SearchRoot Path in Active Directory in this scenario:

Functionality: We have scenario that 1<sup>st</sup> hit one LDAP server with some 'fixed user name' &' fixed password ' and filter data with specific User name(which given by user) getting 'User dn'.

After that we hit Next LDAP server based on the 'User dn' getting from 1<sup>st</sup> server.

(So, in my case 1<sup>st</sup> LDAP server works like as Load balancing server but functionalitywise it is different)


Path not valid.



im trying to save a file, filename as current date and time.it will give an error.

any ideas.

here is my code

string datetime=DateTime.Now.ToString();

if (GridviewtoCSV("~/Admin/doc/Reports/" + batchid.ToString() + datetime + ".csv", transactiongrid) && GridviewtoPDF("~/Admin/doc/Reports/" + batchid.ToString() + datetime + ".pdf", transactiongrid))

Map a network share to a virtual directory path @ runtime

Hi Guys Have run into an interesting issue. We have an asp.net web application - we can deploy it over the internet, the secure intranet, local offline user laptops. On of the teams in our organization has a product by which they develop static html reports from the main database. Originally we developed a module in our app which is nothing more than an iframe. Since the html files were pushed under our application virtual directory we used to use java script to set the source of iframe to http://server/app/module/fileXXX.html   Now due to some deployment procedure changes and some security issues the html reports will be deployed on another network server and exposed through a share. Also the share will not have IIS so not virtual directory. So we can no longer set the iframe source through java script to a web file.   Is there any way i can @ runtime map a folder in my application virtual to the network share so that we can browse to these web files like before (Copying the files over from the share to my Virtual Directory is not a very elegant soln.)   Thanks Regards Siddharth

How to insert a name field on an InfoPath path that allows you to insert names from the AD directory

How can I set up a field on an Infopath form so that when I click on a "Check Names" button, (exactly the same way it works on a SharePoint point Name field), the name is checked against the AD directory? I am not trying to control user access to sections of the form - I am simply adding names to the form that is collecting data on a task - such as Delivery Lead, Designer, etc.

FAQ: How do I get the maximum path/directory length?

How do I get the maximum path/directory length?Please remember to mark the replies as answers if they help and unmark them if they provide no help. Welcome to the All-In-One Code Framework! If you have any feedback, please tell us.

The path is not valid

this is my connection string :(dunno whether it is correct or not)

Public con As New SqlCeConnection("Data Source= C:\Mobile Transaction in Learning System\LS.sdf")

the error:
The path is not valid.check the directory for the database. [path = C:\Mobile Transaction in learning System\LS.sdf]

this i see from other solution but i dun understand where should i put ?? where is the emulator ???

You can only access files located on the emulator, not your local drives. You have to copy or create the sdf file in the emulator in the desired location. There is no C: drive or D: drive in the emulator, just a "\" root

please help

OLEDB Connection for Excel not a valid file path


Hi there, I'm using a FileUpload control on a webform to allow users to select an excel file. I then want to read the excel file and dump the data into a dataset, but I can't get it to work. This is my code:

Dim fileNameString As String = Me.BillUpload.FileName
Dim filePathString As String = Me.BillUpload.PostedFile.FileName
Dim fileLength As

Directory.Exists() returns always false on Windows 7 when it's a UNC path, but not with a backslash


Hi everybody,

Is there a known bug on Windows 7 ? See what happend on this part of code :

Directory.Exists(@"\\ServerName\ServerShare") ; // returns false
Directory.Exists(@"\\ServerName\ServerShare\") ; // returns true

I am running the code on a Windows 7 machine x86. The same code on a Windows 7 machine x64 works fine.

Any idea ? :-)

Best regards.


gettting exception when uploading a file using IE 6??? not a valid virtual path




I have a file upload control and just in IE 6 I get the following error when I try to upload a file. My code is further below.


 Exception Details: System.Web.HttpException: '/Members/path//C:\Users\Public\Pictures\Photos\Sample Album\Pensive Parakeet.jpg' is not a valid virtual path


MembershipUser newUser =


        HttpFileCollection uploadedFiles = Request.Files;

        for (int i = 0; i < uploadedFiles.Count; i++)


            HttpPostedFile file = uploadedFiles[i];
            string fileExt = Path.GetExtension(file.FileName).ToLower();
            string fileName = Path.GetF

'c:\test.xml' is not a valid virtual path.


Hi all,

I had problem when I run the following code

It stated that 'test.xml' is not a valid virtual path. I had check that physically the file does exists.

The program will stop at the Server.MapPath.

Please help.




objdata = new DataSet();

try {



objdata.Tables[txtProdID.Text].DefaultView.RowFilter =

"prodid='" + x1 + "'";

if (objdata.Tables[txtProdID.Text].DefaultView.Count>0)









catch (

Using a CompareValidator to check input is a valid date

The CompareValidator can do more than just compare two controls. You can also compare it against several of the main .net data types such as Date, Integer, Double and Currency.

To do this you would set Operator="DataTypeCheck" and instead of setting the ControlToCompare or ValueToCompare attributes as you normally would you use the Type="Date" (or any of the data types I have listed above).

Building a Searchable Phone Directory with Windows SharePoint Services

I want to continue to build out the intranet site we've started in our previous articles. A standard item in every intranet is a staff/employee list. Most companies implementing Windows SharePoint Services (WSS) are large enough to have a database that contains all employees. We will use the aggregation features of SharePoint to include data from this database into our intranet.

Virtual Path Problem


 I get the following error on last line below (working on remote host): 'E:\web\sfcascom\ls_admin/uploads/images/001.JPG' is not a valid virtual path,

Note that the slashes go in different directions

I've tried a number of things but nothing seems to work. Thanks-


Imports System.Drawing
Imports System.Drawing.Drawing2D
Imports System.Drawing.Imaging
Imports System.Web.UI.WebControls

Imports System.Drawing.Imaging.ImageCodecInfo
Partial Class Protected_imageupload
    Inherits System.Web.UI.Page
    Private Sub btnUpload_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles btnUpload.Click
        ' Initialize variables
        Dim sSavePath As String
        Dim sThumbExtension As String
        Dim intThumbWidth As Integer
        Dim intThumbHeight As Integer
        Dim sFilename As String = ""
        ' Set constant values
        'sSavePath = "images/"
        sSavePath = Server.MapPath("~/") + "ls_admin/uploads/images/"

        sThumbExtension = "_thumb"
        intThumbWidth = 160
        intThumbHeight = 120

        ' If file field isn?t empty
        If FilUpload.PostedFile IsNot Nothing Then
            ' Check file size (mustn?t be 0)
            Dim myFile As Http

Difference Btw Website vs Web application and Virtual directory in IIS 7


May i know what is the Differenc that they actually make in IIS7 .

Please tell me at a low level as i am still a novice in Asp.Net


Thanks in Advance.


Browsing all Images in Directory ... ?! asp.net & C#


Hi every one ... How are you ??

OK ... I want to make album ... I try to make it using buttons( next & pre ) using imageButton control and variable (i)

So ... each next (++i) & pre ( --i) to show allimages in directory ("photo")

Here my code in C#  ::

using System;
using System.Collections;
using System.Configuration;
using System.Data;
using System.Linq;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using System.Xml.Linq;
using System.IO;
using System.Collections.Generic;

namespace iThinkerWebSite
    public partial class photos : System.Web.UI.Page

       // LinkedList<string> names = admin.getNames();
        DirectoryInfo dir;
        FileInfo[] files;
        static int i = -1;
        static int l = 0;

        protected void Page_Load(object sender, EventArgs e)
            dir = new DirectoryInfo(MapPath("photo"));
            files = dir.GetFiles();
            //l = (int)names.LongCount();
            l = files.Length;
            if (l == 0)
                Label2.Text = "No Photo to Display !!";
            Image2.ImageUrl = "images/ith.png";

Creating a user friendly alias for the website path


 Hello mates,

I am hosting my ASP.NET application on a Windows 2003 Server.

To browse to my application one has to type the path :http://serverName/applicationName

I want users to only type  applicationName on the web adress area.I believe there is something to do with alias and CNAME on DNS records that can adress this.

Any help on how to go about doing this will be highly appreciated.

active directory exception unusual behaviour


i have a small problem
i want user names from active directory for an auto completer type of service
the method is always throwing an exception 
"searcher.FindAll()' threw an exception of type 'System.DirectoryServices.DirectoryServicesCOMException' System.DirectoryServices.SearchResultCollection 
ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend