ASP.Net - File share question on local machine

Posted on 2009-04-28
Last Modified: 2012-05-06
Hello all,

I am trying to mess around with impersonate and a local share. I have code that looks as follows:

string PdfFolder = "\\\\fileserver\\BILL_RUN_PDFS\\" + sFolder;
string[] PDFDir = Directory.GetDirectories(@PdfFolder);

I created a local share under my C drive fileserver and then the above folder path is there.  This was working perfect but now it has stopped since I changed my password for my computer it seems today.  I added my user account full control of the share directory under share permissions such as:

<identity impersonate="true" userName="sbornstein"
               password="XXXXXXX" />

this would be my username and password.  So I changed it to my new password from today and it seems to be timing out now when it tries to do the GetDirectories I am getting some web exception timeout WinIOError.  I then took impersonate off and made it false and still does not work.  What am I doing wrong?  

Also is there a way I can test the share like can I go into my start run and type in \\fileserver\BILL_RUN_PDFS and it would show the directory?  If so that is not working either it seems.
"   at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)\r\n   at System.IO.Directory.InternalGetFileDirectoryNames(String path, String userPathOriginal, String searchPattern, Boolean includeFiles, Boolean includeDirs, SearchOption searchOption)\r\n   at System.IO.Directory.GetDirectories(String path, String searchPattern, SearchOption searchOption)\r\n   at System.IO.Directory.GetDirectories(String path)\r\n   at GraniteCoreServices.Billrun.Components.PDFGenControl.DeleteFileServerPDF(String jobId) in C:\\Applications\\GraniteEnterprise\\GraniteCoreServices\\Providers\\CoreProviders\\GraniteCoreServices.Billrun\\Components\\PDFGenControl.cs:line 1056"

Open in new window

Question by:sbornstein2
    1 Comment
    LVL 20

    Accepted Solution

    Well typing  \\fileserver\BILL_RUN_PDFS in run should work. if that's not working, the only thing that is possible is a network issue.

    are u able to ping to the fileserver?

    Featured Post

    How to run any project with ease

    Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
    - Combine task lists, docs, spreadsheets, and chat in one
    - View and edit from mobile/offline
    - Cut down on emails

    Join & Write a Comment

    IntroductionWhile developing web applications, a single page might contain many regions and each region might contain many number of controls with the capability to perform  postback. Many times you might need to perform some action on an ASP.NET po…
    Outsource Your Fax Infrastructure to the Cloud (And come out looking like an IT Hero!) Relative to the many demands on today’s IT teams, spending capital, time and resources to maintain physical fax servers and infrastructure is not a high priority.
    Sending a Secure fax is easy with eFax Corporate ( First, Just open a new email message.  In the To field, type your recipient's fax number You can even send a secure international fax — just include t…
    Internet Business Fax to Email Made Easy - With eFax Corporate (, you'll receive a dedicated online fax number, which is used the same way as a typical analog fax number. You'll receive secure faxes in your email, fr…

    755 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    17 Experts available now in Live!

    Get 1:1 Help Now