I want to assemble the content of several text files into a single web
page. My database (sql server) will provide the number of files and
their pathnames in the virtual directory. This would seem easy, but
every solution I've tried fails because of the fact that the files are
on another server.
I am open to any type of architecture that will work (within my
limits), so please reply with any information you can provide, even if
it's just "You idiot. Why are you trying to do that."
1. The files reside on a file server that is separate from the iis box
2. I can't install IIS on the file server, so I don't think webmethods
3. The files are plain text, and cannot be modified.
Stuff I've tried, and why it has failed:
this works as long as the virtual dir references the same server... it
doesn't use the proper impersonation when accessing a remote server
and fails when trying to login as the (iisserver)/ASPNET account
"System.IO.IOException: Logon failure: unknown user name or bad
same problem as 1, but a different error message
"System.Web.HttpException: Error executing child request for
3. Read the file into a string using e.g. FileReader (also tried
FileSystemObject from Interop.Scripting)
These methods try to find the file on my local directory. I could use
server.mappath, but that would just convert the virtual dir syntax to
smb syntax (which gives me the same access problem, since I can't
access the share as the ASPNET user)
What's not the problem:
If I browse directly to the files I'm trying to read, I can see them
For every method I've tried, I can get it to work when using a virtual
directory that points to a directory on my local machine.
Info about my setup:
For testing purposes, I granted full access to everyone (security and
sharing) for the shared directory on the fileserver (and all
sub-folders and files).
I also tried granting full write, execute, browse, and read access to
the virtual directory (ie. I created it as an application), but none
of this has helped. The errors definitely seem to be the result of
the inability of the ASP methods to use the impersonation defined on
the virtual directory.
FYI, I'm running VS.net on XP pro with sp1 of the framework. I'm
doing all of my testing on my machine, accessing a file server running
Win2kAS (both on the same domain)
Sorry this is so long.