PDA

Click to See Complete Forum and Search --> : Error creating virtual directory


msdnexpert
Dec 6th, 2000, 11:23 AM
Dear all,
I am trying to create a virtual directory on my IIS 4.0 server. The virtual directory is created but it displays an ERROR icon on the virtual directory. Also I am unable to get the mappath of the virtual directory. I get an error when I try to do Server.Mappath for that virtual directory. I am unable to figure why IIS is creating that virtual directory with an error. Ant suggestions. Thanks in advance.

Dec 6th, 2000, 09:20 PM
Hi,,
Check see whether your server set the permission to create a virtual directory....

try
<%
Path = Server.Mappath("/folder/myfolder")
response.write Path
response.end
%>

check the result for variable Path


Regards,
Mac
:o Mac :)

msdnexpert
Dec 7th, 2000, 11:31 AM
Hi Mac,
I tried out what u said. It just displays an error message. It seems that the virtual directory has been created with an error. But I can't figure out why it is creating the virtual directory with an error.Any other suggestions

Dec 7th, 2000, 11:42 PM
Hi,

maybe try to write a simple code to test.
<%
Dim FSO, myFolder
Set FSO = Server.CreateObject("Scripting.FileSystemObject")
myFolder = FSO.CreateFolder(Server.MapPath("/myName1"))
%>

Wat is the error message that server prompt you actually?
Chk server permission to allow u to create.

Regards,
Mac
:o Mac :)

msdnexpert
Dec 8th, 2000, 11:31 AM
Hi Mac,
Well the web server does not give me any error message when I create the virtual directory. It creates the virtual direcotry but the icon displays a red logo with the word ERROR. And when I try out Server.Mappath("/VirtualDir") it displays me a message that the directory is invalid. Through the IIS MMC console I am able to browse the contents of the virtual directory even though it has been created with errors. Any ideas.

Dec 9th, 2000, 01:56 AM
It's too weird .....no idea

Regards
Mac
:o Mac :)