Wrox Programmer Forums
Go Back   Wrox Programmer Forums > ASP.NET and ASP > ASP.NET 2.0 > ASP.NET 2.0 Basics
|
ASP.NET 2.0 Basics If you are new to ASP or ASP.NET programming with version 2.0, this is the forum to begin asking questions. Please also see the Visual Web Developer 2005 forum.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the ASP.NET 2.0 Basics section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old June 4th, 2008, 04:09 PM
Authorized User
 
Join Date: Mar 2007
Posts: 13
Thanks: 0
Thanked 0 Times in 0 Posts
Default Referencing data on external drive

It's a bit convoluted this, but here goes.

I have an ASP web application that runs on a low spec old laptop, which also runs an instance of SQL Server. The application is defined in IIS on the local C: drive and works happily. I now wish to generate pages on demand with links that point to data held on an external HDD mapped to the laptop [server], but it won't work.

If the links refer to the HDD via its mapped drive e.g.
<a href="file://T:/folerpath/file.ext>File to link to</a>
it works internally on my LAN but not remotely form the outside world obviously, as the browser can't see a T: drive.

I thought re-defining the application within IIS to hold it in the same location as the folder on the ext HDD containing the data would resolve it and make the links resolve within the defined application, but IIS doesn't like that, and the whole web app fails.

This must be the most rudimentary method of doing things - seperating the data from the presentation and logic in the way that we're always told. So how do I get my web page to point to the data on the external HDD?

Thx in advance.
 
Old June 5th, 2008, 09:24 AM
planoie's Avatar
Friend of Wrox
 
Join Date: Aug 2003
Posts: 5,407
Thanks: 0
Thanked 16 Times in 16 Posts
Default

What are the files you are trying to access that are external?

If you are simply trying to serve raw files from one machine that are on another machine you may need to look into writing some handlers. The handler will read the file on the local network and just stream out the data through the web app. Obviously, as you've found, outside clients aren't going to be able to see your internal resources.

-Peter
compiledthoughts.com
 
Old June 6th, 2008, 06:46 AM
Authorized User
 
Join Date: Mar 2007
Posts: 13
Thanks: 0
Thanked 0 Times in 0 Posts
Default

The data files are a mix of JPGs and MP3s, which I'd like to be able to access from anywhere once logged in to my site.

It's surprising that this isn't handled by some sort of process already built in, either to IIS or ASP itself - it's hardly an unusual requirement.

Thanks for the response though.

 
Old June 6th, 2008, 08:31 AM
planoie's Avatar
Friend of Wrox
 
Join Date: Aug 2003
Posts: 5,407
Thanks: 0
Thanked 16 Times in 16 Posts
Default

You can set up IIS to point to a network drive so you can serve files from multiple physical systems via single server. Sure, this is common. But you need to set it up. Your security model will dictate the level of difficulty. I have a NAS (Linux) server at home and several separate web servers that serve files from it. At work we have a central content repository that servers several web farms.

You can create a site or virtual directory in IIS that points to a network location. You just need to provide it suitable security credentials to be able to access the files.

-Peter
compiledthoughts.com
 
Old June 9th, 2008, 06:20 PM
Authorized User
 
Join Date: Mar 2007
Posts: 13
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Sorted - created a virtual directory, made some tweaks to the stored procedure to build the correct path and it's working, once the permissions to the ext drive were resolved.

Thanks for the help Planoie.





Similar Threads
Thread Thread Starter Forum Replies Last Post
Referencing Data in Subforms avsrule Access 3 December 13th, 2008 07:34 PM
Datatables - referencing the data in VB Code Juan Patrick Visual Basic 2005 Basics 4 July 2nd, 2007 10:19 PM
Retrieving data from a Share drive Newbie19 VB.NET 2 June 26th, 2007 07:20 AM
data source to db on mapped drive dhx10000 Classic ASP Professional 9 August 8th, 2006 07:02 AM
place data directory on another drive mikeuk MySQL 0 November 25th, 2004 12:02 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.