Windows 服务可以在 Silverlight 网站上使用吗?

发布于 2025-01-04 19:26:22 字数 207 浏览 1 评论 0原文

好吧,抱歉我的问题很糟糕。我的项目是一个 ASP 站点,用户可以从中收听音乐并将音乐上传到数据库。当用户上传音乐时,Windows 服务必须发送一封电子邮件来告诉用户新音乐。

好吧,我想知道的是我可以使用 Windows 服务发送电子邮件吗?从之前的一些答案中,我发现这可能存在安全风险。我只是想知道我是否可以使用 Windows 服务来实现此目的,或者我应该使用什么来发送电子邮件?

OK sorry for my bad question.well my project is a asp site that a user can listen to music from and upload music to a db.when a user uploads music the windows service must send an email to tell the users of the new music.

Well all that i want to know is can i use a windows service to send the emails? from a few answers earlier,i saw it may be a security risk. i just want to know if i can use a windows service for this or what should i use to send the emails?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

我是男神闪亮亮 2025-01-11 19:26:22

你的问题无论从哪个方向来看都是没有意义的。

首先,不存在 silverlight 网站这样的东西。网站只是 HTML,托管在 IIS(或 Apache 等替代方案)上,而 silverlight 是一种客户端技术。仅仅因为您将 silverlight 加载到页面中并不会使其成为 silverlight 网站。

Windows 服务与任何其他程序一样,如果被设计为可以访问网络。你认为 IIS 是什么?这只是一项服务

所以我猜网站不会自动安装它?

这里的基本误解是“网站”是什么。当然,网站不会自动破坏安全性并在通常安全的服务器上安装软件,尽管它可能会尝试配置错误的服务器(毕竟,以管理员身份运行正确的配置,它可以在本地对它想要的服务器进行任何调用)。

基本上,当您需要在服务器上安装软件时,请安装它。 Windows 服务只不过是一个程序,它可以像 ISS、Exchange 或您可以想象的任何其他服务器软件。

似乎有一些关于现代操作系统如何运行、IIS 等如何在全球本地化级别上运行的初学者书籍?

Your question makes no sense from whatever direction.

First, there is no such thing as a silverlight website. A website is just HTML and is hosted on IIS (or an alternative like Apache) and silverlight is a client side technology. Just because you load silverlight into a page does not make it a silverlight website.

A windows service is like any other program and can access the network if it is designed to do so. What do you think IIS is? It's just a service

so im guessing a website wouldnt install it automatically?

Basic misunderstanding here what "a website" is. Sure a website will not automatically break security and install software on a normally secured server, although it may try on a badly configured one (after all, with proper configuration running as admin it can make any call locally into the server it wants).

Basically, when you want software on the server, install it. A windows service is nothing more than a program, it can be like ISS, exchange, or any other server software you can imagine.

Seems some beginner books into how modern operating systems operate, how IIS and all are operating on a glocal level are in order?

可遇━不可求 2025-01-11 19:26:22

网络托管公司通常不允许您在其服务器上安装 Windows 服务。 Windows 服务需要始终运行并永久安装在计算机上,这与托管 IIS Web 应用程序有很大不同,托管 IIS Web 应用程序可以链接到自己的应用程序池,但仍由 IIS 处理,并允许托管公司拥有其中的许多应用程序在同一个虚拟或真实服务器中。

托管应用程序(在您的情况下为 SL)可以与 Windows 服务进行通信,无论该服务通过 WCF 安装在何处,例如,只要 SL 应用程序知道运行该服务的 IP 地址或计算机名称。

there is usually no way a web hosting company would allow you to install a windows service on their servers. A windows service requires to be always running and is installed on the machine permanently, very different approach than an hosted IIS web application which could be linked to its own application pool but is still handled by IIS and allows the hosting company to have many of them in the same virtual or real server.

an hosted application (SL in your case) can communicate with a windows service regardless where the service is installed via WCF, for example, as long as the IP address or machine name where the service runs is known to the SL application.

十年九夏 2025-01-11 19:26:22

Windows 服务可以在网站的服务器端使用,但您必须有某种接口。 Silverlight 在客户端运行,因此如果您需要与 Windows 服务通信,则必须自己实现该通信。 Windows 服务不太可能从服务器外部直接访问(这通常存在安全风险,除非该服务专门设计用于远程访问)。如果它没有远程访问接口,则您必须放置某种可以由 Silverlight 代码调用的前端,并将调用转发到服务。

A Windows service can be used on the server side from the website but you'll have to have some kind of interface to it. Silverlight is running on the client side so if you need to communicate with a Windows service, you'll have to implement that communication yourself. It's not likely that a Windows service would be directly accessible from outside the server (usually that's a security risk, unless the service is specifically designed to be accessed remotely). If it doesn't have a remote access interface, you'll have to put some kind of front-end in place that can be called by your Silverlight code and that will forward calls to the service.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文