Access Virtual Directory.

  • Thread starter Thread starter j_stus
  • Start date Start date
J

j_stus

Hi there,

I created virtual directory on IIS.
Alias Name = "ABC"
Then I created simple web site which has just one button.
When clicking on that button following code is executed:


Dim myFile As StreamReader = File.OpenText("/abc/MyFile.txt")
Dim line As String = myFile.ReadLine
Do While Not line Is String.Empty
Dim XXX As String = line
Loop
myFile.Close()

This is the error message I am getting:

Could not find a part of the path "C:\abc\MyFile.txt".

What am I doing wrong?
 
To Swanand Mokashi
How do I do it? I added aspwp user to that folder but problem is still
the same...
To Jeff
This is what I did:
Dim x As String = Server.MapPath("/abc/MyFile.txt")
Then when I check x it is C:\Inetpub\wwwroot\abc\myFile.txt...
 
Jeff,

Yes this is resolved, now I am getting different error
Logon failure: unknown user name or bad password.
 
How are you prompting users to log onto this site?

What user context are you running under? Is Anonymous turned on? What are
the permissions on this file and this directory?

You'll probably want to turn on Basic authentication

Jeff
 
I am not sure if I can still post to this thread...
I was on vacation, and couldn't participate..
anyway
Anonymous is turned off.
DIgest authentication for Windows domain servers is selected.
Basic authentication is selected.
..Net Password authentication is not selected.
Permissions on the file:
Administrator (Domain\Administrator)
aspnet_wp account (computerName\ASPNET)
Authenticated Users
Everyone
 
Back
Top