Home > Net >  Download publication files and copy on the client's internal server with ASP.NET core mvc in II
Download publication files and copy on the client's internal server with ASP.NET core mvc in II

Time:11-14

There is a site on the client's internal server. I want to add a page to it without publishing it manually on the client's computer, that is, put an update button and download the publication files from the Internet and replace the current publication on the client's internal server.

Like updating the program on the desktop, is this possible or not?

The problem is that the previous publication is used and Windows does not allow deletion to replace the new publication on the previous publication.

This is to reduce the cost of support and labor.

CodePudding user response:

Well, unless you add this code to their web server to do the download, then no, you can't just download file(s) to MY computer from the web, and THEN place them anywhere on my computer, or my computer network.

If you could mess around with my computer from just a browser?

Then while you come to my web site to view some cute cat pictures, then I am going to mess around on YOUR computer, grab a file called my banking, or grab your emails from outlook, or grab a file called my passwords.

In other words, if you could do as you ask, then no one would EVER trust and use the internet again!!!

So, YOU are NOT allowed to mess around with my computer. Hands off - leave my computer alone!!!

When you download a file from a browser, then the USER has to choose where the file will be saved (useally my-downloads).

Now, you can supply a default file location, but it will depend on the browser, and in most cases all you can do is provide a file name, and not a path folder name.

I mean, what is the path names and folder names if I am using your web site with a iPad or smartphone?

so, a web browser is "sand boxed", and VERY restricted. You can't for example select or set a file name used for up-loading (since as noted, while you view cute pictures on my web site, if my web site can start messing around with files on YOUR computer, then that ability would speed the end of secuirty on the internet.

So, you can certainly "offer" files to download in a web browser, but the user will be in control of the location of that file in near all cases.

Now, you could have a process or program you setup and run on their web server, and it could say every hour check for files on your web site for download, it could then download the file(s), and then place them in the correct folders for that working web site.

But, any old user just hitting the web site? You don't really have control over the file location and being able to place code and content on my computer. (hey, why not come to my site to view cat pictures, and while you doing that, I can install remote desktop or any software that would allow me to control YOUR computer!!!!).

If you come to my web site, do you REALLY want my site to then mess around with the file system on your computer, and place all kinds of content, files, programs and whatever on YOUR computer from you deciding to visit my web site?

I don't think so!!!!

Now, it is possible you want this kind of ability and don't care about security, but the rest of the world and people who use the internet would not agree with granting you that ability!!

now, you could certainly provide them with a desktop program that they install on their workstations.

Once that program is installed, then it could certainly pull content from your web site, and then place such content on their web server running on that same internal network.

So, you have to create install have a program you develop for those in that company. Such a program could then download the content from YOUR web site, and then place it on their internal web server into the correct folders.

I suppose you could also have them each time download some content and some program (maybe in a zip file), and again after they download, they would have to run that file/program.

However, the ability to JUST download files and place such files into any location on their computer(s) at that company is simply not possible, and if web browsers had this ability, then no one would ever use and trust the internet again.

And if you going to all that trouble to build some program they could download and run? Why not place that software on their web server that runs every hour and checks for content on your web site, and downloads it automatically anyway?

That way, no users would have to go to the web site to download content, you have some software on the web server that runs every hour to check and download such content.

  • Related