|
-
Nov 9th, 2011, 12:53 PM
#1
Thread Starter
Fanatic Member
List the contents of a drive
I have been told 'they' want to be able to see the documents on Drive:H
Is this doable from within a web application project?
-
Nov 9th, 2011, 01:30 PM
#2
Frenzied Member
Re: List the contents of a drive
Probably depends a lot on how your security was set up on your server.
Sean
Some days when I think about the next 30 years or so of my life I am going to spend writing code, I happily contemplate stepping off a curb in front of a fast moving bus.
-
Nov 9th, 2011, 01:38 PM
#3
Thread Starter
Fanatic Member
Re: List the contents of a drive
 Originally Posted by SeanGrebey
Probably depends a lot on how your security was set up on your server.
As it is a requirement of the specification, I'm assuming the security issues will be dealt with so that the drive can be accessed. It's how you 'find' the drive and list the contents that I am after.
I like your signature. I spent 20 years as a land surveyor / site engineer / site manager / project manager in the construction industry. 6 day weeks were usual and 7 days was standard for the last 6 months of a project - to get handover on time and avoid liquidated damages.
Most days sitting here tapping out a bit of code, from home, seems like a doddle - and is quite interesting sometimes!
-
Nov 9th, 2011, 01:45 PM
#4
Re: List the contents of a drive
Presuming that the security is in place and further presuming that everyone who will ever use this application has a Drive H: mapped to the exact same place, what would you want your documents displayed in?
Some type of Grid?
ListView?
ListBox?
Dropdown Combo?
Something else entirely?
-
Nov 9th, 2011, 01:54 PM
#5
Thread Starter
Fanatic Member
Re: List the contents of a drive
 Originally Posted by Hack
Presuming that the security is in place and further presuming that everyone who will ever use this application has a Drive H: mapped to the exact same place, what would you want your documents displayed in?
Some type of Grid?
ListView?
ListBox?
Dropdown Combo?
Something else entirely?
The guys who run the network at this place are really switched on - so I'm assuming the team that will use the application will all have a Drive H: mapped to the same place ... they want to be able to access the documents kept there from within the application I am building.
So, I'm figuring to start with I will list them in a gridview. Unless there is an easy way of creating some sort of directory tree?
-
Nov 9th, 2011, 01:59 PM
#6
Re: List the contents of a drive
-
Nov 9th, 2011, 02:05 PM
#7
Thread Starter
Fanatic Member
Re: List the contents of a drive
 Originally Posted by Hack
Thanks for that ... I was searching using a different expression - and was getting nothing very useful. That 4guysfromrolla article looks good.
-
Nov 9th, 2011, 02:17 PM
#8
Frenzied Member
Re: List the contents of a drive
 Originally Posted by Hack
Presuming that the security is in place and further presuming that everyone who will ever use this application has a Drive H: mapped to the exact same place, what would you want your documents displayed in?
Some type of Grid?
ListView?
ListBox?
Dropdown Combo?
Something else entirely?
Why would you need drive H mapped? If you are trying to look at a Server's H drive, wouldn't whatever account you are running under just need the drive mapped, and then assuming you had permission to it, you should be able to access it in code just using "H:\" wouldn't you?
Sean
Some days when I think about the next 30 years or so of my life I am going to spend writing code, I happily contemplate stepping off a curb in front of a fast moving bus.
-
Nov 13th, 2011, 05:39 AM
#9
Re: List the contents of a drive
That is correct Sean.
In order to access the files, the Identity of the user who is running the ASP.Net Application Pool for the application, would need to have access. Unless of course you are using Impersonation, but that hasn't been mentioned in this thread.
In which case, I would actually recommend NOT using a mapped H: drive, instead use the UNC path to the files, and ensure that the Application Pool Identity has the correct permissions to access the files.
Gary
-
Nov 13th, 2011, 09:11 AM
#10
Thread Starter
Fanatic Member
Re: List the contents of a drive
 Originally Posted by gep13
That is correct Sean.
In order to access the files, the Identity of the user who is running the ASP.Net Application Pool for the application, would need to have access. Unless of course you are using Impersonation, but that hasn't been mentioned in this thread.
In which case, I would actually recommend NOT using a mapped H: drive, instead use the UNC path to the files, and ensure that the Application Pool Identity has the correct permissions to access the files.
Gary
Hi Gary
<authentication mode="windows"> and <identity impersonate="true">
Cheers
-
Nov 13th, 2011, 09:31 AM
#11
Re: List the contents of a drive
Ah, so you are using impersonation.
In which case, you will need to make sure that the credentials of the logged in person to your application also has access to the information on the server. In this case, they are still not going to be able to "see" the H: drive, so I would still recommend that you use the UNC path.
Gary
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|