.net

How can I make some items in a ListBox bold?

In Visual c# Express Edition, is it possible to make some (but not all) items in a ListBox bold? I can't find any sort of option for this in the API. ...

Lock free constructs in .net

I am new to .net and would like to know whether .net has the java equivalent of AtomicInteger, ConcurrentLinkedQueue, etc? I did a bit of search and couldnt come up with anything. The lock free algorithms need some sort of a CAS instruction, which is provided through the undocumented Unsafe class in Java, does .net have anything equiva...

"The handle is invalid" when running .net console via java

Hi, I'm trying to run dot net console application via Java : process = Runtime.getRuntime().exec(commandLine); I get the following output: Detecting The handle is invalid. when running it directly via the console (windows) there is no problem: Detecting 100% Done. 100% I'm running more applications in this form but have no prob...

Forcing threads in a service to wait for another thread to finish

I'm writing a service that has five different methods that can take between 5 seconds and 5 minutes to run. The service will schedule these different methods to run at different intervals. I don't want any of the methods to run concurrently, so how do I have the methods check to see if another method is running and queue itself to run ...

which open source project(s) uses the castle activerecord?

Rather than the demos can you suggest any open source projects using castle activerecord for code study? ...

Link security trimming in asp.net mvc

I would like to show some links only to authenticated users in an asp.net mvc web application. I use the template for an asp.net mvc web application in Visual Studio 2008 that came with the beta release of asp.net mvc. I use forms authentication. I would like to add something like the following to an existing view: <a href="/Account...

Unlock a file with unlocker from a WinForms App?

I am trying to unlock a file from a C# program, using unlocker. In my UI, I put a button to unlock the file the app couldn't delete. When the user pushes the button, I want unlocker (the famous app) to be opened. I have read about in the Unlocker web, and there is some explanations about the commandline to use but nothing works. I wri...

WMI invalid Class error (trying to uninstall a software on remote pc)

All, I am trying to uninstall a software remotely, it is working fine in the test machines, but i got problem in production servers. test machines i have used windows xp, windows 2003 server, production machine : windows server 2003. what could be the cause of this error, any help would be more appreciated. if you have any other...

How to add words to an already loaded grammar using System.Speech and SAPI 5.3

Given the following code, Choices choices = new Choices(); choices.Add(new GrammarBuilder(new SemanticResultValue("product", "<product/>"))); GrammarBuilder builder = new GrammarBuilder(); builder.Append(new SemanticResultKey("options", choices.ToGrammarBuilder())); Grammar grammar = new Grammar(builder) { Name = Constants.GrammarName...

How does IIS compare in terms of performance and scalability to weblogic and websphere for enterprise web applications?

A common argument against using .NET for high volume, transactional enterprise systems is that IIS does not compare to the likes of Weblogic and websphere for java. Is this true? Unfortunately for .NET web apps IIS is the only option as an application server. Does anyone have any arguments against this? I would like to promote .NET more ...

Why do I get E_ACCESSDENIED calling a COM+ method from a proxy?

Sorry if this is a bit long whinded... consider this: I have a COM+ application in a namespace called Company that exposes an object called Server which has the following methods: bool Server.Execute(IOptions options) IOptions Server.CreateOptions() IOptions simply has a couple of boolean read/write properties as follows: IOptions....

FXCop Rule for "If X = Nothing" when X is a nullable integer

1 Dim x as Integer? = Nothing 2 If x = Nothing Then 3 'this is what I think will happen 4 Else 5 'this is what really happens 6 End If The proper way to write that is "If x Is Nothing". Is there a FXCop rule that checks for this? Or better yet, can someone show me how to write my own? Jonathan ...

Upgrade a Windows Service without Uninstalling

Currently I have to uninstall the old version of my service before I install the new version. I am pretty sure this has something to do with it not being smart enough to update or remove the old service entries before adding the new ones. Is there a way to have the installer skip registering the service if it already exists? (I can assu...

How to handle stacked controls in .NET Winforms?

I have a form that will multiple Panel controls stacked on top of each other, each one being shown/hidden based on other selected options on the form. This has been a real pain to manage in the form designer as the panels don't behave like a full TabControl. However, it doesn't look like you can use a TabControl without the tabs. What is...

Implications of Sharepoint, BizTalk, Microsoft Dynamics and Microsoft CRM for a .NET developer

As a programmer, I am first and foremost interested in Architecture, Data persistence, analysis, testing and programming. You get the idea. I happen to like Microsoft's tools for developers, like .NET, VS and ASP.NET MVC. I have used SQL Server a lot. I also like other tools like Java or MySQL. But when I look at jobs at .NET shops (b...

Path to MSBuild

Hi, How can I programatically get the path to MSBUild from a machine where my .exe is running? I can get the .NET version from the Environment but is there away of getting the correct folder for a .NET version? Paul ...

Data structure question

I have a database table with a large number of rows and one numeric column, and I want to represent this data in memory. I could just use one big integer array and this would be very fast, but the number of rows could be too large for this. Most of the rows (more than 99%) have a value of zero. Is there an effective data structure I c...

.NET OpenId Library - both Provider and Consumer

I would like to add OpenId support to an app. It runs on ASP.NET MVC, and I would like to have it support OpenId authentication for users, and also allow users to use the app as an OpenId Provider. So basically I am looking for a good library that can be used as a provider and consumer for OpenId, and it has to be easily plugged into ASP...

Document Management for an Application

We are designing an application which would also have a need to manage a large number of files (docs, spreadsheets, scanned files, pdfs, etc.). We will need to associate files with other data in the system. This will be a web-based application.(asp.net) While there are many ways to solve this problem, I am thinking whether there is doc...

Using SharpZipLib to unzip specific files?

I'm trying to use SharpZipLib to pull specified files from a zip archive. All of the examples I've seen always expect that you want to unzip the entire zip, and do something along the lines of: FileStream fileStreamIn = new FileStream (sourcePath, FileMode.Open, FileAccess.Read); ZipInputStream zipInStream = new ZipInput...