在 FinalBuilder 中,如何将 HTTP 获取文件操作与 Windows 身份验证结合使用?

发布于 2024-07-06 06:23:40 字数 783 浏览 14 评论 0原文

我有一个 FinalBuilder 项目,在其中将 ASP.Net 网站部署到远程文件夹,并在 IIS 中配置为网站。 作为构建脚本的一部分,我想使用 FinalBuilder 操作 HTTP Get File 来帮助确定我的部署是否成功。

我遇到了困难,因为网站被配置为(在 IIS 6 下)使用集成 Windows 身份验证,并且未启用匿名访问。

现在,HTTP 获取文件操作只有少数属性,其中之一是安全部分,包含用户名和密码。 我想太棒了! 我可以在其中放入一些有效的凭据,FinalBuilder 将在检索我的文件时模拟这些凭据。 事实证明我错了。 我收到以下错误:

检索 url 时出错:套接字错误 #10061 连接被拒绝。

如果我在没有设置安全用户名和密码的情况下运行该操作,则会收到以下错误:

检索网址时出错:HTTP/1.1 401 未经授权的响应代码:401

以下是一些有助于解决我的问题的事实。 我在 Windows Server 2003 安装上运行 FinalBuilder 6 Professional,并将我的 ASP.Net 网站部署到公司 LAN 内的远程 IIS6 服务器。 如果我在远程服务器上配置 IIS 以允许匿名访问,我可以运行 HTTP 获取文件操作而不会出现错误。 然而,在我们的情况下,以匿名访问方式运行该特定站点是不可接受的。

任何人都可以帮忙提出解决方法吗?

I have a FinalBuilder project where I deploy an ASP.Net website to a remote folder, configured as a website in IIS.
As part of my build script, I want to use the FinalBuilder action HTTP Get File to help determine whether my deployment was succesful.

I'm having difficulty, because the website is configured (under IIS 6) to use Integrated Windows Authentication, and anonymous access is not enabled.

Now the HTTP Get File action, has only a handful of properties, one of which is a security section, containing a UserName and Password. Great I thought! I can just put some valid credentials in there, which FinalBuilder will impersonate, whilst retrieving my file.
It turns out I was mistaken. I receive the following error:

Error retrieving url : Socket Error # 10061
Connection refused.

If I run the action without setting the Security Username and Password, I get the following error:

Error retrieving url : HTTP/1.1 401 Unauthorized Response Code : 401

Here are some facts to help with the context of my problem.
I'm running FinalBuilder 6 Professional, upon a Windows Server 2003 installation, and deploying my ASP.Net website to a remote IIS6 server within our corporate LAN.
If I configure IIS on the remote server to allow Anonymous access, I can run the HTTP Get File action without error. However, running this particular site with anon access is not acceptable in our situation.

Can anyone help suggest a workaround?

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

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

发布评论

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

评论(1

放手` 2024-07-13 06:23:40

对于明确的答案,我认为 Finalbuilder 论坛 可能是你最好的选择。

不过,我的猜测是,FB 使用的 HTTP 库不支持 Windows 身份验证,并且由于无法协商通用身份验证方法而失败。 由于“HTTP 获取文件操作”也不支持 HTTPS,因此在站点上允许基本身份验证的可能解决方法不是一个好主意,因为您将通过网络以纯文本形式传递凭据。

我能想到的唯一剩下的解决方法(除了等待未来的 FB 版本之外)是创建您自己的 FB 操作来检索文件。 使用 .NET Framework System.Net.WebClient ,这应该是微不足道的。 只需从独立的 EXE 开始,以确保一切正常,然后使用 FinalBuilder Action Studio 将其重构为“真实”操作(如果甚至需要:生成外部 EXE 可能在您的情况下工作得很好)。

For a definitive answer, I think the Finalbuilder Forum is probably your best bet.

My guess, though, is that the HTTP library used by FB doesn't support Windows authentication, and is failing because no common authentication method can be negotiated. Since HTTPS isn't supported either by the 'HTTP Get File action', the possible workaround of allowing basic authentication on your site isn't a good idea, as you would be passing credentials over the network in plain text.

The only remaining workaround I can think of (other than waiting for a future FB release), is creating your own FB action to retrieve the file. Using the .NET Framework System.Net.WebClient, that should be trivial. Just start with a standalone EXE to make sure everything works, then refactor it into a 'real' action using FinalBuilder Action Studio (if that's even required: spawning an external EXE may work just fine in your case).

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