Access Virtual Directory.

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?
 
S

Swanand Mokashi

J

j_stus

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...
 
J

j_stus

Jeff,

Yes this is resolved, now I am getting different error
Logon failure: unknown user name or bad password.
 
J

Jeff Dillon

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
 
J

j_stus

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top