EldoS | Feel safer!

Software components for data protection, secure storage and transfer

Creating a simple virtual drive doesn't work on 2008 server R2

Also by EldoS: BizCrypto
Components for BizTalk® and SQL Server® Integration Services that let you securely store and transfer information in your business automation solutions.
#26250
Posted: 08/29/2013 15:27:07
by Aviv Scharf (Standard support level)
Joined: 07/03/2013
Posts: 11

Hello,

I'm evaluating the CallbackFileSystem product, and until now used Windows 7 Professional.
Since the code in production will be running on Windows Server 2008, I tried to run the same sample on that OS but it fails.
What I'm doing is:

mCbFs.AddMountingPoint("F:", CallbackFS.CallbackFileSystem.CBFS_SYMLINK_SIMPLE | CallbackFS.CallbackFileSystem.CBFS_SYMLINK_LOCAL, null);

The command completes, but when I click on the created drive, I get no callbacks and get the error message attached to this thread.
Also, in Explorer, there is only an icon of a drive, but the drive name (F:) doesn't show next to it.
The same code works fine on Windows 7 Professional

Please advise


#26251
Posted: 08/29/2013 15:29:59
by Aviv Scharf (Standard support level)
Joined: 07/03/2013
Posts: 11

Here is how the drive looks like


#26252
Posted: 08/30/2013 00:10:35
by Eugene Mayevski (EldoS Corp.)

Looks like some of your callbacks are not implemented correctly.

Please run the Mapper sample project on your Windows 2008 server and see if it works correctly. Then start modifying it (one change at a time) until it stops working. This way you will see, what exactly causes the problem.


Sincerely yours
Eugene Mayevski
#26278
Posted: 09/03/2013 11:15:50
by Aviv Scharf (Standard support level)
Joined: 07/03/2013
Posts: 11

Hi Eugene,

I forgot to mention that the problem actually happens only when there is more than 1 user using the command.

I put the CBFS_SYMLINK_LOCAL flag to make sure it is mapped only in the scope of the user but it seems that after 1 user maps it, all other user are getting the error mentioned above.

This is the command:
mCbFs.AddMountingPoint("F:", CallbackFS.CallbackFileSystem.CBFS_SYMLINK_SIMPLE | CallbackFS.CallbackFileSystem.CBFS_SYMLINK_LOCAL, null);

Aviv
#26280
Posted: 09/03/2013 11:53:31
by Volodymyr Zinin (EldoS Corp.)

Hello Aviv,

Is the problem reproducible with the Mapper sample?

Thanks.
#26281
Posted: 09/03/2013 12:56:45
by Aviv Scharf (Standard support level)
Joined: 07/03/2013
Posts: 11

I'm working on reproducing it

Thanks,
Aviv
#26282
Posted: 09/03/2013 14:02:15
by Aviv Scharf (Standard support level)
Joined: 07/03/2013
Posts: 11

Hi Eugene, Vladimir,

Yes, the problem is reproducible with the untweaked Mapper program.

Let me describe the steps:

1. I run the Mapper sample (The drivers are already installed)
2. I click on Create Storage, Mount and the Add. Everything is fine
3. I open another user session on the same machine usingTerminal Server
4. I run Mapper sample in that user
5. I click on Create Storage, Mount and the Add.
6. I receive the error message "cannot create file when that file already exists" (see attached screenshot). This error is an exception on a call to AddMountingPoint()

Please advise


#26283
Posted: 09/03/2013 14:18:56
by Aviv Scharf (Standard support level)
Joined: 07/03/2013
Posts: 11

Also, my real program is based on the Vdisk sample not on the mapper, so I don't use c:\ or c:\1 in my program but just calling MountMedia.
However, I reproduced with Mapper as you asked.

Thanks,
Aviv
#26288
Posted: 09/04/2013 02:24:08
by Volodymyr Zinin (EldoS Corp.)

Did you modify the Mapper sample in order to create a "local" mounting point? I.e. is there the AddMountingPoint call:
mCbFs.AddMountingPoint("F:", CallbackFS.CallbackFileSystem.CBFS_SYMLINK_SIMPLE | CallbackFS.CallbackFileSystem.CBFS_SYMLINK_LOCAL, null);
If not a "local" mounting point is created then the reason of the error can be because the second instance of the Mapper sample tries to create the "global" mounting point that has already been created by first Mapper.

Also with your test the problem can be because two different virtual disks both use as "backend" the folder "C:\1". For example both instances in their callbacks try to create the same "backend" file (like "C:\1.txt"). This causes the second creation attempt to finish with the "file already exists" error, because the file has already been created by first instance of Mapper.

In the case you want to have different mounting points for different logon sessions but also to have one "backend" it's better to run Mapper (or your own program) as a service (as a real NT-service or as a program in one user session) and create several "local" mounting points for different logon sessions. For details see the documentation for AddMountingPoint (the parameter AuthenticationId).
#26298
Posted: 09/04/2013 09:24:02
by Aviv Scharf (Standard support level)
Joined: 07/03/2013
Posts: 11

Hi Vladimir,

When I used the vdisk sample, I did change the parameter as you mentioned (mCbFs.AddMountingPoint("F:", CallbackFS.CallbackFileSystem.CBFS_SYMLINK_SIMPLE | CallbackFS.CallbackFileSystem.CBFS_SYMLINK_LOCAL, null); )

In the vdisk sample it is all virtual and I don't mount locally to a "backend" folder"
In this case the command completes, but I get no callbacks on the 2nd user when clicking on the drive (See my first post on this thread).

I need callbackFS to work correctly with more than one user on the same machine.

Please advise
Also by EldoS: CallbackFilter
A component to monitor and control disk activity, track file and directory operations (create, read, write, rename etc.), alter file data, encrypt files, create virtual files.

Reply

Statistics

Topic viewed 2648 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!