Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / Languages / VB.NET / July 2007

Tip: Looking for answers? Try searching our database.

Files

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
ats@jbex - 05 Jul 2007 11:40 GMT
I am using VB.Net to do the code behind pages for a website. Is it possible
to view files from a network drive without that drive being a virtual
directory? For example, website is at www.hostname.com. Can I list some
documents (.pdf's) here that are foe example in \\T:\DocsFolder and be able
to view them by clicking them?
Signature

ats@jbex

The world is my expense
The cost of my desire
Jesus blessed me with its future
And I protect it with fire

Rage Against The Machine - Sleep Now In The Fire

Patrice - 05 Jul 2007 11:50 GMT
You can code this that is your page could list those files, presents them
and react acdoingly to clicks. The account under whihc the page runs will
need to have access to this network share...

--
Patrice

>I am using VB.Net to do the code behind pages for a website. Is it possible
> to view files from a network drive without that drive being a virtual
> directory? For example, website is at www.hostname.com. Can I list some
> documents (.pdf's) here that are foe example in \\T:\DocsFolder and be
> able
> to view them by clicking them?
Mark S. Milley, MCSD (BinarySwitch) - 05 Jul 2007 14:11 GMT
Hello Allen -

A more secure approach is to create a new, limited account on the
domain that would have access to that resource, then use .NET
impersonation to impersonate that account ONLY on the pages that need
it.

In addition, make sure that if you use this approach, you store the
username and password encrypted in the registry of the web server
instead of leaving them as plain text in the configuration or code
files.

Good Luck,

-Mark
ats@jbex - 05 Jul 2007 16:03 GMT
> Hello Allen -
>
[quoted text clipped - 11 lines]
>
> -Mark

Thanks for that. Using the registry for username/password combo's os
something that I do anyway. Will try the limited account approach to the
resource. The main part of the original question though was how to go about
doing it.

Thanks

Signature

ats@jbex

You have been dying since the day
You were born
You know it has all been planned

Metallica - The Four Horsemen

Mark S. Milley, MCSD (BinarySwitch) - 05 Jul 2007 19:28 GMT
http://msdn2.microsoft.com/EN-US/library/aa292118(VS.71).aspx
ats@jbex - 06 Jul 2007 08:29 GMT
> http://msdn2.microsoft.com/EN-US/library/aa292118(VS.71).aspx

Cheers Mark :-)
Signature

ats@jbex

I'm not gonna be taken in
They said if I don't join I just can't win
I've heard that story many times before
And every time I threw it out the door

SLF - Wasted Life


Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.