Accessing network folder???


hai all,

by using the following code is it possible to get check a folder is present in a system in the network?

string fold=@\\server-name\system-name\folder-name;

if (System.IO.Directory.Exists(fold)){}

its not working for me... am i doing correct?

 

0
rohita
7/22/2006 11:46:03 AM
asp.net.getting-started 91979 articles. 4 followers. Follow

1 Replies
453 Views

Similar Articles

[PageSpeed] 53

Try mapping the network folder as a network drive and working with it like that.
Cheers,
       Kevin Jones


0
vcsjones
7/22/2006 2:08:20 PM
Reply:

Similar Artilces:

getting network folder's, users and groups security access list
hello, I am writing an app that: 1. create a network group 2. add some users to new created group 3. add security access to a folder, adding new group for 1. I used jclLanMan unit: CreateGlobalGroup(server,agroup,description); for 2. I used NetGroupAddUser from jwaWindows unit; for 3. finally I had to use "ShellExecute" calling icacls, (i didn't find an elegant successful way...), something like: {code} var Sid: PSID; sids:string; tpsid:string; trform:TRUSTEE_FORM; s:WideString; begin Nome_SID(server,groupname,sids,tpsid,sid); s:='"'+fo...

Access Denied error when trying to access a networked drive folder
I am trying to access a network drive folder from an ASP.NET application and everything Itry seems to fail. The ASP.NET application makes the call Directory.GetFiles using the UNC for the folder path.When I set Impersonate = true in the web.config file I am prompted for the username/password which does not work.If Impersonate = false I get Logon failure: unknown user name or bad password error message.  I havethe target folder security on the networked drive set for the ASP.NET account set with full control.Since I am using IE 6.0 I tried setting the folder security for Network Services...

How to set Full folder Access rights for getting file Access (Read/Write)
Hi I am working on web application through which I am modifying XML file saved in folder. When I try to save the modified XML file  through the application, I am getting the error "Access to the path 'D:\CT.Sharedconfig\ConfigFiles\CT\CreditCards.xml' is denied" I searched a lot for this , but most of solutions suggested to set access permissions for this folder manually. If I add user "everyone" through Security tab of permissions Window (shown by right click on the required folder in explorer) and set full access rights to this user, then application ...

how to get start with .NET
the net help people installed  to my desktop 1-microsoft visual studio .NET enterprise developer 2003 2-microsoft .NET framework 1.1 what else do i need ...???  and how can i try with some simple code in VS.Net and run it to see wat happen...????? please help If you want to develope web applications, then you'll also need IIS on your PC.  That'll require XP-Professional or Windows 2000/2003, but XP-Home edition won't allow IIS installation. As for how to get started, you can search the web for some tutorials or buy a good book on VS.  The topic is way too vast to...

Getting Start With .net
hi i'm intersted to learn asp.net (vb or delphi) . i programming with delphi6 but i'd like to tp know something about programming in internet specially with .net . i hear about microsoft.net with delphi 7 that i can programming with delphi in .net .... is it right ? what 's our opinian about it ? and better to learn Vb.Net or continu with delphi(or delphi.net) thanks. Ali Darabian I think there is some support for Delphi in .Net. However, you will find much more support from the user community if you choose a more popular language such as VB.Net or C#. Since your al...

Can not get Pickup Directory... .net can't access metabase maybe??? Need to get working ASAP
I am using 2.0 to try to send an email to the IisPickup directorySystem.Net.Mail.MailMessage message = new System.Net.Mail.MailMessage(test@testing.com, "test@test.com", "Testing " + DateTime.Now.ToString(), "Testing the Mail Drop Folder");System.Net.Mail.SmtpClient client = new System.Net.Mail.SmtpClient("127.0.0.1");client.DeliveryMethod = System.Net.Mail.SmtpDeliveryMethod.PickupDirectoryFromIis; client.Send(message);Example Site : www.andrewworral.com (hit the button)This code worked on our old deployment server but not on our new server.  I s...

Where to start and how did you get started?
Hi, I have had a feeling for a long time to jump into the adds market for some time due to my low income (shooting for the stars) and I don't have anything better to do these days. But I find it really difficult not to give up due to lack of guides (what I can find atleast) and all the hard words which only makes me confused. But I won't give up. Never. Not sure if this is the right place to post this, but I deffinitly would be really greatfull for help getting started. How did you get started? +If there are any teacher that wanna show me the ropes private, I can give payment with ...

How to access files in network folder?
I'm now using C# in ASP.NET to write a website which need to display some files in a network folder. Below is part of my code:              string dir = @"\\file\StaffManual";             string[] filespath = Directory.GetFiles(dir); When I open my website, the error message comes out. Server Error in '/' Application. Logon failure: unknown user name or bad password. Description: An unhandled exception occurred during the execution of the current web request. Pl...

Getting started with JScript.NET
I'm a Javascript and Actionscript developer, and the thought of being able to do server-sides in something I know was too good to resist. Does anyone know some good tutorials for developing ASP.NET pages in JScript?  I can find lots of console code, but simple things are hard: like I can't even figure out how to print something out to the web page (just a string). What I'm really trying to do is access a database, verify a login, and print JSON out to the response.  What should I do to start?  Is there a better way to do this? (IE: using some JSON library already?). I'm commun...

Help with access to a Network Folder.
Hi, I'm using VS2005, VB. I have a web page used by our HR people that accesses employee photographs & data [Name, Hire Date . . .]. The folder that the photographs reside in has had a user 'Everyone' that has 'Full Control'. I would like to take that 'Everyone' user out completely and leave only specific, authorized network Users with access to the photographs. Currently, all the network Users & UserGroups  that DO need to be able to access the folder have been given Access - [including the network Server machine name on which the web ...

Shared Network folder in .net
Hi there: Does anyone know how to find if a local folder is shared as a network folder and how can I find that "network address"? Let me explain myself: the folder c:\data can be shared as \\MyServer\Data\, can I know this? Thanks a lot!!! You may want to try GetShareInfo().  This returns all the shared folders as an array. Hope this helps.Somewhere, something incredible is waiting to be known -- Carl Sagan Hi, thanx for the quick reply: Is the GetShareInfo() method a .net method? Cause it seems like the method belongs to a Microsoft.Homeserver SDK which seems to be ...

Getting Started with .net and a few questions
Hello I've done some asp and php programming along with various other languages in the past and slowing getting my head around .net.I have a small project of creating a Holiday Booking system on our Intranet and just trying to get the first part to work properly will hopefully get me sorted for the whole project. The Intranet is running on .net 2 and I prefer to use the VB code rather than C#. This is connecting to an SQL server.My initial page that I am trying to create is just for an admin user to view which dates in a table have been specified as Bank Holidays and be able to add ...

Getting started .net website
Hi folks,Does anyone here know of a good website to just sit back and read for learning .net? Thanks in advance.Baldeep Right here... Click the Get Started and Learn sections here. Quite a few out there - - this one, has a lot of good videos -  also ASPNet101.com, but then, I might be a little prejudiced David WierMCP/ASPInsiderASPNet101.com - where to look first!Please Vote for ASPNet101 - 'Best Community Resource'!Control Grouper - easily control properties for multiple controls with one control!Calendar Express - The Best HTML Calendar Generator on the web!(P...

Getting started with network applications
Background - I've been programming in Pascal/Delphi since my Apple II+ days. I'm now using Rad Studio/Delphi 2007. My experience has been limited to stand-alone applications, using simple data types, and not making use of many sophisticated features of the IDE and the language. My inputs are text files, and the outputs are text files and .gif graphs. The closest thing to Internet communication is that my programs create emails with attachments and places them in my Windows Mail Outbox. My latest programming references have been Cantù's "Mastering Delphi 5" and...

Web resources about - Accessing network folder??? - asp.net.getting-started

Highest Percentage Of Opera Mini Users Accessing Facebook? Macau
If you were asked to guess which country had the highest percentage of users of Opera mobile Web browser Opera Mini users accessing Facebook ...

International Users Accessing Facebook Places Through US VPN Accounts
By using a virtual private network (VPN) hosted in the United States, Facebook users from around the world are accessing Facebook Places. The ...

What are some alternatives to Yodlee for accessing bank information?
Clay Loveless , Founder, Jexy. Co-founder, Mashery. Founder, Jexy. Co-founder, Mashery.

Cloud Console - Accessing files in cloud storage for iPad on the iTunes App Store
Get Cloud Console - Accessing files in cloud storage on the App Store. See screenshots and ratings, and read customer reviews.

Meryl Streep On Accessing The Characters Within - YouTube
Meryl Streep talks about the importance of an actors work representing their ability. CONNECT WITH AFI: http://facebook.com/AmericanFilmInstitute ...

Accessing the Future Fund a sensible proposal, says super expert Daryl Dixon
As portfolios go, the Future Fund's asset allocation is concentrated in higher-risk investment, including equities and alternative assets.

Accessing my Super
I'm 57 - can I access my super?

Australia, US accessing Indonesian telephone data, leaked documents show
Newly disclosed documents from former US intelligence contractor Edward Snowden have revealed that Australian intelligence efforts against Indonesia ...

Euthanasia advocate Philip Nitschke detained at Melbourne Airport, accuses Customs officials of accessing ...
Euthanasia advocate Philip Nitschke has accused Customs officials of accessing hundreds of patients' sensitive records on his laptop after detaining ...

Frances Abbott scholarship: Sydney woman pleads guilty to accessing Whitehouse Institute records on PM's ...
A Sydney woman who leaked the student records of Tony Abbott's daughter pleads guilty. A Sydney woman who leaked the student records of Prime ...

Resources last updated: 11/21/2015 9:32:48 AM