.net

Precautions when developing ASP.NET application on x86 computers but target computer is 64 bit (Windows Server 2008)

We have to deploy our application on a Windows 2008 64 bit server. As the application is already running for over one year on a Windows 2003 server installation, we know everything is working fine. We are still developing on Windows XP. But installing it on a Windows 2008 64 bit system make me feel a little bit uneasy. So are there any...

WPF owner window on top of child window

Is it possible for Owner window in WPF be on top of Child window when you click on it while Owner window is below Child window? here is example how I call child window: Window2 window = new Window2(); window.Owner = this; window.Show(); Parent/Owner window will always be under child window. ...

AES 256 encryption

Hi, I am using AES 256 to encrypt/decrypt some plain text. But the algorith uses only PKCS7 for padding, but I need to use PKCS5 to make it compitable to other platforms. How can I acheive this? My source code is: public string Encrypt(byte[] PlainTextBytes, byte[] KeyBytes, string InitialVector) { byte[] InitialVectorBytes = Encoding...

What happens to a DLL in debug mode inside a web application with debug=false?

I understand that debug=true is a bad thing on any production server. I am currently using some dll's that are from a third party and were compiled in debug mode and wanted to know - What happens to a DLL in debug mode inside a web application with debug=false? ...

SMTP error for sending an email?

I am getting following error while sending an email from the contact us form of a website System.Net.Mail.SmtpException: Cannot get IIS pickup directory. at System.Net.Mail.IisPickupDirectory.GetPickupDirectory() at System.Net.Mail.SmtpClient.Send(MailMessage message) at UICBLL.Mail.MailSettings.SendMail(String ToAddress, Strin...

DataGridViewComboBoxCell takes several clicks to bring up menu for another cell. Advice on speeding up the process?

Hi, In order to bring up the menu for a DataGridViewComboBoxCell, I first have to click: 1) the row of the cell I want to edit 2) within the cell I want to edit 3) the I want to edit again, in order to open the ComboBox for the cell. If another cell is already selected, the first click will close the already-active ComboBox, then 3 more...

Avoiding control paint spam (during the heavy update of treeview, listview controls)

I've got an application which adds 10+ items to a treelist every second. This causing the control and UI to unresponsive and sometimes can't even paint it enough, also consumes a lot of CPU. These new items coming from different threads so I can't use .BeginUpdate() unless I do some sort of local caching. If I do BeginUpdate() and EndU...

.Net: how to create vendor independent Dataset, Tableadapters, bindings (DB decided at runtime)

I have a C# Windows Forms application, whose prototype was created on SQL Server (strongly-typed dataset). In its final version, the application must be able to work over SQL Server, MySQL or Oracle. Now I am wondering which parts (if any) can be reused from the prototype. 1. Dataset (typed) ? 2. TableAdapters? (probably not, they conta...

Key-value database for .NET

Is there a good, scalable key-value database for .NET? Something like BerkeleyDB or Tokyo Cabinet? Specifically, it should allow to store large number of entries, which are mostly binary blobs. I'm fine if it is just a C-wrapper around some native database, as long as binaries for Win x86/x64 and Linux are available. Of course, a purely...

Force a Different Thread to Sleep

So I have a program that serves as a sort of 'shell' for other programs. At its core, it gets passed a class, a method name, and some args, and handles the execution of the function, with the idea of allowing other programmers to basically schedule their processes to run on this shell service. Everything works fine except for one issue...

How can I sign an assembly that reference unsigned COM interop assemblies?

When I try to sign the assembly I get the following error: Error 1 Assembly generation failed -- Referenced assembly 'comlib' does not have a strong name Is it possible to sign an assembly that reference unsigned assemblies or do I have to sign the COM interop assemblies as well? ...

.NET and COM (ActiveX) objects perspective

We are using a software library from a major US manufacturer. For years the library had mainly two interfaces, a bunch of C API DLLs and a collection of ActiveX controls which encapsulate the DLL functionality. The ActiveX interface worked pretty well back in the old days of Visual Basic 6. Then .NET appeared with it's COM Interop compat...

Page contruction times in ASP.NET MVC and WebForms

I want to display at the bottom of my pages a simple "built in x.yz seconds" text, to easily check various options. (some pages are built using parameters entered in a previous page by a "regular" user, who would like too to see the results of his decisions) I know I can use traces in asp.net, but it's not very user-friendly, and I fear...

dot net:i need to parse pdf file to get each article with its title?

i want to parse pdf file such that i can identify each article's title and its description.so that i can store title text and descriptiontext in cache for search purpose.is there any library or tool for this? ...

.Net unicode problem, vb6 legacy

Hi, I have a decryption routine in VB6. I now want the same decryption in C#. The strings that need decryption are in unicode, so I use Encoding.Unicode.GetString to read the input in C#. The input now looks exactly the same as in VB6. The first few characters in the loop are decrypted ok! Then I encounter a difference... The program ...

How do I generate COM interop proxies into C# source code?

This questions is a follow up on an answer by Paul Alexander to the question "Should interop assemblies be signed?". Depending on how complex your Interop assemblies are - you can generate the proxy code into a separate .CS/.VB file and compile it directly into your assembly. Then you won't have to worry about strong name issues. H...

using And in predicate for lambda expression

Hi how to use "And" in predicate in lambda expression. I am trying to achieve something like this new Class1("Test",Status => Status == 18 && 19 && 20) Please reply Thanks Sharath ...

Linq-to-SQL: binding ListView

Hi all, I'm struggeling for quite some time now with binding my ListView to a table. I've read various solutions, but I keep running into trouble. I have 2 database tables: Customers and Products. For each Customer there is a list of Products. In my first attempt I bind to the generated Linq-to-SQL code. That means I binding immediate...

Why is NHibernate doing an Update when I Databind?

I'm starting to play with NHibernate to make a case for its use in our company's projects. I've created a branch of one of our solutions and have started to convert some of the data access to using NHibernate as a proof-of-concept. However, while looking at SQL Profiler, I discovered that NHibernate is issuing an update command to the d...

F1 help in XBAP

Hi, I understand Stack Overflow is the place for really specific questions that only a couple of people would be interested in so here goes... I have an application which is deployed as an XBAP which contains some embedded WinForms popup modal dialogs - it's a combination of legacy code and some new stuff and we don't have time for a co...