Creating One Folder And Making It Shared
Oct 7, 2009i am doing a vb.net windows application. in that i am creating one folder and making it shared and also assigning shared permission to SYSTEM. My code is as given below.
[Code]...
i am doing a vb.net windows application. in that i am creating one folder and making it shared and also assigning shared permission to SYSTEM. My code is as given below.
[Code]...
if you could see everthing but the thing I'm having trouble with the Public Shared Function(folder in 'Dim folder As nvironment.SpecialFolder' is the problem)
Option Explicit On
Option Strict On
Imports System.IO
[code].....
Not sure if this is the right Forum to post this question. If not guide me where to post... I have an Access database that I would like to be able to share with Multiple user cuncurently... I have seen it is being done but I am not sure how? Or may be I should be using SQL Express.
View 1 RepliesHow would I create a dir Inside %temp%? Then extract the file to it and Open a That folder. So far this is my code.
[Code]...
I use this code to share folder:
Public Sub Share()
Dim managementClass As New ManagementClass("Win32_Share")
Dim inParams As ManagementBaseObject = managementClass.GetMethodParameters("Create")
[code].....
creating ones own folder structure through tree view similar to the windows explorer for a windows application,will the application work on all the systems over the network?? will the files added to the folders (of the treeview in the application),visible to all.or would the exe be required to be put onto the shared folder of every system?? what will be the exact architechture???
View 9 RepliesI found how to create a share in C# using the ManagementClass to create an object to reference the Win32_Share class and the ManagementBaseObject class to access the members of the Win32_Share class.My problem is that I want the "Everyone" permissions to default to Read only.When I set the share via Windows Explorer it works fine but the code in my C# application is allowing Full Control and Change permissions along with Read permission.I tried using the DirectorySecurity class but that blows away the Security permissions (under the Security tab)without affecting any Share permissions of the Everyone group (under the Share tab).I don't want to change the Security permissions, I want to change only the Share permission (you know, the permissions that appear when you hit the Permissions button on the Share tab).
View 4 RepliesIn the above form the user will first enter a folder name and click the create folder button,then the folder will be created in the applications bin folder.I did the code for this:
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
If ComboBox1.Text = "" Then
[code]......
I have a button which on click creates a folder where the user wants. But as soon as the folder is created i want to save its name to the database(Access) The database contains one column named "FolderName"
Here lies my code that i tried:
Imports System.Data
Imports System.Data.OleDb
Public Class Form1
Dim con As OleDbConnection
[Code]...
NetShareAdd API from a VB.NET application (.NET version 2.0) and although I can get the API to just create a basic shared folder I now want to create a shared folder and specify its Share permissions (not NTFS permissions) as well, which means I have to pass in a SHARE_INFO_502 structure rather than just a SHARE_INFO_2 like I was previously doing for creating a basic share. I have spent over 5 hours solid just trying to get this working and am getting to the point now where I really cant think of anything else to try.I've encountered several problems whilst trying to make this work but the one I am finally stuck on is this: When I call NetShareAdd it returns the error INVALID_PARAMETER and the parm_ err object (which is supposed to specify which member of the SHARE_INFO_502 structure caused the error) holds the value 501. I know it is something to do with the security descriptor because if I comment out the line where I set the SHARE_INFO_502 structure's shi502_ security_descriptor field then the code works without an error (just obviously does not set the share permissons I want).I think posting all of the code here might be a bad idea as its currently over 150 lines long (yes that is only code for getting this API working...) so I'll just post my definitions of the SECURITY_DESCRIPTOR structure and the code I am actually using to call the various APIs involved: [code] Each of those API calls prior to NetShareAdd returns a non-error value in the Debug.WriteLine that is done after each one, but there is obviously an issue somewhere with the security descriptor.
View 2 RepliesIs there a code checking that whether a shared folder is available?? Or check whether ftp path is available?
View 2 RepliesI need to open a file on a shared folder which is in another computer that is conected to my computer through a network switch.
View 2 RepliesCan you give me a function or class which have properties?[code]...
View 5 RepliesI would like to create a global instance of a User Class that can be referenced by all the forms in my MDI application.This object may be set during the login procedure by the Login form but the user attributes are to be available for other forms. For example, MyUser.ID will be required for meeting the audit requirements whenever data is changed.
View 14 RepliesI need to open a folder on a remote server with different credentials in a window (explorer.exe).I managed to do it with no credentials (my credentials), but when I do it with another username and another password than mine, it opens a prompt to enter a username and a password, and it says "access denied".
In the access log on the remote desktop, it says that I tried to connect with my own username, and not the other username I entered. So, the process obviously did not work.
[Code]...
If I have a 'Shared' object defined in the App_Code folder; is that object shared amongst all users/visitors of my website? Or is it shared on a per-user basis?I don't know if that makes sense or not; but I've got a puzzle/solver I'd written earlier that I'm trying to incorporate into a simple ASP.Net site. It's probably poorly written, but I'd used a Shared boolean to determine if a solution had been found. The code works, now as an ASP.NET site, but if two visitors to my site were both validating their puzzle at the same time, would they both be accessing the same boolean?
View 3 Repliesgive me a function or class which have properties ?For example:I shared a folder (C:shared)
Dim clsObj as new clsSharedMonitor("C:shared")
'so that I can get its properties like:
clsObj.FullPath() 'Full Path of folder that client are accessing
clsObj.ClientIP() 'IP of computer which access to server
[code].....
I need to find a folder that is shared between all users of a PC, every body being able to read/write to that folder and below, without any errors. I think that the folder "C:Documents and SettingsAll UsersShared Folder" would do the trick. How do I find the path to that folder, regardless of the OS used (Xp / Vista / 7) and regardless of the Windows language (With a french Windows, this folder is called "C:Documents and SettingsAll UsersDocuments partag").
View 5 RepliesI have a problem when i use My.Computer.Network.DownloadFile from a iseries share path
View 2 RepliesAll i am trying to do is read and write files to a shared folder on a network in visual basic (VS 2010). I can go to the folder through windows without a problem and without being prompted for a password. However when i try to do it through visual basic, it cant find the directory. Here is my small snippet of code that i (hope) is telling me that the program cannot connect to the folder. [code] Are there any known issues with VS 2010 that may cause this? Maybe something else in my code that could have an effect? This is in my form_load event though, so it is literally one of the first things that runs.
View 1 RepliesI have web service which updates MS access database. Im using OleDB for Updating MS Access database
View 9 RepliesIs it possible to create a folder on a remote machine that has no previously shared folders? I can do this...
vb
Dim fname As String = "\10.1.x.yDocumentsMyFolderName"
IO.Directory.CreateDirectory(fname)
[code].....
I use the following code in order to check if certin user exists in the DACL:
Dim l_managemantObject As ManagementBaseObject() = CType(securityDescriptor.Properties("DACL").Value, ManagementBaseObject())
For Each mObject As ManagementBaseObject In l_managemantObject
l_name = CType(mObject.GetPropertyValue("Trustee"), ManagementBaseObject).Properties("Name").Value.ToString
If CType(mObject.GetPropertyValue("Trustee"), ManagementBaseObject).Properties("Domain").Value IsNot Nothing Then
[Code]...
I am building archiving system, I store the files on shared folder on windows server 2003, the shared folder protected by one user name and password ,on LAN I need vb.net windows forms to open file inside shared folder, how I could open the shared folder and in same time providing windows server 2003 with user name and password for the shared folder
View 4 RepliesIf I have a very large function/sub in a class that is an instance method (i.e., not Shared), do I gain or lose anything by moving that to a shared method and then declaring a small stub method for the instance use?
I.e., I go from this:
Public Sub MyBigMethod(ByVal Foobar As String)
If String.IsNullOrWhitespace(Foobar) Then
Throw New ArgumentNullException("Foobar")
End If
[Code] .....
My thinking is I save on memory size per each instance of the object. Because each instance only has to lug around the stub method which handles calling the shared version and passing an instance of itself to the shared method so that it can do whatever it needs to do. But I'll wager that I sacrifice a very teensy amount of speed because of the added function call overhead.
I want my application to look for a file in drive C's specific folder (say C:myFolderabc.mdb), if found just give a message if not, make the folder in drive C: and then copy the file.
View 1 Replies[code].....
View 2 Repliesi making program to launch .exe in folder, but send my problem.
I write this:
System.Diagnostics.Process.Start("WanXAppsDataSoftwareGrizzly_CloudGrizzly Cloud - Beta.exe")
or
[Code].....
I need to create a login page as part of an assignment. Problem is, I don't have access and I'm not sure which other programs can be used as alternatives. I am hoping that it's possible to create the login screen using only a If...Then...Else Statement. If it is possible, I'm probably going about it the wrong way, as it skips the first two conditions and goes straight to the 'Else'.
Private Sub OK_btn_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles OK_btn.Click
Dim Message As String
[Code].....
In asp.net 2.0 I have several "dropdowns" defined using generics (examples eye color, hair color, etc). The fields are all typical; id, text, etc. All are defined as their own classes which must implement an interface I created called ILookup. However, when I try to return a List<> of this class using:[code]
View 2 Replies