Glenn,
Why can't you save the back to the web server? Do you mean it is
physically impossible; or you don't want to make security permission changes
to the virtual directory/file that needs to be updated? If you give write
access to the account the script runs against you shouldn't have a problem
modifying the script as long as you aren't trying to delete the file and
create a new one each time. You can use a web service as you suggested,
but, you will still have to account for security permissions which would
essentially do the same as modifying the DACL on the file itself. Is you
web server available to the public, or an Intranet server? Does your site
run under the IUSER account, Basic, or Windows auth? Can \\server1 access
\\server2 vice versa ? I have written web applications that will write xml
files to a different physical location, the only obstacle I have come across
is physical file security.
I would first try to modify the permissions on
\\server2\wwwroot$\your_virtual_directory\xmlfile. xml, make sure the user
account running the script can write to it. Modify your script to make the
necessary changes in the xml file via the XMLDOM object and you should be
good to go. If you want to replace \\server2\myxml.xml with the newly
generated copy from \\server1 then you will need to grant modify permissions
to the virtual directory where the file is stored and modify your script to
include:
set FSO = CreateObject("Scripting.FileSystemObject")
Set MyXMLFile = FSO.GetFile("C:\MyXML.xml")
MyXMLFile.Copy ("\\Server2\wwwroot$\your_virtual_directory\MyXML. xml", True)
'True = Overwrite
Post your results, or any other details.
Jared
"Glenn Mantle" <glenn.mantle@bt.com> wrote in message
news:Oe8QjyabEHA.716@TK2MSFTNGP11.phx.gbl...[color=blue]
> Thanks for that.
>
> I have another question , i have a vbscript on server1 that parses an
> xml file from my web server sever2 (http:\\server2\myxml.xml)
>
> The vbscript collects information from the server and amends the xml dom
> object when a new record needs to be added or old one removed.
>
> Now i want want to persist that xml back to the web server , and as we
> know i can't save back directly. Any idea how i can work around this.
>
> I was thinking of setting up a web sevice on the server or maybe feeding
> the xml stream stream into an ASP.net page that would save it to the xml
> file.
>
> (alas the vbscript must reside on server1 and the xml file on sever2 )
>
> any starting points to look at would be really useful.
>
> glenn
>
> *** Sent via Developersdex
http://www.developersdex.com ***
> Don't just participate in USENET...get rewarded for it![/color]