简体   繁体   English

将应用程序发布到远程Windows服务器时出错

[英]error when publishing application to a remote windows server

I need to publish an application built by C# on VS 2010 (.NET 4.0) to a Windows server 2008 R2. 我需要将C#在VS 2010(.NET 4.0)上构建的应用程序发布到Windows Server 2008 R2。

I just followed the instructions ("publish to a file share or path") here: 我只是按照以下说明进行操作(“发布到文件共享或路径”):

https://msdn.microsoft.com/en-us/library/31kztyey.aspx https://msdn.microsoft.com/en-us/library/31kztyey.aspx

But I receive an error: 但是我收到一个错误:

Error 158 :  VS 2010 publish application Failed to connect to "\\myServer\e$\myPath\" with the following error: 

Unable to create the Web site "\\myServer\e$\myPath\"

The path does not exist or you do not have access. The specified path is invalid. 

I can log in remotely to the "myServer". 我可以远程登录“ myServer”。 So why do I have an access problem here ? 那么,为什么我这里有访问问题?

Here "e$" is E drive on the server. 这里的“ e $”是服务器上的E驱动器。

When you access the path on another server using the administrative share (ie e$ ), you need to have the correct level of permissions or it will not work. 当您使用管理共享(即e$ )访问另一台服务器上的路径时,您需要具有正确的权限级别,否则它将不起作用。 This is shown by browsing to that location in Windows Explorer - it pops up a login prompt. 通过在Windows资源管理器中浏览到该位置可以显示该内容-它会弹出一个登录提示。 After you enter your details, your session now caches those credentials and the publishing wizard will also work. 输入详细信息之后,您的会话现在将缓存这些凭据,并且发布向导也将起作用。

Users shouldn't be accessing that application using the share path you use. 用户不应使用您使用的共享路径来访问该应用程序。 Instead, the web server on that box (IIS I would assume) should have it's own binding set up. 取而代之的是,该服务器上的Web服务器(我会假设是IIS)应该具有自己的绑定设置。 For example, you may be able to give your users an address something like this: 例如,您可以为用户提供类似以下的地址:

http://myServer/

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

相关问题 发布到远程服务器时无法解析图像 - Unable to resolve images when publishing to remote server 发布Windows窗体应用程序-引用错误 - publishing a windows form application - error with the references ASP.NET 应用程序在发布到 windows 服务器 2008 机器时使用了错误的文件路径 - ASP.NET application using the wrong file path when publishing to a windows server 2008 machine 发布.NET c#应用程序时出错 - Error when publishing .NET c# application 将Wcf服务发布到远程服务器后,缓冲区大小错误 - Buffer Size Error after publishing Wcf Service to a Remote Server HTTP 错误 500.0 - 发布 Blazor 服务器端应用程序时 ANCM 进程内处理程序加载失败 - HTTP Error 500.0 - ANCM In-Process Handler Load Failure when publishing a Blazor server-side application Windows窗体应用程序在客户端PC上发布错误 - Windows forms application publishing error on client's PC 从Windows服务将数据发布到Web应用程序时出错。“远程服务器返回错误:(500)内部服务器错误。” - Error While posting Data to a web application from a windows service.“The remote server returned an error: (500) Internal Server Error.” Windows窗体应用程序与数据库发布 - Windows forms application with database publishing 发布应用程序时出现SQLite.Interop.dll错误 - SQLite.Interop.dll error when publishing application
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM