msxml3.dll (0x800C0005) error

Results 1 to 10 of 10

Thread: msxml3.dll (0x800C0005) error

  1. #1
    Join Date
    Dec 1969
    Posts
    209

    Default msxml3.dll (0x800C0005) error

    hi,<BR><BR>i am running a script and the following gives me a "msxml3.dll (0x800C0005<BR>The system cannot locate the resource specified. " error<BR><BR>Set xml = Server.CreateObject("Microsoft.XMLHTTP")<BR>xml.Op en "GET", server.mappath(myPath), False<BR>xml.Send &#039;this line causes the error<BR><BR>I am opening, using and setting the xml object to "nothing" regulary in a loop to write a number of different files to the disk<BR><BR>can anyone help as to what is causing this error and suggest a fix.<BR><BR>thanks in advance<BR><BR>gelboe

  2. #2
    Join Date
    Dec 1969
    Posts
    16,931

    Default RE: msxml3.dll (0x800C0005) error

    Debug. What&#039;s the value of myPath when the error occurs?<BR><BR>I really worry about why you&#039;re using server.mappath inside that code, but we&#039;ll come to that in a minute (I&#039;d think).<BR><BR>Craig.

  3. #3
    Join Date
    Dec 1969
    Posts
    209

    Default RE: msxml3.dll (0x800C0005) error

    i put myPath in this snippet as an example. the value in the actual code is a part hardcoded path to a folder on the server (same server as the one the asp page is running on hence the mappath) comprising of some dymamic folder and file names selected from a database. it looks like this:<BR><BR>&#039;***<BR>xml.Open "GET", server.mappath("manualsDestination/" & rsManual("manual_source") & "/Test/" & trim(rsTargetChapters("chapterName"))), False<BR>&#039;***<BR><BR>manual_source is a folder name from a database record and chapterName is a file name taken from another database record.<BR><BR> <BR>

  4. #4
    Join Date
    Dec 1969
    Posts
    209

    Default RE: msxml3.dll (0x800C0005) error

    please accept my apologies. i have just spotted the problem, a misplaced variable name in my path.<BR><BR>didnt pick it up in my previous set of test data because "source" and "destination" folders had the same name.<BR>rather embarrassing...<BR><BR>please explain your concern though of using mappath in the first place.<BR><BR>thanks for your time<BR><BR>gelboe


  5. #5
    Join Date
    Dec 1969
    Posts
    16,931

    Default RE: msxml3.dll (0x800C0005) error

    Well, Server.MapPath converts a virtual path to a physical one.<BR><BR>So "/whatever.doc" comes out as "C:siterootwhatever.doc".<BR><BR>But then you&#039;re making a HTTP request for the physical file... Why? If you want to just read the file, why not use the FileSystemObject or whatever. Using XMLHTTP seems completely wrong if you&#039;re working with local files.<BR><BR>Craig.

  6. #6
    Join Date
    Dec 1969
    Posts
    16,931

    Default RE: msxml3.dll (0x800C0005) error

    If all you want to do is copy the files, just use the FileSystemObject to copy them.<BR><BR>I&#039;ve not done any performance testing, but I would be exceptionally surprised if it&#039;s not significantly faster than your way.<BR><BR>Significantly.<BR><BR>Craig.

  7. #7
    Join Date
    Dec 1969
    Posts
    209

    Default RE: msxml3.dll (0x800C0005) error

    fair comment.<BR><BR>i am performing some replace operations on the data at the same time as writing, this is why I am doing it this way.<BR><BR>thanks for you input though

  8. #8
    Join Date
    Dec 1969
    Posts
    16,931

    Default RE: msxml3.dll (0x800C0005) error

    Okay. I still think this is a really strange way of working with this data, but okay.<BR><BR>If I picked this up from another developer, I would say things other than "okay" mind ;-)<BR><BR>Craig.

  9. #9
    Join Date
    Dec 1969
    Posts
    95,999

    Default LOL! Yeah, I'd probably...

    ...trash the entire page, just on the assumption that if the person coded something this way then the rest of it has to be wrong.<BR><BR>"okay" might be the word I&#039;d start with, but things would go downhill from there.<BR><BR>

  10. #10
    Join Date
    Dec 1969
    Posts
    95,999

    Default To be fair about it...

    If there was some need to get the *binary* stream, instead of text, this might be as efficient as using ADODB.Stream.<BR><BR>But of course, if you treat it as binary then you can&#039;t do simple text manipulation of it.<BR><BR>Also to be fair, if you had code that sometimes got source from external sites and sometimes from local files, this might be a way to go.<BR><BR>Except that if you are going to use Server.MapPath, then why not, instead, just use<BR> "http://" & serverName & "/" & file<BR>and now you can just use <BR> serverName = "localhost"<BR>when the file is local.<BR><BR>Ehhh... What the heck, we can find reasons for doing most anything, can&#039;t we?<BR><BR>

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  


More ASP Resources

Resources:
-- ASP Articles
-- ASP.NET Information
-- 4Guys ASP F.A.Q.
-- ASPFAQs.com
-- ASP Coding Tips
-- Related Web Technologies
-- User Tips!!
-- JavaScripts


Development Centers
-- HTML5 Development Center
-- Windows Mobile Development Center
-- Android Development Center
-- Cloud Development Project Center


Development Technology
Check out these sites for more articles, tutorials, FAQs, discussions, and code!
-- CodeGuru.com
-- VBForums.com
-- DevX.com
-- Developer.com
-- HTMLGoodies