In addition to Pete's comments, if you head over to the articles section you will find plenty of good samples of Windows forms applications, and how to use the various controls. Alternatively look here[^] and here[^] on MSDN.
I'm having the toughest time finding / figuring out how to get remote powershell working with 2012.
Currently this is my code:
privatevoid OpenRunspace(string username, string password, ref Runspace remoteRunspace)
// Convert plain text password to secure string
SecureString pass = new SecureString();
foreach (char c in password.ToCharArray())
PSCredential psc = new PSCredential(username, pass);
WSManConnectionInfo wmci = new WSManConnectionInfo(new Uri("http://" + ConfigurationManager.AppSettings["ExchangeServer"] + "/powershell"), "http://schemas.microsoft.com/powershell/Microsoft.Exchange", psc);
wmci.AuthenticationMechanism = AuthenticationMechanism.Kerberos;
wmci.ProxyAuthentication = AuthenticationMechanism.Negotiate;
wmci.SkipCACheck = true;
wmci.SkipCNCheck = true;
remoteRunspace = RunspaceFactory.CreateRunspace(wmci);
The error I keep getting is "Access is denied". I've verified the credentials I am passign to it is part of the REmote Management Users group on that local server, ran the Set-User "Administrator" powershell enabled command in Exchange 2013
You can use the web.config or app.config files for that. They are accessed through the ConfigurationManager class.
They are XML based files and have several sections that ConfigurationManager can read. One of those sections is "ConncectionStrings" (or something similar.)
You're going to have to be a lot more specific about what you're looking for. A database in SQL Server doesn't have a username and password. Even if it did, there's no way for you to get the password for any SQL Server account.
A connection string is just a string of characters. If you need to change the userId and password used to connect to the database, just create your connection string and inclue easily replacable tabs where the username and password would normally go. Then it's just a very simple search and replace for those tags. For example:
I'm a noob so I've never seen this before or read about it. I understand that it allows you to define metadata within your program and so on...
My question is more so about format than understanding. I was wondering if I put in an attribute right above on function if that attribute is assigned to all functions below it until another attribute is reached.
Person person = new Person();
Will the attribute [SetUp] be for both init and foo, or just init?
The [SetUp] attribute was placed above init - consequently, only the function init has that attribute.
By the way, with NUnit, you need a [TestFixture] above your class declarartion, a [TestFixtureSetUp] for the test setup method (if availbale), and a [Test] for every actual test method - the attributes differ between Microsoft Test and NUnit. You can use Visual NUnit for running your tests from Visual Studio (has some bugs, but it's still easier than using the NUnit GUI).
I am passing a string parameter to one of the method of web service.
This string parameter has /r and/n incorporated in it, but when value is passed to web service it removes /r from it.
Any reason why is it happening so.
Web service is created using .Net framework 1.1 and written in C# code.
I am trying to consume web service in an another application build using framework 1.1.