Home > Net >  Using WebClient to upload files to the server will quote: the remote server returns an error: (404)
Using WebClient to upload files to the server will quote: the remote server returns an error: (404)

Time:10-02

Using WebClient upload file will be submitted to the 404 error,



Destpath server location to upload files here

Destpath="http://192.168.0.106:8090/ProvienceFiles/new1_114.pdf";

Sourcepath is the path of the local file to upload the file

Sourcepath="F: \ \ ZFAPI \ ZFAPI \ local deployment version Files \ new1_114 PDF";

I searched the first solution is the server folder with everyone, but not after added



The second is to change the post to put, submitted to the 405 error



And then search to and put in the handler mapping, but the result is no use



The third is to expand the web server in the WebDAV to allow

Is not on my iis web server extensions, but in the ISAPI and CGI limitation WebDAV, that was set up to allow



The fourth is the path of the destpath don't add in the file name, only the folder path to write to 405 error



How to write?

CodePudding user response:

The client is a initialize the client who to you?

CodePudding user response:

reference 1/f, wearing a treble response:
client is an initialization of the client who to you?

Use UploadFile, don't write so? How to write it?

CodePudding user response:

refer to the second floor bug making machine response: 1
Quote: reference 1/f, wearing a treble response:

The client is a initialize the client who to you?

Use UploadFile, don't write so? How to write it?

Sorry at first didn't watch carefully thought is achieved by webapi upload
Check the server path if the file exists

CodePudding user response:

refer to the second floor bug making machine response: 1
Quote: reference 1/f, wearing a treble response:

The client is a initialize the client who to you?

Use UploadFile, don't write so? How to write it?

Remember correctly you need to use the login window

CodePudding user response:

reference 3 floor wearing a treble response:
Quote: refer to the second floor bug making machine response: 1
Quote: reference 1/f, wearing a treble response:

The client is a initialize the client who to you?

Use UploadFile, don't write so? How to write it?

Sorry at first didn't watch carefully thought is achieved by webapi upload
To see if there are any the file server path

I want to upload the local file to a server, the server is under ProvienceFiles this folder

CodePudding user response:

Your idea is wrong?

You have uploaded to the server locally.. Using HTTP.

At the very least, you have to have a "upload interface".

Such as the aspx ashx or MVC webapi will do.. It receives the file then save..

You this the documents directly to the "upload" to something fixed. The. It won't work ah.. What do you think this is the file copy?

CodePudding user response:

refer to 6th floor by_ love reply:
your idea is wrong?

You have uploaded to the server locally.. Using HTTP.

At the very least, you have to have a "upload interface".

Such as the aspx ashx or MVC webapi will do.. It receives the file then save..

You this the documents directly to the "upload" to something fixed. The. It won't work ah.. What do you think this is the file copy?

Is ok, but I didn't configured iis corresponding privileges, don't know how to configure all the time, so just post, just looking for a post, teach iis permission configuration solved
  •  Tags:  
  • C#
  • Related