views:

603

answers:

3

Hi all,

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).

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.

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.

+1  A: 

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

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).

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.

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

codeape
Hi,Thank you for the reply.Yeah, actually the web application is ruuing under domain user account.As per your advise I created a local user account with same user name and password.No luck.Thank you,
And you set the app up to use this new account, right? I also added another suggestion to my answer, re UNC paths.
codeape
Hi,Thanks to all the 3 of you for the help.I switched to UNC paths and it works.Thanks a lot again.Jani.
Hi, Thanks to all the 3 of you for the help. I switched to UNC paths and it works. Thanks a lot again.
A: 

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.

Gary
Hi,Thank you for the reply.Our network drive contains images under a folder like ..'M:\abc\efgh\xyz\Logos'We mapped this in weblogic.xml as<virtual-directory-mapping> <local-path> M:\abc\efgh\xyz\Logos </local-path> <url-pattern> /logos/* </url-pattern></virtual-directory-mapping>As I mentioned, this was working fine in previous set up on Weblogic 8.1.Thank you,
A: 

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.

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.

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.
  • Or, switch to using UNC path names, thereby avoiding drive mappings.
Tim Robinson