.net

How to choose an object relational mapping for .net

(This must be a FAQ, so I expect it to be closed as duplicate, however I can not find a question that contains a good overview of the issues etc.) What should someone consider when choosing an ORM for a .net system? How are the above addressed by the ORM that are in common usage for .net systems. (Witch stack overflow question should ...

fingerprint UFP20.The SDK server side dll

I am using fingerprint reader UFP20. There is a seperate dll called WebSvrMatch.dll for server side usage which is different from client side dll in that it does not reguire fingerprint device to be connected to the comp. The example in Web folder uses ASP/VB , I tried to use it in PL/SQL and C# but in both cases I failed. The WebSvrMatc...

Changing log4net FileAppender whilst logging

Hi guys, We're trying to configure a server process so that, each time it receives a request, it logs that request to a NEW filename. The process is generally single threaded but we cannot guarantee that no other thread somewhere in the code won't sometimes try to write something to log4net. What seemed to be working is: The first tim...

How to know which processes is using a file under ASP.NET?

I'm developing a multi-threaded ASP.NET 3.5 application, during working with some file, I'm getting the following exception : The process cannot access the file because it is being used by another process I'm looking for a way to know exactly which process is locking that file so I can stop its access to the file. OR if that i...

Step-by-step ngen with Wix 3.0

We use Wix to build an installer for our .NET application and are just in the process of porting to Wix 3.0. Our application includes several .NET assemblies (as is the way with .NET applications) and the final installer step is to ngen these. This is important as our application takes about twice as long to startup with non-ngen'ed ass...

Html.ActionLink construct wrong link when a non-mvc route is added

Hi there, I have an application here with a mix of webform and mvc. I specify the routing as below routes.Add("AspxRoute", new Route("Upload/New", new WebFormRouteHandler<Page>("~/Uploads.aspx"))); routes.MapRoute( "Default", // Route name "{controlle...

In click once deployment how does it support client profile?

I am making a click once installer. I checked in prerequisites the .NET 3.5 framework to be installed. Please tell me that if i install my installer in a virtual machine which does not have any .NET 3.5 framework installed then how will it proceed? I tried but when i paste the URL in the browser then it shows me the page cannot be displa...

WPF. Axis system

How to change axis system in the WPF canvas? ...

Why can't I log in with "claimid.com" as an OpenID?

Hi, I need to implement a relying party for Open ID in a load balanced environment. Following the suggestions found here I have tried passing null to the OpenIdRelyingParty constructor. The results are somehow not consistent. If I use www.myopenid.com as a provider it works. If I use www.claimid.com as a provider I get the following...

How to flush pending FileSystemWatcher events?

I need to ensure that all pending FileSystemWatcher events are processed before executing my operation. Is there any way to do this? ...

how to create own MouseButtonEventHandler in WPF

hello, I create MyWindow class derived from Window, and I capture the Window Messages refer nonclient area, for example WM_NCLBUTTONDOWN, it works :). I want create my event and rise them when the message comes. public event MouseButtonEventHandler MouseButtonDownOnCaption; protected virtual void OnMouseButtonDownOnCaption(obj...

How can I get reference count for a managed object?

.NET profilers can show reference count to managed objects. How do they count them? ...

Encrypting/decrypting data to database

I need to create a .NET application that will store some confidential information to the database (e.g. passwords and stuff). I could use symmetric encryption to encrypt these before I store them to database but if someone de-compiles source code symmetric password could be compromised. Since this is going to be service application I ca...

Altova Mapforce: Can it create all elements in the output XSD?

Good Afternoon Developers, Just a quick question (I hope!) I am creating an XSLT file through Altova Mapforce and I was wondering if anyone knows whether it is possible to specify that the XSLT stipulates to create all elements and nodes in the Output XSD file even if there is no Input stipulated from the Input XSD? I know that I can ...

Is it possible to prevent garbage collection at the time it was called?

I want to implement some reusable object pool. Also I don't want to have API that puts the object back to pool when it is not needed. I want to use garbage collector to inform me that it is going to remove the object because it has no references, so that I could stop the object from being garbage collected and put it back to the pool. ...

Itextsharp Display data in two columns in a single row

I have a datatable containg address of users... I converted it to pdf using Itextsharp and now my requirement is i want to display one user's name,address in one column and another user's name and address in another column... In one row there must be two columns only how to do this using ItextSharp... ...

couldn't access registry HKLM keys

couldn't access registry HKLM keys from windows xp limited/guest user accounts public int GetEnabledStatus() { RegistryKey hklm = Registry.LocalMachine; int Res; try { RegistryKey run1 = hklm.OpenSubKey(@"Software\Microsoft\Windows\myApp", true); hkcu.OpenSubKey(@"Software\Microsoft\Windows\myApp", true); Res = in...

WPF Datagrid RowDetailsTemplate visibility bound to a property.

Hi, I am using a WPF Datagrid with a RowDetails panel where the RowDetailsVisibilityMode is set to "VisibleWhenSelected" and the SelectionMode="Extended" so that multiple rows can be selected and hence display RowDetails, as below: <dg:DataGrid x:Name="MyGrid" ItemsSource="{Binding Path=MyItems}" AutoGenerateC...

C#: public method{get{} set{}} question

I'm not entirely sure if I have all the terminology correct so forgive me if I'm wrong. I was wondering if it would be possible to send an argument(s) to the method. Take the following for example. public item (int index) { get { return list[index]; } set { list[index] = value; } } I know that as it is, it will error. ...

My Domain objects are not modifiable; can I use NHibernate effectively with them?

I'm attempting to work with a legacy system which already has well-defined domain objects. I would like to use NHibernate as the ORM for some of these objects, but since I cannot modify the objects to allow their methods to be overridden by NHibernate, normal techniques for lazy-loaded objects wont be viable. Are there any alternative a...