简体   繁体   English

在IIS中用ASP.NET core mvc下载发布文件并复制到客户端内部服务器上

[英]Download publication files and copy on the client's internal server with ASP.NET core mvc in IIS

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 Inte.net and replace the current publication on the client's internal server.我想向其中添加一个页面,而不是在客户端的计算机上手动发布它,也就是说,放置一个更新按钮并从 Inte.net 下载发布文件并替换客户端内部服务器上的当前发布。

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.问题是使用了以前的发布,Windows 不允许删除以替换以前发布的新发布。

This is to reduce the cost of support and labor.这是为了降低支持和劳动力成本。

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.好吧,除非你将这段代码添加到他们的 web 服务器来进行下载,否则你不能只从 web 下载文件到我的电脑,然后将它们放在我的电脑或我的电脑上的任何地方。网络.

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.然后,当你来到我的 web 站点查看一些可爱的猫图片时,我将在你的计算机上四处乱逛,抓取一个名为我的银行业务的文件,或者从 outlook 抓取你的电子邮件,或者抓取一个名为我的密码的文件。

In other words, if you could do as you ask, then no one would EVER trust and use the inte.net again!!!换句话说,如果你能按照你的要求去做,那么没有人会再次信任和使用 inte.net!

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?我的意思是,如果我通过 iPad 或智能手机使用您的 web 网站,路径名和文件夹名是什么?

so, a web browser is "sand boxed", and VERY restricted.因此,web 浏览器是“沙盒”,并且非常受限制。 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 inte.net.例如,您不能设置 select 或设置用于上传的文件名(因为如前所述,当您在我的 web 站点上查看可爱的图片时,如果我的 web 站点可以开始弄乱您计算机上的文件,那么该功能将加速互联网安全的终结。

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.因此,您当然可以“提供”文件以在 web 浏览器中下载,但在几乎所有情况下,用户都可以控制该文件的位置。

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.现在,你可以在他们的 web 服务器上设置并运行一个进程或程序,它可以说每小时检查你的 web 站点上的文件以供下载,然后它可以下载文件,然后将它们放在该工作 web 站点的正确文件夹。

But, any old user just hitting the web site?但是,有没有老用户刚刚访问过 web 网站? 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?如果你来到我的 web 站点,你真的希望我的站点然后弄乱你计算机上的文件系统,并将你决定访问我的 web 站点的各种内容、文件、程序和任何东西放在你的计算机上吗?

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 inte.net would not agree with granting you that ability!!现在,您可能想要这种能力而不关心安全性,但是世界上的 rest 和使用 inte.net 的人不会同意授予您这种能力!!

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.安装该程序后,它当然可以从您的 web 站点提取内容,然后将这些内容放置在运行在同一内部网络上的 web 服务器上。

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.这样的程序可以从您的 web 站点下载内容,然后将其放置在其内部 web 服务器上的正确文件夹中。

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.我想你也可以让他们每次下载一些内容和一些程序(可能在 zip 文件中),并且在他们下载之后,他们必须再次运行该文件/程序。

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 inte.net again.然而,仅仅下载文件并将这些文件放入该公司计算机上的任何位置的能力是根本不可能的,如果 web 浏览器具有这种能力,那么就没有人会再次使用和信任 inte.net .

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?为什么不将该软件放在他们的 web 服务器上,该服务器每小时运行一次并检查您 web 站点上的内容,然后自动下载呢?

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.这样,没有用户必须 go 到 web 站点来下载内容,您在 web 服务器上有一些每小时运行一次的软件来检查和下载此类内容。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 将文件从远程服务器流式传输到asp.net MVC客户端 - Streaming files from a remote server to a asp.net mvc client 在 API ASP.Net Core 中下载文件 - Download files in API ASP.Net Core 无法从IIS(内部服务器500)使用Visual Studio 2015运行简单ASP.NET MVC应用程序 - Cannot run Simple ASP.NET MVC Application with Visual Studio 2015 from IIS (Internal Server 500) IIS 7.5中的ASP.NET Core WebAPI 500内部错误 - ASP.NET Core WebAPI 500 Internal error in IIS 7.5 在IIS上使用.NET Core运行ASP.NET 5(MVC 6) - Run ASP.NET 5 (MVC 6) using .NET Core on IIS ASP.NET IIS 应用程序 500 内部服务器错误 - ASP.NET IIS Application 500 Internal Server Error ASP.NET:连接字符串不起作用IIS-内部服务器错误 - ASP.NET : Connection String not working IIS - Internal Server Error ASP.NET IIS Web.config [内部服务器错误] - ASP.NET IIS Web.config [Internal Server Error] 在localhost以外的IIS下运行ASP.NET CORE(MVC 6) - Running ASP.NET CORE (MVC 6) under IIS other then localhost IIS 7.5,ASP.NET MVC。 HTTP错误500(内部服务器错误):服务器尝试实现时遇到意外情况 - IIS 7.5, ASP.NET MVC. HTTP Error 500 (Internal Server Error): An unexpected condition was encountered while the server was attempting to fulfil
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM