EldoS | Feel safer!

Software components for data protection, secure storage and transfer

Opening network mounted files

Also by EldoS: CallbackDisk
Create virtual disks backed by memory or custom location, expose disk images as disks and more.
#8987
Posted: 02/19/2009 14:07:05
by Ian Colomby (Priority Standard support level)
Joined: 11/14/2008
Posts: 25

I am attempting to open a file from a network share mounted with the latest version of Callback File System via C# and .NET 2.0. Occasionally we are getting the following error:
Code
System.IO.IOException: Logon failure: unknown user name or bad password
.

I've tried opening the file using the 2 following methods (C# and Win32 API):
Code
FileStream fs = new FileStream( "\\server\share\folder\file1.doc", FileMode.Open, FileAccess.ReadWrite, FileShare.None );


and

Code
[DllImport("kernel32.dll", CharSet = CharSet.Auto, SetLastError = true)]
internal static extern SafeFileHandle CreateFile(string lpFileName,            uint dwDesiredAccess, FileShare dwShareMode, IntPtr lpSecurityAttributes, FileMode dwCreationDisposition, uint dwFlagsAndAttributes, IntPtr TemplateFile);

SafeFileHandle theFileHandle = CreateFile("\\server\share\folder\file1.doc",GENERIC_READ | GENERIC_WRITE, FileShare.None, IntPtr.Zero, FileMode.Open, FILE_ATTRIBUTE_NORMAL, IntPtr.Zero);


The code will try the C# FileStream first and then the Win32 API call. Sometimes both calls will fail, sometime the C# FileStream call will fail but the Win32 API call right afterwards succeeds, and sometimes both calls succeed. This code is running in a separate thread that I use to check if the file is currently open for writing. I've also seen the calls fail on the first time the thread runs but will succeed in a subsequent call.


Thanks, Ian.
#8999
Posted: 02/20/2009 15:38:44
by Volodymyr Zinin (EldoS Corp.)

I have attached the corrected driver and network redirector dll. Please check the problem with them. Both have the version 0.0.0.1. Ensure that it is so after the installation.
The driver cbfs.sys is located in <win_root>\system32\drivers. And the network redirector dll VSNetRdr.dll is in <win_root>\system32.
Thanks.


[ Download ]
#9011
Posted: 02/23/2009 13:08:14
by Ian Colomby (Priority Standard support level)
Joined: 11/14/2008
Posts: 25

We installed the new driver and helper that you provided and ran the C# Mapper sample using the network mounting points and browse via UNC path.

The performance issues with Microsoft Office mentioned in the other topic are fixed; however we are unable to save Word and PowerPoint files. For Word, the error is "The save failed due to out of memory or disk space. (\\myServer\myShare\myFile.doc)", and for PowerPoint, the error is "There was an error accessing \\myServer\myShare\myFile.ppt." We tried running the Mapper sample using a simple mounting point and we get similar errors when saving Word and PowerPoint files.

We are also still occasionally getting the error mentioned above with the FileStreams.
#9017
Posted: 02/23/2009 15:23:15
by Volodymyr Zinin (EldoS Corp.)

Quote
Ian Colomby wrote:
however we are unable to save Word and PowerPoint files. For Word, the error is "The save failed due to out of memory or disk space. (\\myServer\myShare\myFile.doc)", and for PowerPoint, the error is "There was an error accessing \\myServer\myShare\myFile.ppt."

Unfortunately I could not reproduce it. I also used the Mapper sample, replacing only the call AddMountingPointEx by the following one:
mCbFs.AddNetworkMountingPoint("s:;cbfs;qwerty", true, 0);

Please specify are these doc- and ppt-files visible in the virtual disk? And can they be opened by Word and PowerPoint?
Also perhaps there is some other strange behavior with the attached binaries. If so then please describe it.
Thanks.

Quote
Ian Colomby wrote:
I am attempting to open a file from a network share mounted with the latest version of Callback File System via C# and .NET 2.0. Occasionally we are getting the following error: ...

Do you mean that the file is located on some real network share and you try to open it (from the CallbackFS callbacks or somewhere else)? Or do you create a network mounting point for some CallbackFS virtual disk and try to open the file located on this virtual disk via the created mounting point?
#9034
Posted: 02/24/2009 12:19:51
by Ian Colomby (Priority Standard support level)
Joined: 11/14/2008
Posts: 25

We're noticing that the error only occurs on Microsoft Office 2003. It works fine with Office 2007.
The .doc and .ppt files are visible in the virtual disk, and they can be opened by Word and PowerPoint. The problem occurs when trying to save.

Regarding the FileStream error - we're creating a network mounting point for some CallbackFS virtual disk and try to open the file located on this virtual disk via the created mounting point

Thanks, Ian
#9040
Posted: 02/25/2009 03:08:12
by Volodymyr Zinin (EldoS Corp.)

Quote
Ian Colomby wrote:
We're noticing that the error only occurs on Microsoft Office 2003.

Please try the attached driver. It has the version 0.0.0.2 (ensure that it's really installed before the following checking).

Quote
Ian Colomby wrote:
We are also still occasionally getting the error mentioned above with the FileStreams.

I'll investigate it in detail...


[ Download ]
#9041
Posted: 02/25/2009 11:25:13
by Ian Colomby (Priority Standard support level)
Joined: 11/14/2008
Posts: 25

We tried installing the the new driver (v0.0.0.2) with the v0.0.0.1 helper DLL (and also tried with v2.5 helper DLL). In Office2003 applications, we were able to save, but noticed that opening and saving files was very slow. In Office2007 applications, we're seeing "Contacting \\myServerName\myShareName\myFile.doc for information" again for open and save. It seems that the performance and behaviour of this driver is similar to v2.5RC.

It seems v0.0.0.1 driver and v0.0.0.1 helper DLL had better performance and behaviour in Office2007 and Office2003 (with exception of not being able to save Office 2003 Word/PPT files).

Thanks, Ian
#9042
Posted: 02/25/2009 15:05:02
by Volodymyr Zinin (EldoS Corp.)

Quote
Ian Colomby wrote:
In Office2003 applications, we were able to save, but noticed that opening and saving files was very slow.

Could you tell me what size (approximately) these files have?
#9045
Posted: 02/25/2009 15:49:15
by Ian Colomby (Priority Standard support level)
Joined: 11/14/2008
Posts: 25

Our files range from 100KB to 10MB. There is about a 5-10 second delay when opening and saving files of any size, as well as when browsing the folders via the open/saveAs dialog boxes in the Office2003 applications
#9062
Posted: 02/27/2009 01:07:58
by Volodymyr Zinin (EldoS Corp.)

We have created the new build. Please try it.
Also by EldoS: MsgConnect
Cross-platform protocol-independent communication framework for building peer-to-peer and client-server applications and middleware components.

Reply

Statistics

Topic viewed 7100 times

Number of guests: 1, registered members: 0, in total hidden: 0




|

Back to top

As of July 15, 2016 EldoS Corporation will operate as a division of /n software inc. For more information, please read the announcement.

Got it!