[英]Novell Netware 6 and C#
I don't know if anyone has any expertise with Novell Netware or not, but I situation where one of my clients is getting a weird error trying to move a file to a netware share. 我不知道是否有人对Novell Netware有任何专业知识,但是我发现我的一个客户在尝试将文件移至Netware共享时遇到了一个奇怪的错误。 The situation is pretty complicated but I'll try and outline it as best I can. 情况非常复杂,但我会尽力概述一下。
1) The application is running as a service 2) The file to be moved is a local file in an accessible location (to the service) 3) The file is being moved with FileInfo.MoveTo(). 1)应用程序作为服务运行2)要移动的文件是可访问位置的本地文件(对服务而言)3)使用FileInfo.MoveTo()移动文件。 4) The MoveTo is throwing an IOException and the message is "a device attached to the system is not functioning". 4)MoveTo引发IOException,并且消息为“连接到系统的设备不起作用”。
I'm at a loss as to explain what might be happening. 我不知所措,无法解释可能发生的情况。 On a side note, it seems that running a small test program interactively using the same method (FileInfo.MoveTo) to the same location works fine so it seems to be associated with the service itself. 附带说明一下,似乎可以使用相同的方法(FileInfo.MoveTo)在相同的位置交互运行一个小的测试程序,效果很好,因此它似乎与服务本身相关联。
Any help would be hugely greatful. 任何帮助将是巨大的。 Thanks. 谢谢。
Kristofor Wilson 克里斯托弗·威尔逊
That's normal. 那很正常 Windows services need to login to the server separately, like local users do. Windows服务需要像本地用户一样分别登录到服务器。 When you run your program interactively, it accesses the NetWare server using your, already established, connection. 交互式运行程序时,它将使用您已经建立的连接访问NetWare服务器。 To access the server from the service, your program needs to establish its own connection first. 要从服务访问服务器,您的程序需要首先建立自己的连接。
I am afraid I don't know how to login to NetWare from a C# program, and I am not sure if it is possible to set up your service that it does not need to log in to NetWare. 恐怕我不知道如何从C#程序登录到NetWare,并且不确定是否可以设置不需要登录NetWare的服务。 I'd explore one of these ways though. 我会探索其中一种方式。
Oh, almost forgot. 哦,差点忘了。 If a local user has NetWare volumes mapped to disk drive letters in Windows, like SYS: volume to P: and so on, these mapping will not be visible to the service; 如果本地用户将NetWare卷映射到Windows中的磁盘驱动器号,例如SYS:卷映射到P:等,则这些映射对服务将不可见;否则,服务将不可见。 it will have to map the volumes to letters separately, or use UNC paths 它必须将卷分别映射到字母,或使用UNC路径
The later (Last versions) of Netware where able to emulate a windows server whilst still functioning as a Netware server. Netware的更高版本(最新版本),它可以模拟Windows服务器,同时仍可充当Netware服务器。 No big deal to set this up so might be an option for you,. 设置它没什么大不了的,因此您可以选择。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.