.net

How to embed IronPython in a .NET application

Is it possible to expose an API in a .NET application by embedding a scripting language like IronPython? How is it done? ...

RequiredFieldValidator Help

Quick question: I have multiple RequireFieldValidators on my aspx page. On the backend (C#) I want to be able to tell which control specifically wasn't valid so I can apply a style to that control. I use the Page.IsValid method to see if the overall page passed validation but I need to know specifically which one control failed. Tha...

How do I get the instance value of a property marked with a Attribute?

I have a class which is marked with a custom attribute, like this: public class OrderLine : Entity { ... [Parent] public Order Order { get; set; } public Address ShippingAddress{ get; set; } ... } I want to write a generic method, where I need to get the Property on a Entity which is marked with the Parent attribu...

GUI For Service Methods

We have a service that runs methods used for data import/export at specified intervals. To test these methods we have a little application with a single button that, when clicked, instantiates the import/export class and invokes the desired method. Nothing fancy. I would like create a more robust test application that can receive debu...

Looking for simple rules-engine library in .NET

Hi, Does anyone know of a good .NET library rules library (ideally open-source)? I need something that can do nested logic expressions, e.g., (A AND B) AND (B OR C OR D). I need to do comparisons of object properties, e.g., A.P1 AND B.P1. (Ideally, I could compare any property -- A.P1 AND B.P2). It should store the rules in a data...

Odd .Net serialization problem

Hello, I had an odd problem today when I was trying to serialize an object. The object was generated via "Add service reference" from a web service (svcutil.exe). The problem was that the below property (agencyId) was not being serialized with the rest of the object. Out of desperation I commented the property below it because it ha...

ActiveMQ over SSL to a .Net client

Does anyone know if it's possible to connect a c# client to an ActiveMQ instance over SSL using the Spring.Messaging.Nms library? Or if not using Nms then some other library? Many thanks ...

.NET CodeDom - compile and invoke a generated method

I managed to create a class using CodeDom and add a single method to that class. Now, is there a way to, having constructed the CodeCompileUnit instance, compile the code and invoke the generated method? The method invocation has to be done in the same context as the code generation. ...

Does the .Net TraceSource/TraceListener framework have something similar to log4net's Formatters?

I've begun to the the built-in TraceSource and TraceListener classes and I would like to modify the output format of the events independently of the TraceSources and TraceListeners. It seems that the TraceListeners apply their own formatting. Is it possible to completely change the formatting without creating a new class for each and e...

Activator.CreateInstance can't find the constructor (MissingMethodException)

I have a class which has the following constructor public DelayCompositeDesigner(DelayComposite CompositeObject) { InitializeComponent(); compositeObject = CompositeObject; } along with a default constructor with no parameters. Next I'm trying to create an instance, but it only works without parameters: var...

Export all contacts as vcards from Outlook

So, I want to export all my contacts from Outlook as vcards. If I google that, I get a bunch of shareware programs, but I want something free that just works. If I'm to code it myself, I guess I should use the Microsoft.Office.Interop.Outlook assembly. Has anyone already code to convert ContactItems to vcards? Edit: I solved it in a c...

Nunit.exe cannot work on Vista 64bits if x86 build

I am on Vista 64 bits and I have a project built with x86 configuration. All work fine. Now, we are at the time to create test. We have NUnit 2.4.8 but we have a lot of problem. The test are loading trough the Nunit.exe (gui) when we select the .dll directly but when executing we have a system.badimageformatexception. I have read by se...

C# Desktop Applications?

In looking at the use of C# in a ISV setting, I'm wondering what prominent C# based desktop apps are out there? I can think of only Paint .NET. Is C# a good idea for an ISV, or should one stick to more native environments like Delphi or even QT? Of course any experienced based advise or feedback would be appreciated. ...

.net system tray application to launch when a USB device is plugged in

Hi, How do I get my .net system tray application to popup when a USB device is plugged in? ...

C# - Exception messages in English?

We are logging any exceptions that happen in our system by writing the Exception.Message to a file. However, they are written in the culture of the client. And Turkish errors don't mean a lot to me. So how can we log any error messages in English without changing the users culture? ...

Bundling .NET in installer

Would you (or your customers) rather download a 1mb installer and perhaps be prompted to download and install .NET, or a 23mb installer and never need to even know what .NET is? Chris ...

ORM for Database with 1000+ Tables

I'm looking for a solid ORM for .NET that can handle over a 1000 tables and entities. What can you suggest? Any comments would be appreciated, but those from people who have actually dealt with this challenge and a description of how with what they dealt with it would be appreciated even more. ...

.Net Consuming Web Service: Identical types in two different services

I have to consume 2 different web services. Both contain a definition for a 'user' object. When I reference the services using "Add service reference" I give each service a unique namespace: com.xyz.appname.ui.usbo.UserManagement com.xyz.appname.ui.usbo.AgencyManagement The problem I have is that each one of the proxies that ar...

C# Remoting - How to turn off CustomErrors

I getting the following error when I try to connect to my server app using remoting: A problem seems to have occured whilst connecting to the remote server: Server encountered an internal error. For more information, turn off customErrors in the server's .config file. This is the code on my server app: TcpChannel tcpChannel = ne...

C# Console Application still resident in memory after exit

Hi, I have an .net C# console application (not a service). it basically connects to a webservice, gets some xml files, copies those files to a few location on a drives, validates the xml, processes it and sends these objects to another web service. However, when the main method exists (and the console window closes) I can still see the...