|
| |
|
|
jeffmetcalf
Posts: 186 Joined: 3/16/2002 From: Status: offline
|
Server 2003 won't download files - 7/7/2006 15:46:51
Recently changed from Win2k to Win2k3. We have a folder published to a web site where we keep tech manuals (pdf) and other files (.boo, .apf, others). Since the change over, the techs in the field can't download the other files. Something about IE not knowing how to handle the file is all I can find on the net, but it's server side, not client side. Same XP machines with IE could download fine last week. Any ideas on how to fix it? Also, is there a way in FP to 'publish' this folder and list the contents that's friendly? I'd like for FP to dynamically build the page based on the contents of the folder so I can protect the main Manuals page/folder using Spooky Login. Many thanks.
|
|
|
|
rdouglass
Posts: 9206 From: Biddeford, ME USA Status: offline
|
RE: Server 2003 won't download files - 7/7/2006 16:11:25
I would suggest checking permissions on/in those files/folders and ensure the IUSR_machinename has at least read privs. As to the dynamic listing, here is a very stripped down version of a page I use to list all files of certain extensions. <%@LANGUAGE="VBSCRIPT"%>
<%
Option Explicit
On Error Resume Next
' declare variables
Dim objFSO, objFolder
Dim objCollection, objItem
Dim strPhysicalPath, strTitle, strServerName
Dim strPath, strTemp, foldName, foldTemp
Dim strName, strFile, strExt, strAttr, strDisplay
Dim intSizeB, intSizeK, intAttr, dtmDate
' declare constants
Const vbReadOnly = 1
Const vbHidden = 2
Const vbSystem = 4
Const vbVolume = 8
Const vbDirectory = 16
Const vbArchive = 32
Const vbAlias = 64
Const vbCompressed = 128
' don't cache the page
Response.AddHeader "Pragma", "No-Cache"
Response.CacheControl = "Private"
' get the current folder URL path
strTemp = Mid(Request.ServerVariables("URL"),2)
strPath = ""
Do While Instr(strTemp,"/")
foldTemp = Left(strTemp,Instr(strTemp,"/"))
strPath = strPath & Left(strTemp,Instr(strTemp,"/"))
strTemp = Mid(strTemp,Instr(strTemp,"/")+1)
Loop
foldName = Right(foldTemp,Instr(foldTemp,"/"))
foldName = Left(foldName,Len(foldName)-1)
strPath = "/" & strPath
' build the page title
strServerName = UCase(Request.ServerVariables("SERVER_NAME"))
strTitle = "Contents of the " & foldName & " folder"
' create the file system objects
strPhysicalPath = Server.MapPath(strPath)
Set objFSO = Server.CreateObject("Scripting.FileSystemObject")
Set objFolder = objFSO.GetFolder(strPhysicalPath)
%>
<html>
<head>
<title>File Listings</title>
</head>
<body marginwidth="0" marginheight="0" leftmargin="0" topmargin="0" bgcolor="#FFFFDD">
<div align="left">
<table border="0" cellspacing="1" width="100%">
<tr>
<td width="100%">
<table border="1" cellpadding="0" cellspacing="0" width="100%">
<tr>
<td valign="top" align="left">
<div align="left">
<h4 align="center"><font face="Arial" size="4">File Listing:</font></h4>
<br><table width="100%" border="1" cellspacing="1" cellpadding="2">
<tr>
<th align="left"><font face="Arial" size="3">Name</font></th>
<th align="left"><font face="Arial" size="3">File Date</font></th>
</tr>
<%
''''''''''''''''''''''''''''''''''''''''
' output the folder list
''''''''''''''''''''''''''''''''''''''''
Set objCollection = objFolder.SubFolders
For Each objItem in objCollection
strName = objItem.Name
strAttr = MakeAttr(objItem.Attributes)
dtmDate = CDate(objItem.DateLastModified)
%>
<% If (Left(strName,1) <> "_") then %>
<tr>
<td align="left"><b><a href="<%=strName%>"><font face="Arial" size="3"><%=strName%></font></a></b></td>
</tr>
<% end if%>
<% Next %>
<%
''''''''''''''''''''''''''''''''''''''''
' output the file list
''''''''''''''''''''''''''''''''''''''''
Set objCollection = objFolder.Files
For Each objItem in objCollection
strName = objItem.Name
strFile = Server.HTMLEncode(strName)
intSizeB = objItem.Size
intSizeK = Int((intSizeB/1024) + .5)
If intSizeK = 0 Then intSizeK = 1
strAttr = MakeAttr(objItem.Attributes)
strName = Ucase(objItem.ShortName)
If Instr(strName,".") Then strExt = Right(strName,Len(strName)-Instr(strName,".")) Else strExt = ""
dtmDate = CDate(objItem.DateLastModified)
strDisplay = Left(strFile,((len(strFile))-4))
%>
<% If (strExt="PDF") or (strExt="DOC") or (strExt="XLS") or (strExt="HTM") then %>
<tr>
<td align="left"><a href="<%=strFile%>" target="_blank"><font face="Arial" size="3"><%=strDisplay%></font></a></td>
<td align="left"><%=FormatDateTime(dtmDate,vbShortDate)%></td>
</tr>
<% end if %>
<% Next %>
<tr>
<td>
<font face="Arial" size="2"><input type="button" value="Exit" name="B3" onClick="window.close()"></font>
</td>
</tr>
</table> </div>
</td>
</tr>
</table>
</td>
</tr>
</table>
</div>
</body>
</html>
Save this code on an ASP page and drop it into any folder and browse to it. I currently restrict if to Acrobat, Word, Excel, and HTML pages with the line: <% If (strExt="PDF") or (strExt="DOC") or (strExt="XLS") or (strExt="HTM") then %> but you can change that to any file extensions you choose. Hope it helps.
_____________________________
Don't take you're eye off your final destination. ASP Checkbox Function Tutorial.
|
|
|
|
jeffmetcalf
Posts: 186 Joined: 3/16/2002 From: Status: offline
|
RE: Server 2003 won't download files - 7/10/2006 10:28:32
Not a persmissions issue. IUSER has NTFS and Share rights to that folder. Everything but full control.
|
|
|
|
rdouglass
Posts: 9206 From: Biddeford, ME USA Status: offline
|
RE: Server 2003 won't download files - 7/10/2006 10:41:27
Just a quick thing to check. Can they right-click a link and do a "Save As..." and download it that way? Not a final solution of course, but may point us in some direction.
_____________________________
Don't take you're eye off your final destination. ASP Checkbox Function Tutorial.
|
|
|
|
jeffmetcalf
Posts: 186 Joined: 3/16/2002 From: Status: offline
|
RE: Server 2003 won't download files - 7/10/2006 13:16:32
Nope. Can't do a save target as... Internet Explorer was not able to open this Internet Site. The requested site is either unavailable or cannot be found. The files are there. I can't do logged in as the domain or server admin either.
|
|
|
|
rdouglass
Posts: 9206 From: Biddeford, ME USA Status: offline
|
RE: Server 2003 won't download files - 7/10/2006 13:53:10
Do you have a URL? Are there *any* special characters such as apostrophes, etc in the file names?
_____________________________
Don't take you're eye off your final destination. ASP Checkbox Function Tutorial.
|
|
|
|
rdouglass
Posts: 9206 From: Biddeford, ME USA Status: offline
|
RE: Server 2003 won't download files - 7/10/2006 18:42:52
I see a lot of special characters as well as blanks in the file names. '&', '-' and ',' are pretty widespread. I can open files like 3447ops.pdf and 'flash a printer using usb.doc' with no problems but files with & and such won't open. They don't open on my server either that's why I suggested looking there. As a general rule of thumb, I only use alpha-numerics and underscores in any file names I publish on the web.
_____________________________
Don't take you're eye off your final destination. ASP Checkbox Function Tutorial.
|
|
New Messages |
No New Messages |
Hot Topic w/ New Messages |
Hot Topic w/o New Messages |
Locked w/ New Messages |
Locked w/o New Messages |
|
Post New Thread
Reply to Message
Post New Poll
Submit Vote
Delete My Own Post
Delete My Own Thread
Rate Posts
|
|
|