单击一次应用程序连接到远程服务器
Click once application to connect to remote server
我在 ServerFault 上添加了这个问题,但没有人回答。
我有一个 .net 应用程序,它调用部署在 IIS 上的本地 windows 服务器 2012 上的 Web 服务,并且 sql 服务器数据库也驻留在该服务器上。所有员工都连接到相同的服务和数据库,因为我们都在同一个域中,我通过 visual studio (2012).
将应用程序和网络服务发布到服务器
现在我需要让员工在公司网络之外访问这个应用程序,所以我在我们的一台远程 windows 2012 服务器上的 IIS 上部署了 Web 服务,我创建了一个 public在我的远程服务器中共享文件夹并添加到应用程序 webservice 文件到它,在 visual studio 我将发布方法更改为 web 部署并填写如下信息:
Server: https://x.x.x.x/
Site Name: https://x.x.x.x/PublicFolder
Destication URL: https://x.x.x.x/PublicFolder/Application
当我单击“验证连接”时,它失败并显示以下消息:
Could not connect to the remote computer ("x.x.x.x"). on the remote
computer make sure that Web Deploy is installed and that the required
process ("Web Management Service") is started. Learn more at:
http://go.microsoft.com/fwlink/?LinkId=221672#ERROR_DESTINATION_NOT_REACHABLE.
Unable to connect to the remote server
请注意,我尝试将 https 替换为 http,但出现了另一个错误:
Could not connect to the remote computer ("x.x.x.x"). on the remote
computer make sure that Web Deploy is installed and that the required
process ("Web Management Service") is started. Learn more at:
http://go.microsoft.com/fwlink/?LinkId=221672#ERROR_USER_NOT_ADMIN.
the remote server returned an error: (401)Unauthorized
我去了上一个 link 并按照他们的建议做了:
- 在远程计算机上创建一个单独的用户组 MSDepSvcUsers。
- 在本地和远程计算机上创建一个本地帐户 A。
- 将 A 添加到远程计算机上的 MSDepSvcUsers。
- 使用账号A发布,这样就可以不用发布了
需要使用内置管理员帐户。
但仍然存在相同的错误 (NOT_ADMIN)
更新:我找到了另一种可能的解决方案:
Add/modify windows registery key
“HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System\”
and set it “1”.
我添加这个注册表项后,错误变成:
site 'http:' does not exist ... #ERROR_SITE_DOES_NOT_EXIST
所以现在如果我输入错误的凭据,我会得到未经授权的错误,如果我使用正确的凭据,我会得到 side does not exist 错误。
我该怎么办?
成功了!!
我的意思是连接,现在已经过验证,我所要做的就是将站点名称从 "http://x.x.x.x/PublicFolder" 更改为 "Default Web Site\SiteName" !!
真是一头雾水,终于明白了!
我在 ServerFault 上添加了这个问题,但没有人回答。 我有一个 .net 应用程序,它调用部署在 IIS 上的本地 windows 服务器 2012 上的 Web 服务,并且 sql 服务器数据库也驻留在该服务器上。所有员工都连接到相同的服务和数据库,因为我们都在同一个域中,我通过 visual studio (2012).
将应用程序和网络服务发布到服务器现在我需要让员工在公司网络之外访问这个应用程序,所以我在我们的一台远程 windows 2012 服务器上的 IIS 上部署了 Web 服务,我创建了一个 public在我的远程服务器中共享文件夹并添加到应用程序 webservice 文件到它,在 visual studio 我将发布方法更改为 web 部署并填写如下信息:
Server: https://x.x.x.x/
Site Name: https://x.x.x.x/PublicFolder
Destication URL: https://x.x.x.x/PublicFolder/Application
当我单击“验证连接”时,它失败并显示以下消息:
Could not connect to the remote computer ("x.x.x.x"). on the remote computer make sure that Web Deploy is installed and that the required process ("Web Management Service") is started. Learn more at: http://go.microsoft.com/fwlink/?LinkId=221672#ERROR_DESTINATION_NOT_REACHABLE. Unable to connect to the remote server
请注意,我尝试将 https 替换为 http,但出现了另一个错误:
Could not connect to the remote computer ("x.x.x.x"). on the remote computer make sure that Web Deploy is installed and that the required process ("Web Management Service") is started. Learn more at: http://go.microsoft.com/fwlink/?LinkId=221672#ERROR_USER_NOT_ADMIN. the remote server returned an error: (401)Unauthorized
我去了上一个 link 并按照他们的建议做了:
- 在远程计算机上创建一个单独的用户组 MSDepSvcUsers。
- 在本地和远程计算机上创建一个本地帐户 A。
- 将 A 添加到远程计算机上的 MSDepSvcUsers。
- 使用账号A发布,这样就可以不用发布了 需要使用内置管理员帐户。
但仍然存在相同的错误 (NOT_ADMIN)
更新:我找到了另一种可能的解决方案:
Add/modify windows registery key “HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System\” and set it “1”.
我添加这个注册表项后,错误变成:
site 'http:' does not exist ... #ERROR_SITE_DOES_NOT_EXIST
所以现在如果我输入错误的凭据,我会得到未经授权的错误,如果我使用正确的凭据,我会得到 side does not exist 错误。
我该怎么办?
成功了!!
我的意思是连接,现在已经过验证,我所要做的就是将站点名称从 "http://x.x.x.x/PublicFolder" 更改为 "Default Web Site\SiteName" !!
真是一头雾水,终于明白了!