I have a method AddUserToGroup to add a user to an active directory group.
I am invoking the method on a machine not attached to the domain controller containing the user and group.
When group.Save() is invoked an PrincipalOperationException is thrown:
"Information about the domain could not be retrieved (1355)."
Does AD prevent modi...
Using this code, I can send emails to people. However, every time I press the send button, I think I log back in, correct?
Is there a way to perpetuate my login session, or is the way it's always been done ("I'm making a newbie assumption")?
var client = new SmtpClient("smtp.gmail.com", 587)
{
Credentials = ...
I have setup a .NET WCF web service that will expose some methods to create/update email alerts for different contactsIds. The webservice is going to live behind the firewall.
My fear is that if we expose a call like:
bool SetAlertTemplate(int alertId, int templateId);
One of the client websites could modify unintentionally an alert...
Please ignore code readability in this question.
In terms of performance, should the following code be written like this:
int maxResults = criteria.MaxResults;
if (maxResults > 0)
{
while (accounts.Count > maxResults)
accounts.RemoveAt(maxResults);
}
or like this:
if (criteria.MaxResults > 0)
{
while (accounts.Count ...
Say I have a list List<MyObject> myObjectList. The MyObject object has a property named Order which is of type int. How can I determine whether two or more objects in myObjectList have the same Order using LINQ-to-objects?
...
And can this be done without a really expensive solution like Apose? That costs way more than I can possibly spend.
Essentially, I need to be able to let someone upload a document and retain its formatting to display it through flex. If there's another way to do that, I'd appreciate a solution to that as well.
Thanks
...
I've written a small application that simply has a timer that polls a database on a tick. When specific entries are found, it does a bit of processing.
Currently this is written in C# and hosted in a Windows Service.
Many of my team's other, more "interactive" services are being moved to being centrally hosted in IIS. For consisten...
Hello
I looked for on the web during a long time and I can't find my answer.
I have two classes:
1) Customer: Customercollection which inherits from ObservableCollection.
It contains dependency property:
String Cname;
String Cemail;
OrdersCollection Orders;
2) Orders: OrdersCollection which inherits from ObservableCollection. ...
Hello all,
I've written a web service and hosted it in my local system using IIS. So when i connect to the webservice using http://localhost/server/service.asmx as the URL i'm getting the desired results (aka everything works like charm). But when i use http://192.168.14.56/server/service.asmx i'm not able to get any of the results.
Bu...
I have created a custom user control like this (simple example):
public class MyButton : Button
{
public MyButton()
{
BackColor = Color.Blue;
}
}
After compiling, it shows up in the form designer toolbox, and is displayed with the updated property. But, if I change the color, the controls that I am already using o...
I have an Excel 95 workbook, and I need to convert it into a format that is at least Excel 97, although preferably Excel 2003. I don't want to use office automation as this has all kinds of issues. Is there any way to do this in a .Net managed way?
...
I'm trying to build a little WPF email sender tutorial but I don't want to share it if it has this glaring bug.
Currently, this is what happens.
user types in username and password.
label 'loginstatus' changes to "Logged in" regardless if it's gibeerish or not.
Message body and send to fields are enabled.
user pressed "Send" button an...
Is there any reason the stl still uses the streams that it does? It seems that .net streams are much easier to use and implement. I can understand them keeping them due to compatibility reasons but why haven't they added a new stream implementation more like .net?
What are some pros and cons of the C++ streams compared to .NET streams? ...
I have been searching the web for some time for a solid FFmpeg wrapper for C#/.NET. But I have yet to come up with something useful. I have found the following three projects, but all of them apears to be dead in early alpha stage.
FFmpeg.NET
ffmpeg-sharp
FFLIB.NET
So my question is if anyone knows of a wrapper project that is more...
So I'm trying to match up a regex and I'm fairly new at this. I used a validator and it works when I paste the code but not when it's placed in the codebehind of a .NET2.0 C# page.
The offending code is supposed to be able to split on a single semi-colon but not on a double semi-colon. However, when I used the string
"entry;entry2;entr...
Our clients have a string stored in their registry which is an executable command. The string may or may not have quotes around the target path, and may or may not have parameters. For example:
"C:\path\file.exe" param1=value1 param2=value2
C:\path\file.exe param1=value1 param2=value2
"C:\path\file.exe"
C:\path\file.exe
"C:\p...
Does a process intensive Windows Service that handles heavy requests use more CPU, more RAM or both or neither?
In a nutshell, this Windows Service uses a 3rd party component in processing requests that take a long time to complete.
Anyone? Thanks
...
Often I want to change just one part of a URI and get a new URI object back.
In my current dilemma, I want to append .nyud.net, to use the CoralCDN.
I have a fully qualified URI fullUri. How can I, in effect, do this:
fullUri.Host = fullUri.Host + ".nyud.net";
This needs to work for almost any URL, and the PORT of the request needs...
What's the easiest way to find out if two text files are different programmatically? Given two files I just need to know whether they are different or not. This is for a quick tool to help with a particularly nasty merge (switched languages from VB to C# in one branch (yay!) and made many changes in the other), it won't be going into pro...
I'm using a third party url to determine the location of site visitors based on IP address.
I use WebClient.DownloadData() to get the information returned by the url which is a one word answer e.g. as per http://api.hostip.info/country.php
Once I have detected what country the user is in I want to either A) keep them on the current sit...