2011-03-02 7 views
1

ASP를 사용하여 XML 파일을로드하는 데 문제가 있습니다. 이것은 XML 파일의 위치 (그것이 UNC URL을의)입니다 :Server.MapPath가 UNC URL을 승인하지 않습니다.

\\ilife104\teamdisk\Shared\Integration\System\dev\Data\prcImportFactSetFeeds\fileList.xml 

는 그리고 이건 내 코드입니다 :

Server.MapPath() error 'ASP 0174 : 80004005' 

Invalid Path Character(s) 

/ITWeb/Interfaces/je/index.asp, line 9 

An invalid '/' or '\' was found in the Path parameter for the MapPath method. 

누구를 수행합니다

<% 
'load the XML file.. 
Option Explicit 
Response.Buffer = True 

Dim xml 
Set xml = Server.CreateObject("Microsoft.XMLDOM") 
xml.async = False 
xml.load (Server.MapPath("\\ilife104\teamdisk\Shared\Integration\System\dev\Data\prcImportFactSetFeeds\fileList.xml")) 

Dim name, retrieved 
name = xml.documentElement.childNodes(0).text 
retrieved = xml.documentElement.childNodes(2).text 

Set xml = Nothing 
%> 

그것은 오류를 제공합니다 해결책을 아는가 ?? 미리 감사드립니다, 제임스.

+1

왜'MapPath'를 호출 할 필요가? – SLaks

답변

4

Server.MapPath은 페이지 기준 경로 (예 : ../Images/Something.png)를 사용하고 디스크의 전체 경로를 반환합니다.

이미 파일 경로가 있으므로 Server.MapPath을 호출하면 안됩니다.

0

\\\\servername\\folder\\folder\\whateverfileyouwant.ext 

당신이 문자를 탈출해야

관련 문제