|
The question is unclear. However, you can always view the file in any text editor tool like notepad etc if you don't have VS installed.
|
|
|
|
|
Well,
I'm working on a software which should give rights for usergroups to a directory that is on a fileshare. The usergroup is handled in a domain on a foreign ad-server
I can create groups on this ad-server.
I can read rights of the fileshare.
I can set rights to local groups or groups of my own ad-server
But I can't give rights to groups of this other ad-server with his own domains. When I try there comes the error, that he don't know the group.
I tried to get the SecurityIdentifier and another error occurs: it says that it's not possible to translate the account.
I've tried it that way:
NTAccount account = new NTAccount("domain\\group");
SecurityIdentifier secId = (SecurityIdentifier)account.Translate(typeof(SecurityIdentifier));
This works for group of my own domain (or ad-server) but not for the foreign. Has anyone an idea what to do?
By, the way, I tried to change the Thread-User, what seems to work, but no difference:
string[] roles = { "managers", "executives" };
Thread.CurrentPrincipal = new GenericPrincipal(new GenericIdentity(user, pwd), roles);
------------------------------
Author of Primary ROleplaying SysTem
How do I take my coffee? Black as midnight on a moonless night.
War doesn't determine who's right. War determines who's left.
modified 5-Sep-12 9:05am.
|
|
|
|
|
Hello all,
On the left side of my page we have created toolstrip, with that we have panel & property grid. we have images in toolstrip when i click on the image. image goes to panel where we can large the image and assigning the values of image to property grid with these line of code.
propertyGrid1.SelectedObject = (sender as System.Windows.Forms.PictureBox);
Now my problem is when click on the image it move slightly. we want to stop that click of image. Please help me.
Thanks in advance.
Sanjeev
|
|
|
|
|
Does it actually move (change position) or does it just wait a fraction of a second before the repaint? Does the picturebox move, or the image in the picturebox?
How are the controls sized? Are they docked by any chance?
Bastard Programmer from Hell
if you can't read my code, try converting it here[^]
|
|
|
|
|
hello everyone;
I am now learning SocketAsyncEventArgs, and i download a example from msdn.
but i do not understand one thing:
const int opsToPreAlloc = 2;
what this code meaning, why alloc 2 for buffer
thanks
|
|
|
|
|
This expression is just creating a constant value which will be used elsewhere in the code. It is not clear from the above what it will be used for, you need to check the actual references to opsToPreAlloc .
One of these days I'm going to think of a really clever signature.
|
|
|
|
|
It appears to be used to define the maximum size of the buffer in the BufferManager class defined here[^]. In the sample[^] you are using, it's the number of allowed connections multiplied by the size of the receive buffer multipled by 2. In other words, it allows you to have bytes for both reads and writes.
|
|
|
|
|
Hi all, im a junior programmer, writing my exam now in 3days on Microsoft Course 2956B, just would like to know if anyone has any tutorials or pdf's on "Monitoring and Debugging Applications", "Reading and Writing Files" and "Serializing Data" these the only modules im kinda battling with
Help would be greatly appreciated
thanks Wes
|
|
|
|
|
Here is a link[^] to some information on serialisation. No doubt you can find some on the other subjects.
One of these days I'm going to think of a really clever signature.
|
|
|
|
|
Information on file I/O can be found here[^].
/ravi
|
|
|
|
|
hi sir,
i am doing a project for user behaviour models and i would like to make my system learn the classification based on CBR can u please share me code in c#
plz sir thanks...
|
|
|
|
|
If we give you code it's not you doing a project, is it? This is what we call cheating.
modified 5-Sep-12 4:03am.
|
|
|
|
|
Pete O'Hanlon wrote: If we give you cods Is that part of the give him a fish/teach him to fish dichotomy?
Peter
Software rusts. Simon Stephenson, ca 1994. So does this signature. me, 2012
|
|
|
|
|
|
Pete O'Hanlon wrote: Damn phone keyboard.
Isn't that called a keypad on a phone?
|
|
|
|
|
|
hello to all. a newbie needs your help. i am working on a project and i'm stuck with this "cannot add an entity". i followed a tutorial and added the ribbon interface i found in this site. the code is almost the same, but mine is not working. it can't add data in the .mdf file. i uploaded the entire c# solution so you can see the entire project i'm working with.
here's the link to my project:
http://depositfiles.com/files/hlrdb1mne
many tnx.
|
|
|
|
|
kenajelencres wrote: i followed a tutorial and added the ribbon interface i found in this site.
Which one? If you post a question on the forum at the bottom of the article, an email will be sent to the author of the article.
kenajelencres wrote: it can't add data in the .mdf file.
Is the .mdf file write protected? Did you update the connectionstring to reflect your current setup?
Bastard Programmer from Hell
if you can't read my code, try converting it here[^]
|
|
|
|
|
tnx for the reply. the tutorial i found is from another site.
the .mdf is not write protected, i can add records using sql management studio. did you look at the project solution i uploaded? if yes, try to add a record and it will crash. here's the screenshot of the error:
error screenshot
pls help. i need to finish it asap.
|
|
|
|
|
I didn't, don't download "code" that often; most people will not download it, we don't know what's in there. You can post a snippet with the offending code here, including the full text of any exceptions you received.
kenajelencres wrote: pls help. i need to finish it asap.
That's why we usually have flexible deadlines. We're volunteers here, if you needed an answer sooner, you should have posted the question sooner.
Bastard Programmer from Hell
if you can't read my code, try converting it here[^]
|
|
|
|
|
The problem is fairly well defined in that picture. You are trying to insert a duplicate key here; if you put a break point on the SubmitChanges line, take a look at the values in newGradeYear . I'm going to go out on a limb and suggest that your key value is in IDNo (take a look in your database and see if this field is the primary key).
|
|
|
|
|
first, i would like to thank everybody who replied. you really are helping a newbie. i hope one of these days i can become one of you so i can help others too.
yes, the IDNo is the primary key, but i'm not inserting a duplicate. when i add a record, it will add 1 to the last key. i have only one record in the mdf, with IDNo 1. when i add another, it will automatically become 2. the textbox is not enabled, so there's no way you can edit it. but when i clicked on the DONE button, i get that error.
it's really hard to learn programming.
googling for some answer, i found this:
This error typically happens when you are creating a new record in a MetaTable with a foreign key relationship and the foreign key record already exists.
what does that mean?
here's the screenshot of my dbml: dbml screenshot
|
|
|
|
|
Have you done as I suggested and put a breakpoint on SubmitChanges? If you don't know how, simply go to this line and press F9 (a red circle will appear). Do a debug build and then run your application using F5 (start with debugging). Let the application run to this point, and then look at the Locals window in Visual Studio; look for the value in IDNo - make sure it's 2. Let's rule that out first.
|
|
|
|
|
wow that was a nice tip. tnx.
i did what you said and it turns out that IDNo is 1 because at the beginning of my code is
maxIndex = gradeyear.Count() -1;
and because i have only one record which i inserted using SQL management studio, maxIndex value is 0. and at the create new record
newGradeYear.IDNo = newGradeYear.IDNo = maxIndex + 1;
the value of maxIndex is 1 which will result in a duplicate. what i did is i took the value of textbox which has the correct value by using int32.parse. a new error appeared at the database.SubmitChanges():
Cannot insert explicit value for identity column in table 'GradeYear' when IDENTITY_INSERT is set to OFF
any suggestion to fix this?
i wonder why it worked on the tutorial i followed and not on mine when it is almost exactly the same code.
|
|
|
|
|
This is telling you that the field in the database is an identity column. That is a special type of column that you don't have to supply a value follow for. Simply drop the line where you give it a value and that should work.
|
|
|
|