访问映射的网络驱动器时出现问题

时间:2023-01-26 21:57:08

We have a problem in accessing content on a mapped network drive.

我们在访问映射的网络驱动器上的内容时遇到问题。

We have a web application running on weblogic 8.1 on (Windows 2000 NT).

我们在weblogic 8.1(Windows 2000 NT)上运行了一个Web应用程序。

The application retreives images from a mapped network drive and displays.

应用程序从映射的网络驱动器中检索图像并显示。

Now we are moving our application onto a virtual machine (Windows 2003 SP1) hosted on Weblogic 10.3.

现在我们将应用程序移动到Weblogic 10.3上托管的虚拟机(Windows 2003 SP1)上。

But on this new set up even though the network drive is mapped and available on the machine, the application can't access it.

但即使网络驱动器已映射并在计算机上可用,在此新设置上,应用程序也无法访问它。

Are there any specific settings for mapping network drives on virtual machines?

在虚拟机上映射网络驱动器是否有任何特定设置?

Any help? Really struck with this.

有帮助吗?真的很震惊。

Thanks in advance.

提前致谢。

Jani.

3 个解决方案

#1


Suggest you start troubleshooting by making sure that the web application process has the necessary permissions to access the network share.

建议您通过确保Web应用程序进程具有访问网络共享所需的权限来开始进行故障排除。

Perhaps you need to change the account that the web application is running under to a Windows domain user? Perhaps the app is now running as LOCALSYSTEM (which only has local privileges).

也许您需要将运行Web应用程序的帐户更改为Windows域用户?也许该应用程序现在作为LOCALSYSTEM(仅具有本地权限)运行。

If you cannot run the web app under a domain user account, you could try pass-through authentication: Create a local user on the web application server with the exact same user name and password as an account that can access the network share. Run the app under this local account.

如果您无法在域用户帐户下运行Web应用程序,则可以尝试传递身份验证:使用与可以访问网络共享的帐户完全相同的用户名和密码在Web应用程序服务器上创建本地用户。在此本地帐户下运行应用程序。

Edit:

If the web app is configured to connect to the network share using drive mappings, try using UNC paths instead. For instance change m:\directory to \\server\share\directory

如果Web应用程序配置为使用驱动器映射连接到网络共享,请尝试使用UNC路径。例如,将m:\ directory更改为\\ server \ share \ directory

#2


The other gotcha -- apart from needing to have your service use a domain account -- is the fact that not all apps on a Windows server see the same set of network drive mappings. If you log into your server and set up a drive mapping by hand, your web app probably isn't going to notice it.

另一个问题 - 除了需要让您的服务使用域帐户 - 事实上并非Windows服务器上的所有应用程序都看到同一组网络驱动器映射。如果您登录服务器并手动设置驱动器映射,您的Web应用程序可能不会注意到它。

The reason for this behaviour is that drive mappings on a Windows server are done on a per-session basis; Windows assigns one or more session IDs to server processes, and a different session ID to each interactive logon.

此行为的原因是Windows服务器上的驱动器映射是基于每个会话完成的; Windows将一个或多个会话ID分配给服务器进程,并为每个交互式登录分配不同的会话ID。

The safest way to do this would be to either:

最安全的方法是:

  • Establish the drive mapping in code. I don't know anything about Weblogic, but you need to find the equivalent of the Windows WNetAddConnection2 call.
  • 在代码中建立驱动器映射。我对Weblogic一无所知,但你需要找到相当于Windows WNetAddConnection2的调用。

  • Or, switch to using UNC path names, thereby avoiding drive mappings.
  • 或者,切换到使用UNC路径名,从而避免驱动器映射。

#3


The procedure for mapping network drives is the same for virtual and physical machines. I would suspect that the issue your are having has more to do with porting your application from Windows 2k/WebLogic 8.1 to Windows 2k3/WebLogic 10.3. The virtual part probably has little to do with it. For more help, we would need to know more details about the error you are seeing and how the application is configured to find your resources.

映射网络驱动器的过程对于虚拟机和物理机都是相同的。我怀疑您所遇到的问题更多地与将您的应用程序从Windows 2k / WebLogic 8.1移植到Windows 2k3 / WebLogic 10.3有关。虚拟部分可能与它没什么关系。要获得更多帮助,我们需要了解有关您所看到的错误以及如何配置应用程序以查找资源的更多详细信息。

#1


Suggest you start troubleshooting by making sure that the web application process has the necessary permissions to access the network share.

建议您通过确保Web应用程序进程具有访问网络共享所需的权限来开始进行故障排除。

Perhaps you need to change the account that the web application is running under to a Windows domain user? Perhaps the app is now running as LOCALSYSTEM (which only has local privileges).

也许您需要将运行Web应用程序的帐户更改为Windows域用户?也许该应用程序现在作为LOCALSYSTEM(仅具有本地权限)运行。

If you cannot run the web app under a domain user account, you could try pass-through authentication: Create a local user on the web application server with the exact same user name and password as an account that can access the network share. Run the app under this local account.

如果您无法在域用户帐户下运行Web应用程序,则可以尝试传递身份验证:使用与可以访问网络共享的帐户完全相同的用户名和密码在Web应用程序服务器上创建本地用户。在此本地帐户下运行应用程序。

Edit:

If the web app is configured to connect to the network share using drive mappings, try using UNC paths instead. For instance change m:\directory to \\server\share\directory

如果Web应用程序配置为使用驱动器映射连接到网络共享,请尝试使用UNC路径。例如,将m:\ directory更改为\\ server \ share \ directory

#2


The other gotcha -- apart from needing to have your service use a domain account -- is the fact that not all apps on a Windows server see the same set of network drive mappings. If you log into your server and set up a drive mapping by hand, your web app probably isn't going to notice it.

另一个问题 - 除了需要让您的服务使用域帐户 - 事实上并非Windows服务器上的所有应用程序都看到同一组网络驱动器映射。如果您登录服务器并手动设置驱动器映射,您的Web应用程序可能不会注意到它。

The reason for this behaviour is that drive mappings on a Windows server are done on a per-session basis; Windows assigns one or more session IDs to server processes, and a different session ID to each interactive logon.

此行为的原因是Windows服务器上的驱动器映射是基于每个会话完成的; Windows将一个或多个会话ID分配给服务器进程,并为每个交互式登录分配不同的会话ID。

The safest way to do this would be to either:

最安全的方法是:

  • Establish the drive mapping in code. I don't know anything about Weblogic, but you need to find the equivalent of the Windows WNetAddConnection2 call.
  • 在代码中建立驱动器映射。我对Weblogic一无所知,但你需要找到相当于Windows WNetAddConnection2的调用。

  • Or, switch to using UNC path names, thereby avoiding drive mappings.
  • 或者,切换到使用UNC路径名,从而避免驱动器映射。

#3


The procedure for mapping network drives is the same for virtual and physical machines. I would suspect that the issue your are having has more to do with porting your application from Windows 2k/WebLogic 8.1 to Windows 2k3/WebLogic 10.3. The virtual part probably has little to do with it. For more help, we would need to know more details about the error you are seeing and how the application is configured to find your resources.

映射网络驱动器的过程对于虚拟机和物理机都是相同的。我怀疑您所遇到的问题更多地与将您的应用程序从Windows 2k / WebLogic 8.1移植到Windows 2k3 / WebLogic 10.3有关。虚拟部分可能与它没什么关系。要获得更多帮助,我们需要了解有关您所看到的错误以及如何配置应用程序以查找资源的更多详细信息。