.net

C# - Why is a different dll produced after a clean build, with no code changes?

When I do a clean build my C# project, the produced dll is different then the previously built one (which I saved separately). No code changes were made, just clean and rebuild. Diff shows some bytes in the DLL have changes -- few near the beginning and few near the end, but I can't figure out what these represent. Does anybody have in...

How to load a specific version of an assembly

To complete some testing I need to load the 64 bit version of an assembly even though I am running a 32 bit version of Windows. Is this possible? ...

What is the optimal way to organize shared .net assemblies in SVN?

We are starting a new SOA project with a lot of shared .net assemblies. The code for these assemblies will be stored in SVN. In development phase, we would like to be able to code these assemblies as an entire solution with as little SVN 'friction' as possible. When the project enters more of a maintenance mode, the assemblies will ...

StackOverflowException in .NET

After hitting a few StackOverflowExceptions in .NET I noticed they completely bypass the unhandled exception handlers that .NET offers (Application.ThreadException / AppDomain.UnhandledException). This is very disturbing since we have critical cleanup code in those exception handlers. Is there any way to overcome this? ...

Identifying if 2 HTML pages are similar

I'm trying to identify differences between a base case and supplied case. Looking for a library to tell me similarity in percentage or something like that. For Example: I've 10 different HTML pages. * All of them are 404 responses with only one 2 lines of random code (such as time or quote of the day). Now when I supply a new 404 pag...

Which is the Best Book for .NET coding guidelines?

Which is the best book for .NET coding guidelines? ...

How do I convert a System.Type to its nullable version?

Once again one of those: "Is there an easier built-in way of doing things instead of my helper method?" So it's easy to get the underlying type from a nullable type, but how do I get the nullable version of a .NET type? So I have typeof(int) typeof(DateTime) System.Type t = something; and I want int? DateTime? or Nullable<int> ...

Checking for external dependances in vb.net

Something i've never really done before, but what is the best way to make sure that any external assemblies/dll's that my application uses are available, and possibly the correct version. I wrote an app that relies on the System.Data.SQLite.dll, i went to test it on a machine where that dll was missing, and my app just threw up a runtim...

Persistent Binary Tree / Hash table in .Net

Hi, I need a pure .Net persistent hashtable/binarytree, functionally similar to berkeley-db Java edition. Functionally it should opperate in a similar maner to a DHT such memcached and velocity etc but it doesn't have to be distributed. In essence I am looking for a persistent hashtable. Does anyone have any ideas or suggestions? A ...

Multi-Format File Viewer for .Net Development

Is anyone aware of a multi-format file viewer, capable of displaying common image formats, as well as MS Office document formats (at least Word and Excel), and PDFs? I've seen several image viewers available, but none besides Outside In from Oracle. I'm looking for viewer technology that can be imbedded in a .net application - a mixtur...

DataGridViewCell Bordercolor

Does anyone know how to change the Bordercolor for a Datagridviewcell in c#? Here's a picture of what I mean: Picture Backgroundcolor, Textcolor and Images are no Problem, but I don't know how to realise the Borders. EDIT: I want to realise this with winforms. Another problem is the cross in the second Row, but that's for later......

Entity Framework: how to return a base type from L2E

Considering the following architecture: a base object 'Entity' a derived object 'Entry:Base' and a further derived object 'CancelledEntry:Entry' In EntitySQL I can write the following: [...] where it is of (only MyEntities.Entry) [...] to return only objects of type Entry and no Entity or CancelledEntry. In linq to sql, the foll...

Using Side-by-Side assemblies to load the x64 or x32 version of a DLL

We have two versions of a managed C++ assembly, one for x86 and one for x64. This assembly is called by a .net application complied for AnyCPU. We are deploying our code via a file copy install, and would like to continue to do so. Is it possible to use a Side-by-Side assembly manifest to loading a x86 or x64 assembly respectively whe...

ASP.NET MVC: Making routes/URLs IIS6 and IIS7-friendly

I have an ASP.NET MVC-application which I want deployable on both IIS6 and IIS7 and as we all know, IIS6 needs the ".mvc"-naming in the URL. Will this code work to make sure it works on all IIS-versions? Without having to make special adjustments in code, global.asax or config-files for the different IIS-versions. bool usingIntegratedP...

Is there a .NET OS abstraction layer to make OS calls work cross-platform?

I really want to write .NET apps that run on any platform (PC, Linux and Mac). I am not really concerned about UI capabilities because these are mostly background services. I have heard of MONO and that it allows you to write .NET apps that run on Mac and Linux, but I want to be able to write a single app that when compiled for Windows...

.NET Reporting Tutorial

Does anyone know a Turorial for the Reporting in c# .NET. I mean the Reports in "Microsoft.Reporting"-Namespace not the Crystal Reports. Thanks in Advance ...

Bypass invalid SSL certificate errors when calling web services in .Net

We are setting up a new SharePoint for which we don't have a valid SSL certificate yet. I would like to call the Lists web service on it to retrieve some meta data about the setup. However, when I try to do this, I get the exception: The underlying connection was closed: Could not establish trust relationship for the SSL/TLS secure c...

WinForms context menu - not open in certain parts / detect underlying control

Hi all, I have a .NET 2.0 Windows Forms application. On this app there is a Form control with a Menu bar and a status bar. Also there's a ListView on this form. If I add a context menu to this form, the context menu will open when the user right clicks any part of the form, including the menu bar and the status bar. 1) How can I prev...

In ASP.NET how you get the physcial file path when HttpContext.Current is NULL?

I'm working with DotNetNuke's scheduler to schedule tasks and I'm looking to get the physical file path of a email template that I created. The problem is that HttpContext is NULL because the scheduled task is on a different thread and there is not http request. How would you go about getting the file's physical path? ...

Using .Net what limitations (if any) are there in using the XmlSerializer?

Using .Net what limitations (if any) are there in using the XmlSerializer? For example, can you serialize Images to XML? ...