.net

.net configurable business error messages

Hi all, I need to implement some kind of solution such that in our business logic layer when certain conditions are met an error message is returned. That error message should be configurable either in a file or table that can be edited at run time if needed. I've seen it done before a few ways and it always ends up something like "Th...

Addressing "Access Denied" Exception with WMI Calls

I'm getting an exception with a message of "Access Denied" when executing against a WMI request. Some WMI requests appear to require higher security privileges than others. Ultimately my goal is to monitor process launches within the system and log. Regardless if there is a better approach, its now become a vendetta in getting this WM...

Do I always need to rebuild the project containing references to sub project's dll, if sub projects are updated ?

I have a solution containing 4 class library projects and one "web site" project. The web site project contains references to the 3 class library projects, whenever I make changes in any of the class library projects, the only option I see is to rebuild the web site which takes a lot of time. Is there any option that I can only update ...

how to give read only access to the xml file in c#?

how to give read only access to the xml file in c#? ...

Input string was not in correct format.

Hi Experts, I had a Ribbon like custom control. I created an application using this control. These applications work fine until I change the system number format. They crashes if I change the system number format like below: Current Format = English (United State) Decimal symbol = ',' Digit group symbol = '.' When I run application...

Convert between python array and .NET Array

I have a python method that returns a Python byte array.array('c'). Now, I want to copy this array using System.Runtime.InteropServices.Marshal.Copy. This method however expects a .NET array. import array from System.Runtime.InteropServices import Marshal bytes = array.array('c') bytes.append('a') bytes.append('b') bytes.append('c') M...

Complex Event Processing with C#

Hi All, Can you suggest me a possible way to get started with CEP in C# ? By what I mean when I say, get started: A good book talking about CEP and C# A library which deals event clouds Some sample codes using the library Some good quality codes in general to get a possible feel of the problems Good blogs Anything else you might fe...

How to obtain the default browser without registry lookup in .NET ?

Does anybody knows a way how to get the default browser without doing a lookup on the registry using the .NET framework? ...

how can i solve "The OLE DB provider "Microsoft.Jet.OLEDB.4.0" has not been registered."?

i try to use get excel data from excel file. i am using office 2007 and sql 2005. i writed below codes: CREATE TABLE [dbo].[Addresses_Temp] ( [FirstName] VARCHAR(20), [LastName] VARCHAR(20), [Address] VARCHAR(50), [City] VARCHAR(30), [State] VARCHAR(2), [ZIP] VARCHAR(10) ) GO INSER...

Requirement to deploy the .NET framework

Has the requirement to deploy the .NET framework with a .NET application caused programmers to go back to languages such as C++ where more standalone applications can be created? ...

Changing any Form Region/Ribbon property breaks Visual Studio editor

I have a problem with Visual Studio 2010 and Outlook Addin 2010 project (.NET 4 target). I've added a form region to my project and then I've changed Localizable property to true. Now if I close my form region and reopen it, I'm getting this VS error page: To prevent possible data loss before loading the designer, the following errors ...

WPF: How to programmatically utilize the ErrorTemplate of an Control?

Hi, is there a way to programmatically set and remove the ErrorTemplate of an Control without the whole Validation mechanism? Basically, what I'd like to do, is to retrieve the ErrorTemplate of an Control at some point like this: ControlTemplate errTemplate = Validation.GetErrorTemplate(myTxtBx); and temporarily use it as it's Contro...

PropertyGrid - is it customizable?

I have a project in that we have to represent some graphic objects on a usercontrol in WYSIWYG. Also is required to edit each objects properties(Color, Location, etc). I hesitate between using PropertyGrid ('direct' properties edit) and custom forms on DoubleClick ('indirect' edit). The PropertyGrid is very well but should correspo...

XML serialization query

I have the following XML which needs deserializing/serializing: <instance> <dog> <items> <item> <label>Spaniel</label> </item> </items> </dog> <cat> <items> <item> <label>Tabby</label> </item> </items> </cat> </instance> I cannot change the XML structure. I need ...

Looping through a file in VB.NET

I am writing a VB.NET program and I'm trying to accomplish the following: Read and loop through a text file line by line Show the event of the loop on a textbox or label until a button is pressed The loop will then stop on any number that happened to be at the loop event and When a button is pressed again the loop will continue. ...

How to pre-load all deployed assemblies for an AppDomain

Given an App Domain, there are many different locations that Fusion (the .Net assembly loader) will probe for a given assembly. Obviously, we take this functionality for granted and, since the probing appears to be embedded within the .Net runtime (Assembly._nLoad internal method seems to be the entry-point when Reflect-Loading - and I ...

Entity Framework Error: NavigationProperty

Hi, I've been trying to fix this issue I get when I add a new entity framework edmx file to my project and try to make it generate my tables, procs and views. When I build it it gives me this error on my drawer table: Error 601 Error 6017: The NavigationProperty 'Drawer' on the type 'DrawerCompany' is the source of a generated proper...

How to find which existing .NET solutions contain a certain project?

I am exploring a structure of folders with C# projects such as the following: Projects ProjectA ProjectB ProjectC ProjectD Scattered around in the same folders as the .csproj files, there are several solution (.sln) files. Is there a fast way to find all the solutions that contain ProjectD.csproj? I can open them one by one and see...

Deploy a full trust wpf browser application (XBAP)

Hi everybody, I am building a XBAP application which required to run in a full trust environment. Thus, when using it on browser, the end-user have to install my .pfx file (to certificate my application) or receives the famous "Trust not granted" error. That make a inconvenience. So, I want that everytime the end-user access my xbap app...

.Net Thread Execution

I have written a thread which I've started using the start method but I'm not able to know when the thread has done executing the method and destroy the thread object. _ProgressThread = New Thread(AddressOf ExecProc) _ProgressThread.IsBackground = False _ProgressThread.Start() //the flow of execution should come here only after the thr...