.net

NHibernate code completion Visual Studio

Hi, I know there is a way to enable code completion for hibernate-mapping files. But I can't remember how I have to do this. Can someone help me out pls? Kind Regards, Sem ...

ISerialization Constructor not getting called

EDIT: The solution to my problem is to implement IXMLSerializer. Thanks everyone for the quick responses. Hi everyone, I'm having this issue and I do not seem to a find a proper solution to it. I have the following class public class Child { private int _id; public int Id { get { return _id; } set...

Cannot find X.509 certificate using FindByThumbprint

I am getting the following error when I try to instantiate an instance of a third party web service client... Cannot find the X.509 certificate using the following search criteria: StoreName 'My', StoreLocation 'LocalMachine', FindType 'FindByThumbprint', FindValue '[value in here]'. The strange thing is that we have this working on an...

CryptographicException 'Keyset does not exist', but only through WCF

I have some code that makes a call to a third party web service that is secured using X.509 certification. If I call the code directly (using a unit test) it works without any problems. When deployed, this code will be called via a WCF Service. I have added a second unit test that calls the WCF Service, however this fails with a Crypto...

MICR in .NET

I'm looking for libraries, fonts, UI elements and other tools for working with MICRs in .NET. Specifically, if you had to put E13B on a check stub, how would you do it? ...

Transactions with typed dataset and Sql Server CE

I have a WinForms application that interacts with a SqlCe local database. I manage db operations using BindingSources, TableAdapters and typed datasets.I have several operations scattered through several methods in two different classes that I need to perform in a transaction and I was thinking of using System.Transactions.Transaction or...

What's the different between ASP.NET AJAX pageLoad() and JavaScript window.onload?

I'm working with ASP.NET AJAX and want to understand the difference between these two snippets: function pageLoad(sender, eventArgs) { } and window.onload = function() { } Do they act the same? Or is one called before the other? Or will one be called automatically and the another not? ...

How do you handle checks to see if a user changed something in a dialog

Talking .NET WinForms here: If you have an application where someone can change items using some properties dialog for example, how do you determine if a user has changed something when he clicks on cancel (to decide whether to display a cancel confirmation message box, or not). I can think of 2 methods: Defining a dirty bit and hand...

WPF - How to combine DataTrigger and Trigger?

NOTE I have asked the related question: How to combine DataTrigger and EventTrigger? I have a list box containing several items. The item's class implements INotifyPropertyChanged and has a property IsAvailable. I use that property to indicate unavailable options in the list using a different colour. However, if a selected item i...

SQL Select where values in List<string>

Is there a way that I can create query against a data source (could be sql, oracle or access) that has a where clause that points to an ArrayList or List? example: Select * from Table where RecordID in (RecordIDList) I've seen some ways to do it with Linq, but I'd rather not resort to it if it's avoidable. ...

TFS Client APIs for creating workitem templates?

Of course, it is pretty possible to create work items, get a list of work items etc in TFS. In addition to this, we need to have the functionality of allowing our users to create their own work item templates, for various file types. Whether the TFS Client APIs are capable of uploading work item templates to TFS server? ...

.Net System.MissingMethodException - 3.5 SP1 versioning hell

Hello, After deploying an ASP.net webservice to my production server i got this exception: System.MissingMethodException Method not found: 'Boolean System.Threading.WaitHandle.WaitOne(Int32)' The MSDN documentation states: Version Information .NET Framework Supported in: 3.5 SP1, 3.0 SP2, 2.0 SP2 so the reason of...

PHP client calling .net 3.5 sp1 web service

I need to create a web service that a PHP client can call. The service needs to accept 1 or many integers, provide security, and does not need to return any data (though other similar services may need to). This particular service will is intended to trigger a data extract that will be picked up later. My manager believes that creating ...

When should copy-local be set to true and when should it not?

I am wondering if there are any heuristics for when to set copy-local=true for references? If referenced types are only used internally can I set copy-local to true but if referenced types are exposed as parameters or return values I set copy-local to false and indicate that a specific version of the dependency should be referenced when...

Changing workflows in runtime

I have two workflowInstance instances, one created using the WorkflowRuntime.CreateWorkflow(Type) an another using WorkflowRuntime.CreateWorkflow(XamlReader). I then try to insert the former as a child activity of the first. I had this working on a little prototype but when I tried to incorporate it to my project it didn't work. It thr...

Should I return an array or a collection from a function?

What's the preferred container type when returning multiple objects of the same type from a function? Is it against good practice to return a simple array (like MyType[]), or should you wrap it in some generic container (like ICollection<MyType>)? Thanks! ...

Changing the AcceptButton depending on active control

I have a working WinForm that handles the search functionality in my customer database. It contains the following controls: A textBox where you type your search string (A) A "search" button (B) A DataGridView (C) that returns the result of the search An "OK" button (D) and a "Cancel" button (E) What I am trying to accieve next is thi...

C# Compiler Warning 1685

So, (seemingly) out of the blue, my project starts getting compiler warning 1685: The predefined type 'System.Runtime.CompilerServices.ExtensionAttribute' is defined in multiple assemblies in the global alias; using definition from 'c:\Program Files\Reference Assemblies\Microsoft\Framework\v3.5\System.Core.dll' Perplexed,...

does an MVC Action have to return an actionResult?

Can a so called action in my controller just be a regular function that returns anything I want or does the return of an ActionResult declare whether its an "action" or not? I was wondering if i could call functions in my ActionLink in the "actionname" that didn't return actionresults. thx ...

Format a databound label event

I have Windows Form application and a label which is databound based on a selection from a DataGridView. What I am trying to do is format the label text (which is filesize in bytes) after a new row in the grid is selected. How do I hook this up ? I tried using TextChanged but my formatting function is called twice, once for when the data...