.net

Remote performance monitor Fails to retrieve GC heap

Hi*,I am using the .NET Compact framework Remote Performance Monitor from the .net 3.5 compact framework powertoys.It is able to run an applications and get statistics from it, but after a while it fails to vieuw the GC heap on the platform with this exception:I am running WIN CE 6 on a x86 cpu.Anyone has an idea how to fix this? (or kno...

debugging a windows service, adding db logging to catch cluase a bad idea?

Hi, I have a windows service I am trying to debug. Is it a bad idea to add error logging in the Catch() clause? My logging is using a database to log the errors btw. ...

how do i get a count of columns that contain data from excel

I'm wondering if there is a simple property in the Excel interop that returns the count of used columns--ones containing data--from a given worksheet. In example: If myWorksheet.Columns.Count returns the total number of columns in a given worksheet, is there no equivalent along the lines of: myWorksheet.Columns.UsedCount? I'm not sure ...

Application Recovery

Have you used the Application Recovery APIs with vista? http://msdn.microsoft.com/en-us/library/aa373347(VS.85).aspx Do you find them to be reliable and easy to work with? I am reading through some of the docs and it seems rolling my own might be a better way to go because I can make my solution compatible with XP. Has anyone taken ...

C# BinaryWrite over SSL

I am trying to respond back to a client with a PDF stored in a MSSQL varbinary(MAX) field. The response works on my localhost and a test server over http connection, but does not work on the production server over https connection. I am using just a simple BinaryWrite (code below). byte[] displayFile = DatabaseFiles.getPdfById(id); ...

Render or convert Html to 'formatted' Text (.NET)

Hi, I'm importing some data from another test/bug tracking tool into tfs, and I would like to convert it's description, which is in simple HTML, so a plain string, where the 'layout' of the HTML is preserved. For example: <body> <ol> <li>Log on with user Acme &amp; Co.</li> <li>Navigate to the details tab</li> <li>Check ...

.Net Windows Update Querying

Hi all, I was curious if there's a .Net API that would allow me to identify what updates are pending for "Windows Update," failing that, is there a windows powershell command that can get it? ...

Is there any implementation of IDictionary<K,V> with better performance of the BCL one?

Hi, I'm looking for an implementation of IDictionary with better performance of the standard BCL one. I'm looking for something with constant lookup time that performs really well with large number of elements (>10K) and is more GC friendly. Ps: No, I'm not able to write one by myself :) ...

C# - Getting references of reference

I have built a class library project, that references a couple dll's. In the constructor of my class library project I use some enums from one of the referenced dll's. When using my class library in another project is it possible to not have to add references to my dll and the ones my class library project references internally? ...

Referencing Google's V8 engine from a .NET app

I'm building a .NET 3.5 application and have the need to evaluate JS code on the server - basically a user provided rule set that can work within a browser or on the server. Managed JS is not an option, because the JS code would be provided at runtime. Aptana's Jaxer is also not an option. So I was looking into using a build of the V8 en...

Unresolved Token in Managed C++

I have a mystery on my hands. I am trying to learn managed C++ coming from a C# background and have run into a snag. If I have a project which includes two classes, a base class Soup and a derived class TomatoSoup which I compile as a static library (.lib), I get unresolved tokens on the virtual methods in Soup. Here is the code: Abst...

How to redirect to a dynamic login URL in ASP.NET MVC

I'm creating a multi-tenancy web site which hosts pages for clients. The first segment of the URL will be a string which identifies the client, defined in Global.asax using the following URL routing scheme: "{client}/{controller}/{action}/{id}" This works fine, with URLs such as /foo/Home/Index. However, when using the [Authorize]...

C# data binding doesn't update WPF.

I'm trying to do a Data Binding in the C# code behind rather than the XAML. The XAML binding created in Expression Blend 2 to my CLR object works fine. My C# implementation only updates when the application is started after which subsequent changes to the CLR doesn't update my label content. Here's the working XAML binding. First a ...

Unit test case generator

Hi, Has anybody tried any Unit Test generators for .Net? I assume although it won't be any substitute for any good unit test written by a person who has written the functionality, but I think it will take away some of work and be a starting point on which we can better the unit tests. Thanks. ...

Best way to hide a window from the Alt-Tab program switcher?

I've been a .NET developer for several years now and this is still one of those things I don't know how to do properly. It's easy to hide a window from the taskbar via a property in both Windows Forms and WPF, but as far as I can tell, this doesn't guarantee (or necessarily even affect) it being hidden from the Alt-Tab dialog. I've seen ...

Getting Line Numbers for Errors Thrown in SQL Server CLR Runtime

Hi all, I've created a CLR stored procedure that I'm running on SQL 2k5 and I'm wondering if there's any way to get line numbers for exceptions thrown by the .NET code. When an Exception is thrown, I get something along the lines of Msg 6522, Level 16, State 1, Procedure myProcedure, Line 0 A .NET Framework error occurred during exec...

How can I make Visual Studio 2005 call a WCF service?

How can I make Visual Studio 2005 call a WCF service? ...

Memory Mapped Files .NET

I have a project and it needs to access a large amount of proprietary data in ASP.NET. This was done on the Linux/PHP by loading the data in shared memory. I was wondering if trying to use Memory Mapped Files would be the way to go, or if there is a better way with better .NET support. I was thinking of using the Data Cache but not su...

Can configuration data be encrypted from an installation process?

I am developing a .NET (2.0) WinForms utility that connects to a SQL Server 2005 database. I have found reference material, such as Avoiding Plaintext Passwords for handling the actual encryption of the connection string data. I now need to implement the encryption during the installation process so that an administrator can install the ...

What are strings really in .NET?

Is a string actually a character array (is-a), or does it have a character array as an internal store (has-a), or is it's own object which can expose itself as a with an array of characters? I am more inclined to say it is it's own object, but then why are we so inclined to always say "A string is an array of characters..."? ...