Advertisement

VB.NET Upload problem

Started by September 11, 2005 10:02 PM
0 comments, last by hplus0603 19 years, 5 months ago
Well, since I'm a beginner in this particular subject, and it is about a problem specifically with VB.NET, I wasn't sure if it should go in those forums, but since networking is really the main subject, I decided to go here. I'm creating a little program for a currently undisclosed purpose. It probably will be used once on one machine. It's basic premise is it asks "questions" to the user. The answers then need to be reported back and quickly viewed by another person, either as a file added to the site that can be viewed, or put on a separate page. I've determined that the client program needs to be a regular windows app that is downloaded. The free webspace I have prohibits uploading of .exe files, by the way, allowing only compressed versions for downloading. So I need a way to communicate from my client program to my web space what the answers are. I am programming in VB.NET. I am now trying to prototype uploading a file. I am currently using the localhost as an upload location and a semi-random document to upload. It tells me that access is denied to the path. I've tried fiddling with permissions, but maybe I'm missing something. I'm also probably missing something else somewhere too. If anybody has any solutions for this specific problem, or any other ideas as to how to do this in general, I'd appreciate it.

Dim Send As New Net.WebClient()
Send.Credentials = System.Net.CredentialCache.DefaultCredentials
Send.UploadFile("File:C:\Inetpub\wwwroot", "POST", "E:\Files\Documents\Shieldmaiden202.doc")

-----------------------------If pi is used to find the dimensions of a pie,Is cak used to find the dimensions of a cake?
I suggest asking in the web development forum.

What I would do, given your requirements, is something like:

1) build the query application as a managed assembly
2) use the deployment wizard to generate a .msi module
3) put the .msi module on the web space
4) build the answer application using PHP, or some other such web scripting interface (ASP.NET lets you use Visual Basic, if your host supports it)
5) put the answer into a database once the application has posted it to the site
6) build another web page which shows a report of what's in the database
enum Bool { True, False, FileNotFound };

This topic is closed to new replies.

Advertisement