.net

Synchronisable CRM System

Hi, I need to develop a CRM system which will allow users to have a local copy of the DB which can then be synched with the main server system. The idea is that a sales team can travel to non-internet enabled areas and still operate with relatively up to date information and then synch up when they get back to the office. Ive never don...

Reg-Free COM not working for me.

Hi all. I am trying to see if Reg-Free COM is something we can use in our web application to ease deployment of legacy COM components. However, before I get onto looking into things like using it for Interop situations, I can't get a simple test to work. Here's what I have done :- 1) Create a new VB ActiveX DLL project. Left all option...

Why does global.asax change sql connection?

In asp.net 3.5, I have a problem that if I upload my global.asax to the remote web server, the app starts looking for my local sql server and eventually times out. I use a different config file for the local and remote because of the sql server login. Local is windows auth and remote is sql server auth. However, none of that info is ...

SSCLI for .Net Framework 3.5

Hi, Is there a SSCLI equivalent for .Net Framework 3.5? Something that can be debugged and stepped through. Kind regards. ...

How can I find methods without an explicit access modifier?

I am using FxCop and I would like to find all the methods or variables without an access modifier explicitly defined. For example: class MyClass { int myInt = 0; internal MyClass() { } } I would like FxCop to warn me that I didn't specify what access modifier will be applied to the variable "myInt" or the class "MyClass"....

Can Castle Windsor locate files in a subdirectory?

I have a rich client application that uses Castle Windsor. At the moment all the assemblies including the application exe are in the one folder but it all looks rather untidy. I would like to put my dlls inside a subfolder such as "bin" but this prevents Castle from locating types etc when called upon. In fact the app crashes at start up...

Why would Visual Studio/CLR produce a "bad" executable?

This is a weird problem I have started having recently. My team is developing a COTS application and we have a few people with their hands in the code. A few weeks ago, I received an error message when trying to debug (and run the compiled EXE): "Windows cannot access the specified device, path, or file. You may not have the appr...

String.Format (format,date) is ignoring format

Not sure what's going on here. I have a DateTime object, and when I try: String.Format( "{0:dd/MM/yyyy}", _date) the value returned is: "24-05-1967" What I want is "24/05/1967" Can anyone explain why my format string is being ignored? A bit more background: This is a web app which started out life as .net 1.1, and I'm in the ...

Why is this a "so close yet so far" if statement?

I am working on an If statement and I want to satisfy two conditions to ignore the loop. This seemed easy at first, but now... I don't know. this is my dilemma... if((radButton1.checked == false)&&(radButton2.checked == false)) { txtTitle.Text = "go to work"; } The dilemma is "go to work" is not executed if radButton1 is false a...

Fluent NHibernate, joined-subclass mapping

I'm trying to map a joined-subclass scenario using Fluent NHibernate. I have a class Entity defined in the namespace Core, and a class SubClass : Entity in the namespace SomeModule Now I obviously don't want class Entity to know about its derived types, the SomeModules namespace references Core - not the other way around. All the examp...

Strange Error in .net Application. - RijndaelManaged..

During a recent load test, I've been getting some strange "Index Out of Range Exception" Stack trace: at System.Security.Cryptography.RijndaelManagedTransform.DecryptData(Byte[] inputBuffer, Int32 inputOffset, Int32 inputCount, Byte[]& outputBuffer, Int32 outputOffset, PaddingMode paddingMode, Boolean fLast) at System.Security....

What is the difference between the KeyCode and KeyData properties on the .NET WinForms key event argument objects?

The two key event argument classes KeyEventArgs and PreviewKeyDownEventArgs each have two properties, KeyCode and KeyData, which are both of the enumeration type Keys. What is the difference between these two properties? Do the values in them ever differ from each other? If so, when and why? ...

Transparent Window (or Draw to screen) No Mouse Capture

Hi, In an app I'm coding I would like to make an alert message to appear that displays a large semi-transparent warning message without affecting the users work. Basically I will fade in the message but never set it's opacity to 1 and I want the user to be able to click 'through' the message as if it isn't there. I have started by usi...

Fetching pictures from the net and displaying it sequentially

I want to create a scrollable list of pictures fetched from the internet and give the user the ability to click on it. How do i go about doing it in WinForms/C#? Is it possible to add picturebox control/ controls to the listBox? I tried adding a list of picturebox into UserControl with AutoScroll set to true, which will give me a feel l...

Basics of SharpZipLib. What am I missing?

I have the following method in my code: private bool GenerateZipFile(List<FileInfo> filesToArchive, DateTime archiveDate) { try { using (ZipOutputStream zipStream = new ZipOutputStream(File.Create(GetZipFileName(archiveDate)))) { zipStream.SetLevel(9); // maximum compression. byte[] buffer...

How to identify the GC Finalizer thread?

I have a .NET (C#) multi-threaded application and I want to know if a certain method runs inside the Finalizer thread. I've tried using Thread.CurrentThread.Name but it doesn't work (returns null). Anyone knows how can I query the current thread to discover if it's the Finalizer thread? ...

Chunked Encoding Implementation in .NET (or at least pseudo code)

I wrote a raw TCP client for HTTP/HTTPS requests, however I'm having problems with chunked encoding responses. HTTP/1.1 is requirement therefore I should support it. Raw TCP is a business requirement that I need to keep, therefore I can't switch to .NET HTTPWebRequest/HTTPWebResponse However if there is way to convert a RAW HTTP Request...

Reasons to have an absolute path in .NET

We're trying to decide between having all the devs on a particular team to use an absolute path for their code base or if relative paths are fine. One reason I can think for an absolute path, meaning everyone has the same path, is because of IIS and functional tests. Our asp.net functional test use Nunit and WatiN to fire up IE and go ...

Converting Raw HTTP Request into HTTPWebRequest Object

In .NET is it possible to convert a raw HTTP request to HTTPWebRequest object? I'm sure .NET internally doing it. Any idea which part of the .NET is actually handling this? Can I call it or is there any external library which allows raw HTTP connections? ...

BindingList and LINQ?

I am new with Linq and I would like to sort some data that are in the BindinList. Once I did my Linq query, I need to use back the BindingList collection to bind my data. var orderedList = //Here is linq query return (BindingList<MyObject>)orderedList; This compile but fail in execution, what is the trick? ...