Write XML file to the net....

adude

Member
Joined
Aug 19, 2003
Messages
22
Just to clarify: Im new to VB.NET, the whole ".NET thing, and have no experience with server-side scripting...

I succcessfully wrote & read an XML file on my hard drive :D, however, I was wondering, if I wanted to write it to a server, would I need to know how to use ASP.NET? (Im writing this in the XML forum because I dont know if this requires ASP.NET) If not, whats the script & what does the host have to support (or would any regular host - kinda like Tripod work)?

If yes, if I get a host (like www.brinkster.com), that says it supports ASP.NET, do I still have to install IIS or PWS on my computer - since I suspect, although I could be wrong, that those are for people who use their computer to act as a server - right :confused: ? (If yes [I have to use ASP.NET], I guess Ill have to get some ASP.NET w/ VB.NET Book, or is it simple enough code to just get from some tutorial?)

Thanks. I appreciate any help. I know i have a lot of :confused: .
 
I succcessfully wrote & read an XML file on my hard drive ,
however, I was wondering, if I wanted to write it to a server,
would I need to know how to use ASP.NET?

If I understand your question correctly, no, you should not need
ASP.NET to put an XML file on the web. You could just create the
document on the local computer and upload it to the server via
FTP. Does that fit your situation?

And, if you were to develop ASP.NET applications, then yes, youd
need PWS or IIS installed on your local machine to debug them.
 
What I meant was to do this dynamically... so that a user can, for example, post a high score in a game that other people on the internet can see... So it doesnt necessarily have to be an XML File, it could just be a .txt... Its just that XML is easier to work with:)

[Edit:] I just ran accross the WebClient() in VB.NET. I successfully downloaded an xml and parsed from a test account I made with Lycos.Co.Uk... I noticed that theres an "UploadFile" command... I tried using this to upload a file, but I get a 405 error:


An unhandled exception of type System.Net.WebException occurred in system.dll

Additional information: The remote server returned an error: (405) Method Not Allowed.



Heres the code:

[Vb]
Dim theurl As String = "http://members.lycos.co.uk/quickchat/chat.txt"

Dim wc As New System.Net.WebClient

wc.BaseAddress = "http://members.lycos.co.uk/quickchat/"

Dim responseArray As Byte() = wc.UploadFile(theurl, "POST", "D:/chat.txt")
[/code]

I also tried the same code w/ a different account (at www.brinkster.com) that says it supports ASP in case that was the problem)............

Anyway, this could be something completely different that I really dont need or cant use :-\ .... Again, thanx for any help....
 
Last edited by a moderator:
UploadFile() is only meant for when a form is being posted, and
it requires a file from the local machine to be uploaded to the
server (the Browse for file input tag), or any other time the server
is expecting a file transfer over HTTP.

File transferring is usually done over the FTP protocol. Unless you
want to learn the FTP protocol and write some code to handle it
with Sockets (and dont let me stop you!), this looks like a nice
component that wraps it all up for you.
 
I guess that [uploadfile] is not what I need.... because I simply wanted to store data on the net somehow (to store "high scores" or to create a guestbook/forum program for example)... I doubt that something as simple as that would need an external program/plugin :)

[Edit:] I found out how to do this through ASP.NET... I would delete the thread, but I get a message that I cant edit a thread 1440 minutes after I post it. Anyway, if anyone knows how to do this directly in VB.NET, I guess that would be easier, so Ill still appreciate any help :D
 
Back
Top