Problem is as follows:
On log event I want to send my custom object (lets say LogMessage that wraps in some way logging event) to my web service. Could work like appenders in log4net, or is there this kind of thing in Nlog btw? Or how do I do this NLog way?
Note: I'm using WebService target wrapper (if this helps in any way).
...
In a winforms application I have a MyForm.cs that starts to get quite large.
To solve this I have created a new file(MyForm.LeftPanel.cs) using partial class of the MyForm class with a subset of the GUI functionality.
However once in a while, not always, when I go into the designer all event handlers that I have moved to MyForm.LeftPane...
We are thinking of ways to get our scheduled tasks centralized as much as possible by dragging alot of tasks from website specific web.config files to one Windows schedules task.
I can imagine that this has some negative consequences, but I want to list them so I can make myself a good explanation of what will work best.
We have differen...
I use thrown in visual studio 2005 while debugging a project to get the possible error.
But when I do it, it stops with an green arrow pointing the error line that is happening, but I want to skip that error to get the next possible error. How can I skip and set the yellow arrow to make it yellow and let it to go on to the part of th...
Dear Friends,
I need to develop a utility which opens the outlook express new mail window with attachment. I need to invoke this from command line i have tried various things please help me....
...
I want to listen to a running IceCast-Server, but it keeps getting 0 bytes only (although it gets a connection to IceCast).
What am I doing wrong?
Here is the code I use:
tcpClient = new TcpClient();
tcpClient.Connect(IPAddress.Parse("127.0.0.1"), 8000);
HandleClientComm(tcpClient);
And here HandleClientComm:
private void Hand...
A stupid question here:
is there such a library to do these stuff?
I want a more advanced library than system.drawing namespace.
...
I have 2 dlls. One dll is refering to the another one. I checked the mainfest of first dll and found it is referncing to the 2nd one with some specific token key.
But I checked the token of second assembly and found that it has some diffrent public token. So somehow I missed the correct 2 second assembly. So I want to know is there a w...
Hi to all.
I'm trying to use function CopyFileEx from kernel32.dll in Windows 7 using .NET interop. MSDN says:
If lpProgressRoutine returns PROGRESS_STOP due to the user stopping the operation, CopyFileEx will return zero and GetLastError will return ERROR_REQUEST_ABORTED. In this case, the partially copied destination file is left inta...
I need to add a variable pair list in a form (Name-Value). I decided to set it in a datagridview, and use simple binging to manage it (.NET 2):
public class EventParameter
{
private string name;
public string Name
{
get { return name; }
set { name = value; }
}
private string value;
public strin...
Hi,
I'm new to programming with the OpenXML SDK and I've tried excessively to locate and read text that is between two document fields, but never really succeeded. There are tons of samples and tutorials on the web about almost everything you can think of doing with the OpenXML SDK, from setting watermarks to doing merge mail, but not o...
I've a section like this
<mySection type="Namespace.MyClass, AssemblyName" />
in my code I need to create an Instance of MyClass, so what I do is something like that:
string type = GetMySectionType(); // "Namespace.MyClass, AssemblyName"
var typeParts = type.Split(',');
var className = typeParts[0].Trim();
var assemblyName = typePar...
Hey,
I have a decision tree that i need to turn to a code in C#
The simple way of doing it is using if-else statements but in this solution i will need to create 4-5 nested conditions.
I am looking for a better way to do it and so far i read a little bit about rule engines.
Do you have something else to suggest for an efficient way t...
I am trying to implement Logout Functionality in ASP.NET MVC.
I use Forms Authentication for my project.
This is my Logout code:
FormsAuthentication.SignOut();
Response.Cookies.Clear();
FormsAuthenticationTicket ticket =
new FormsAuthenticationTicket(
1,
FormsAuthentication.FormsCookieName,
DateTime.Today...
Hi,
I know there is a ListBoxFor extension method among the ASP.NET MVC Html helper extension methods, but I always thought that a checkbox list is more user-friendly than a list box.
There was a very convenient CheckBoxList control in good old WebForms, but obviously that is out of the picture now.
The question is, why is there no wa...
I have a problem with SetFetchMode call in Criteria API in following query:
DetachedCriteria.For<User>()
.Add<User>(u => u.Status == UserStatus.Live)
.CreateAlias("UniqueId", "uid")
.CreateAlias("Companies", "comp")
.Add(Restrictions.Disjunction()
...
There is a scenario I'm interested in.
User runs COM based application in a separate window, I want my C# application to manipulate that application through COM calls. I've found COM interface I'm interested in and VisualStudio has successfully generated wrapper (MyApp.interop). So I can write something like new Interop.MyApplication() ...
How can I restore history-files of a SQL Server 2005?
...
This code enumerate Active Directory domains, if the mahine on which is running is part of the forest.
public static ArrayList EnumerateDomains()
{
ArrayList alDomains = new ArrayList();
Forest currentForest = Forest.GetCurrentForest();
DomainCollection myDomains = currentForest.Domains;
foreach (Domain objDomain in my...
public string CreateOrder(string purchaseOrder)
{
using (MyWebService.CreateService service = new MyWebService.CreateService())
{
string orderCode = service.CreateOrder(purchaseOrder);
return orderCode;
}
}
I've added a web service reference to the domain layer of an ASP.NET web app.
This generates the two...