.net

How do I return a value from a console application to a service in .NET?

I have a .NET service. I have a .NET console application. I want something along the lines of the service calling Process.Start("consoleapp.exe") and getting some information returned back from the app, ideally just returning a number. How do I do this? Edit: I figure it must be: Process.Start("myapp.exe").ExitCode - but how do I se...

What is the easiest way to transfer a class with many dependecies in WCF (using shared DLLs)?

I've got a class which has properties referenced to couple of interfaces and classes. Now I'm trying to transfer this one class via WCF (named pipes), what's the best way to deal with it? Shall go into all referenced interfaces, class and mark stuff as <DataContract()>, <Serializable()> and <DataMember()>, which means at least 6-10 c...

Exclude Code from Builds Temporarily

I have a developer that has asked me if there is a way to exclude certain code from deployment. We run debug and release builds directly from most recent code in source control. She'll check in code and not want it to be included in the build for various reasons. (The root of this is probably a sort of, design on the fly mentality, but ...

How to index numeric fields and search them by range in Lucene.Net ?

I'm looking for an efficient way to index and search numeric fields in Lucene.Net. Right now my need is for integer values only. I want to search by ranges of values (between x and y, more than x...). Right now I'm indexing the number as is and manually creating clauses for each value in between the two values, but it quickly generates ...

.Net Framework Data Provider not found on host.

I have a working web site using Linq to Entities, on a MySQL database. Last night I installed the MySQL connector 6.0 for .NET, and all was good on my local machine. I assume I now have some GAC to Bin migration to do on the host. Does anybody know what files I must transfer and what I must do to my web.config? ...

How to handle MSMQ delay problem?

Scenerio: Function A() ->creates the message and puts the message in the queue Listener -> checks constantly if theres a message in the queue and sends it to the service to process it and get the result and inserts the result into db Function B() ->gets the result from the db Suppose the result from the service hasn't com...

Hosting a long running process in IIS

Hi All, I have a design scenario that is giving me a few headaches and I'm wondering what solution is the best solution. I have a dashboard-like application that polls information from a service that requires a java RMI connection to gather real time data. I'd like to implement that dashboard component in silverlight and provide the...

Visual Studio - Runtime impact of conditional and disabled breakpoints

After spending a little time wondering why my app was running a particular scenario very slowly with the debugger attached, I discovered that this was due to having a conditional breakpoint (whose condition was never being met). This seems reasonable, as the CPU would signal the breakpoint and VS would need to evaluate the condition bef...

Recommended architecture for a .NET Facebook Game

What is a good architecture for implementing a real-time, multi-player Silverlight-based game that is intended to integrate and run from Facebook? The idea is to build a Silverlight-based game that uses social network information from Facebook as part of its play environment. Specifically, Where should the game rules be implemented,...

Overhead of a .NET array?

I was trying to determine the overhead of the header on a .NET array (in a 32-bit process) using this code: long bytes1 = GC.GetTotalMemory(false); object[] array = new object[10000]; for (int i = 0; i < 10000; i++) array[i] = new int[1]; long bytes2 = GC.GetTotalMemory(false); array[0] = null; // ensure no garbage collectio...

Simple databinding - How to handle bound field/property change. Winforms, .Net.

I have a custom control with a bindable property:- Private _Value As Object <Bindable(True), ... > _ Public Property Value() As Object Get Return _Value End Get Set(ByVal value As Object) _Value = value End Set End Property Any time the field, that Value is bound to, changes, I need to get the type. I ...

ConfigurationErrorsException after Changing Root Namespace

I am receiving the following ConfigurationErrorsException: System.Configuration.ConfigurationErrorsException was unhandled   Message="Configuration system failed to initialize"   Source="System.Configuration"   BareMessage="Configuration system failed to initialize"   InnerException: System.Configuration.ConfigurationErrorsEx...

Should i do MCTS exam in SQL Server or .NET Programming

I have no degree, am self taught, and spent the last year moving my call centre database from using a simple Access database to SQL Server, programming the front end in VBA (in an Access project) as an IT Assistant. I want to get into a programming role eventually and I'm wondering whether to staudy for MCTS Installing and Maintaining S...

Alternatives to windows hooks in C#?

I would like to get notification of when any/all programs are being actively used. To do this via windows hooks I'd use an unmanaged C++ dll that talks to C#. There is an article that explains this process here. I was wondering though if there is any alternative to using system hooks though. ...

Best way to pass char* to .Net

I want to pass a big char* from cpp to .Net (preferably using COM). What is the best way (in terms of memory)? If I use CComBSTR it takes a lot of memory both when creating the BSTR in CPP and especially when moving it to .Net inside the COM call. ...

ADO .NET - adding a DataTable to more than one DataSet

I'd like to add a DataTable to more than one DataSet without calling DataTable.Copy(). Simply copying the DataTable doubles the amount of data in memory and causes me to manage its changes. This problem exists because I am implementing a detail tables solution where a detail table can have more than one master. If it helps, consider thi...

Help decrypting in ColdFusion passwords created in .NET

I have a SQL db storing passwords that were encrypted through a .NET application, that I need to decrypt through a ColdFusion app. I just can't seem to get things set upproperly for the CF decryption to work. Any help would by appreciated. Thanks. The .NET decryption code is: public string Decrypt(string input) { try { D...

Updating a Sharepoint Calendar from a VB.NET WinForm app

I am about to endeavor in the area of the posting subject and am looking for early advice. Is there a Sharepoint SDK that I need to install to be able to do this or shall I scan the .NET Framework for the appropriate objects to use? Advice or useful links would be appreciated. ...

How to configure StyleCop to suppress warnings on generated code?

Another project, Visual Studio's Code Analysis has this option. But I couldn't find it for StyleCop (AKA Source Analysis). The file I want to ignore is a dbml's .designer.cs code, that includes the // <autogenerated> tag. A blog post tells me that it would be sufficient, but in my case it is not. ...

Mapping complex classes with Fluent NHibernate

How can I map a class that contains a HashMap using Fluent NHibernate? ...