I have two servers. One contains the ASP web application (\\Server1) and
the other contains the data files (\\Server2).
I'm having some problem with the following "file download" code at line
"adoStream.Load FromFile(FPath) ".
The error is "ADODB.Stre am error '800a0bba' / File could not be opened."
Could someone please offer some suggestions?
<%
Response.Buffer = False
Server.ScriptTi meout = 30000
Response.Conten tType = "applicatio n/x-unknown" ' arbitrary
fn = "MyPhoto.jp g"
fpath = "\\Server2\g$\f iles\MyPhoto.jp g"
Response.AddHea der "Content-Disposition", "attachment ; filename=" & fn
Set adoStream = CreateObject("A DODB.Stream")
chunk = 2048
adoStream.Open( )
adoStream.Type = 1
adoStream.LoadF romFile(FPath)
iSz = adoStream.Size
Response.AddHea der "Content-Length", iSz
For i = 1 To iSz \ chunk
If Not Response.IsClie ntConnected Then Exit For
Response.Binary Write adoStream.Read( chunk)
Next
If iSz Mod chunk 0 Then
If Response.IsClie ntConnected Then
Response.Binary Write adoStream.Read( iSz Mod chunk)
End If
End If
adoStream.Close
Set adoStream = Nothing
Response.End
%> 7 7194
"David R." <da***********@ nospam.comwrote in message
news:eI******** ******@TK2MSFTN GP04.phx.gbl...
>I have two servers. One contains the ASP web application (\\Server1) and the other contains the data files (\\Server2).
I'm having some problem with the following "file download" code at line
"adoStream.Load FromFile(FPath) ".
The error is "ADODB.Stre am error '800a0bba' / File could not be opened."
Could someone please offer some suggestions?
<%
Response.Buffer = False
Server.ScriptTi meout = 30000
Response.Conten tType = "applicatio n/x-unknown" ' arbitrary
fn = "MyPhoto.jp g"
fpath = "\\Server2\g$\f iles\MyPhoto.jp g"
This only works, if the anonymous user account IUSR_ has access rights over
the network, and by default, it has not.
Could you please tell me how to set that up?
Thank you.
"Egbert Nierop (MVP for IIS)" <eg***********@ nospam.invalidw rote in
message news:Ow******** ******@TK2MSFTN GP06.phx.gbl...
>
"David R." <da***********@ nospam.comwrote in message
news:eI******** ******@TK2MSFTN GP04.phx.gbl...
>>I have two servers. One contains the ASP web application (\\Server1) and the other contains the data files (\\Server2).
I'm having some problem with the following "file download" code at line "adoStream.Loa dFromFile(FPath )".
The error is "ADODB.Stre am error '800a0bba' / File could not be opened."
Could someone please offer some suggestions?
<% Response.Buffe r = False Server.ScriptT imeout = 30000 Response.Conte ntType = "applicatio n/x-unknown" ' arbitrary
fn = "MyPhoto.jp g" fpath = "\\Server2\g$\f iles\MyPhoto.jp g"
This only works, if the anonymous user account IUSR_ has access rights
over the network, and by default, it has not. http://www.aspfaq.com/show.asp?id=2168
David R. wrote:
Could you please tell me how to set that up?
Thank you.
"Egbert Nierop (MVP for IIS)" <eg***********@ nospam.invalidw rote in
message news:Ow******** ******@TK2MSFTN GP06.phx.gbl...
>> "David R." <da***********@ nospam.comwrote in message news:eI******* *******@TK2MSFT NGP04.phx.gbl.. .
>>I have two servers. One contains the ASP web application (\\Server1) and the other contains the data files (\\Server2).
I'm having some problem with the following "file download" code at line "adoStream.Load FromFile(FPath) ".
The error is "ADODB.Stre am error '800a0bba' / File could not be opened."
Could someone please offer some suggestions?
<% Response.Buff er = False Server.Script Timeout = 30000 Response.Cont entType = "applicatio n/x-unknown" ' arbitrary
fn = "MyPhoto.jp g" fpath = "\\Server2\g$\f iles\MyPhoto.jp g"
This only works, if the anonymous user account IUSR_ has access rights over the network, and by default, it has not.
--
Microsoft MVP -- ASP/ASP.NET
Please reply to the newsgroup. The email account listed in my From
header is my spam trap, so I don't check it very often. You will get a
quicker response by posting to the newsgroup.
I recreated the IUSR/IWAM accounts reset/resynced passwords on the remote
server and gave them Full Control (figuring it was permissions thing).
However this did not fix it and I still receive the same message.
Here are my questions
1. What permissions are need for the ADODB.Stream to read a remote
filesystem (ie., what security context is it currently running under, please
don't say SYSTEM)?
2. If this is not possible are there any alternatives to the ADODB.Stream to
download a file from a remote filesystem?
"Bob Barrows [MVP]" <re******@NOyah oo.SPAMcomwrote in message
news:e3******** *****@TK2MSFTNG P05.phx.gbl...
http://www.aspfaq.com/show.asp?id=2168
David R. wrote:
>Could you please tell me how to set that up?
Thank you.
"Egbert Nierop (MVP for IIS)" <eg***********@ nospam.invalidw rote in message news:Ow******** ******@TK2MSFTN GP06.phx.gbl...
>>> "David R." <da***********@ nospam.comwrote in message news:eI****** ********@TK2MSF TNGP04.phx.gbl. .. I have two servers. One contains the ASP web application (\\Server1 ) and the other contains the data files (\\Server2).
I'm having some problem with the following "file download" code at line "adoStream.Load FromFile(FPath) ".
The error is "ADODB.Stre am error '800a0bba' / File could not be opened."
Could someone please offer some suggestions?
<% Response.Buf fer = False Server.Scrip tTimeout = 30000 Response.Con tentType = "applicatio n/x-unknown" ' arbitrary
fn = "MyPhoto.jp g" fpath = "\\Server2\g$\f iles\MyPhoto.jp g"
This only works, if the anonymous user account IUSR_ has access rights over the network, and by default, it has not.
--
Microsoft MVP -- ASP/ASP.NET
Please reply to the newsgroup. The email account listed in my From
header is my spam trap, so I don't check it very often. You will get a
quicker response by posting to the newsgroup.
"David R." <da***********@ nospam.comwrote in message
news:Ox******** ********@TK2MSF TNGP05.phx.gbl. ..
>I recreated the IUSR/IWAM accounts reset/resynced passwords on the remote server and gave them Full Control (figuring it was permissions thing).
However this did not fix it and I still receive the same message.
Here are my questions
1. What permissions are need for the ADODB.Stream to read a remote
filesystem (ie., what security context is it currently running under,
please don't say SYSTEM)?
2. If this is not possible are there any alternatives to the ADODB.Stream
to download a file from a remote filesystem?
What he means that you reconfigure IUSR account.
Create a network user account, that is not a 'guest' member.
Then apply that user to the anonymous account, and make sure that the
\\SERVER\SHARE also allows that user and the NTFS permission on that remote
file system allows that user.
So, on \\Server1, I would change the password for Server1\IUSR_Se rver1 in
IIS.
Then on \\Server2, I would create Server2\IUSR_Se rver1 account with the same
password.
Is this correct?
"Egbert Nierop (MVP for IIS)" <eg***********@ nospam.invalidw rote in
message news:ez******** ******@TK2MSFTN GP06.phx.gbl...
>
"David R." <da***********@ nospam.comwrote in message
news:Ox******** ********@TK2MSF TNGP05.phx.gbl. ..
>>I recreated the IUSR/IWAM accounts reset/resynced passwords on the remote server and gave them Full Control (figuring it was permissions thing).
However this did not fix it and I still receive the same message.
Here are my questions 1. What permissions are need for the ADODB.Stream to read a remote filesystem (ie., what security context is it currently running under, please don't say SYSTEM)?
2. If this is not possible are there any alternatives to the ADODB.Stream to download a file from a remote filesystem?
What he means that you reconfigure IUSR account.
Create a network user account, that is not a 'guest' member.
Then apply that user to the anonymous account, and make sure that the
\\SERVER\SHARE also allows that user and the NTFS permission on that
remote file system allows that user.
"David R." <da***********@ nospam.comwrote in message
news:u1******** *****@TK2MSFTNG P05.phx.gbl...
So, on \\Server1, I would change the password for Server1\IUSR_Se rver1 in
IIS.
Then on \\Server2, I would create Server2\IUSR_Se rver1 account with the
same password.
Is this correct?
No, since IUSR_ blah has no access rights on the network share.
Just create DOMAIN\IUSR_bla h
and on both IIS servers, you configure these accounts, by applying them.
These accounts, must be user accounts. It's a penalty in security so be
aware of that. This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: Tim Black |
last post by:
In my recent experience, popen os pipes always fail when cwd is a UNC
path. Can anyone shed any light on this? Although I've seen lots of
UNC path-related problems in this newsgroup, I've not been able to
find anything specifically about os pipes and UNC paths.
Here's a session dump that demonstrates what I'm talking about:
Python 2.3.4 (#53, May 25 2004, 21:17:02)
on win32
Type "help", "copyright", "credits" or "license" for more...
|
by: Erik Lindeblom |
last post by:
I am having trouble getting ANY asp.net application (either .aspx or .asmx)
working when IIS is configured to use a "share located on another computer"
via a UNC reference. Any .aspx or .asmx generates the following error when
I try to browse to the page:
Parser Error Message: Could not load type 'dummyASPX.Global'.
Source Error:
Line 1: <%@ Application Codebehind="Global.asax.vb"
|
by: pj_servadmin |
last post by:
Server Error in '/<applicationName>' Application
--------------------------------------------------------------------------------
Parser Error
Description: An error occurred during the parsing of a resource required to
service this request. Please review the following specific parse error
details and modify your source file appropriately.
Parser Error Message: Could not load type 'Default.Global'.
Source Error:
Line 1: <%@ Application...
|
by: flipdoubt |
last post by:
I have an application that stores paths as UNCs in a database. I want ASP.NET
to move files from a UNC to a web accessible location, but I'm having the
hardest time getting the app to access the UNC even when the UNC points to
the machine running ASP.NET. What magical and voodoo must I perform to Access
a UNC from an ASP.NET application?
|
by: Tim Marsden |
last post by:
Hi
How do I determine the UNC path of a file in VB.NET.
for example if I am given "D:\folder\file.txt", I want to obtain
"\\Computer\Drive\Folder\file.txt"
Tim
| |
by: Johan |
last post by:
Hi all
I'm trying to set the permissions of a file using WMI, and since i'm
writing a windows service i want to use UNC paths doing this because
the destination might not be a mapped path. I'we been looking around
here at google and gotten the impression that it is not possible to
use UNC paths when working with WMI, is that really so? Or does anyone
know how how to set file permissions using a UNC path? I'we gotten to
work ok with a...
|
by: Sarah |
last post by:
I need to access some data on a server. I can access it directly using UNC
(i.e. \\ComputerName\ShareName\Path\FileName) or using a mapped network
drive resource (S:\Path\FileName).
Here is my problem: my vb.net program has problems with UNC. If the UNC
server is restarted or goes off-line, my VB.net program crashes. The code
for UNC access to the file is included below and is put in the tick event of
a form timer control running every...
|
by: mcrose |
last post by:
I couldn't find anything that quite described this in whole, so I'm
going to post it since from what I can tell about 400 other people have
posted asking how to do this and received partial answers
To set up an IIS 6.0 application that can access a UNC drive.
1. Create/Identify a domain account with access to the required UNC
location
2. Add that user to the IIS_WPG group on the Web Server
3. Create an application pool on the Web...
|
by: DMG |
last post by:
I have <identity impersonate = "true" /& <authentication
mode="Windows"/in the web.config. This is a 2.0 site. My Goal: I
want to simply have the user browse to a file on a mapped drive and get
the UNC for that file and eventually save that unc path to the database
as a link. The problem is depending on office we have the same drive
letter mapped to different servers.
My current test works when I run everything locally and maps...
|
by: wreed |
last post by:
Is there a way on a button press to create a browse for a file box and
then when they pick a file on a share drive to convert it to a UNC
path and that way I would save the unc path into a table and not have
to store the file? If anyone has a solution to getting the UNC path I
would love it. Please.
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look !
Part I. Meaning of...
| |
by: Hystou |
last post by:
Overview:
Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM).
In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules.
He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms.
Adolph will...
|
by: conductexam |
last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one.
At the time of converting from word file to html my equations which are in the word document file was convert into image.
Globals.ThisAddIn.Application.ActiveDocument.Select();...
|
by: TSSRALBI |
last post by:
Hello
I'm a network technician in training and I need your help.
I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs.
The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols.
I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
|
by: 6302768590 |
last post by:
Hai team
i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
| |
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
|
by: bsmnconsultancy |
last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...
| |