Support ISO_IR 58 in .Net 4.0

There is a double byte character set in DICOM named ISO_IR 58. As far as I can tell the equivalent encoding for this in .Net is gb2312. I am trying to encode ISO_IR 58 characters in 7 bit ASCII for communication between medical systems. In the java w

AutoComplete issue with ASP.NET MVC 5

I created ASP.NET MVC5 project and just added some links to get working autocomplete jQuery plugin. _Layout page <head> <meta charset="utf-8" /> <meta name="viewport" content="width=device-width, initial-scale=1.0&q

Merging the results of two long distance workers at the end

i have two background threads Worker = new BackgroundWorker(); Worker.DoWork += new DoWorkEventHandler(GetQuery); Worker.RunWorkerCompleted += GetQuery_RunWorkerCompleted; Worker.RunWorkerAsync(); Worker2012 = new BackgroundWorker(); Worker2012.DoWor

.NET Automatic include assembly

Not sure if this can be done, but here goes anyways. I've written an N-tier application that's going to be implemeneted by end users. I wanted to expose 1 class only in a Project I called Myapp.client. Now, I want end users to ONLY have to include th

Pop up for the alert

I'm going to ask the end users to clean their cache addresses using Outlook.exe /CleanAutoCompleteCache command in outlook. I can create a batch file and ask them to click on it.It works, but before proceeding they should get pop up alert that runnin

TPL with a distinct filename using Datetime.Now

I am uploading multiple files to a sftp server using tasks. But what is currently happening is that the same "fileName" is being generated when multiple tasks execute in parallel. I want to ensure a distinct filename is generated every time. //S

Need a change on this regex

Im checking some strings with my regex and somehow its not perfect. Im not sure why. I would like to allow string with only these characters: A to Z 0 to 9 . % / {space} + $ So I thought this regex should be enough: Regex("[^A-Z0-9.$/+%\\- ]$")

How to retrieve the xml attribute

I have the following xml in XmlDocument. I am trying to extract the className from it. <Registration className="Eng" type="DirectRegistration" state="Activated" xmlns="http://xyz/Registration"> <Fields>

WF4 repository designer arguments defaults fail to parse

The results from a rehosted designer (WF4) have an issue when adding a default value to an argument. Every other case seems to work fine. This is the (abridged) xaml of a (nearly) empty workflow. <Activity mc:Ignorable="sap" x:Class="{x:

Compare tiff and pdf files using vb.net

I am looking for sample code or a third party tools on VB, .Net environment, which can compare a tiff and a pdf files (visual comparison) and returns true or false. My requirement was to convert tiff files to pdf which i did using iTextSharp, but i n

Authentication against the PHP web service using C #

Here is the sample code for PHP Webservice client that works: $options = array(); $options['trace'] = 1; $options['login'] = 'username'; $options['password'] = 'password'; $client = new SoapClient("http://wsurl.com/pt/wsdl", $options); I would l

Migrating the C # project to .NET 4.0 hidden problems and bugs

Possible Duplicate: Breaking changes in .NET 4.0 What are hidden problems or possible bugs when migrating C# project from .NET 3.5 to .NET 4.0? I have one example on which I lost few hours of debugging to find real cause: String.Trim() removed Utf8 B

Do reference types that pass using ref save memory?

In C#, the parameters to a method can be either reference types or value types. When passing reference types, a copy of the reference is passed. This way, if inside a method we try to reassign the passed reference to another object instance, outside

NHibernate, do not save when the inverse is set to true

I have what seems to be a very simple question but I can't seem to figure it out. If I have a one to many relationship between [Member] and [Mail] If I take off inverse it all works, it's just when I call instance.inverse that it doesnt save. public

Dynamically replace the SQL string with parameters in C #

Has anyone tried to dynamically turn a standard sql string into a parameterized query? In other words, I need to change this: SELECT * FROM customers WHERE name = 'Adams' to this: SELECT * FROM customers WHERE name = @name I've started to work with t

WPF dependency property does not work

I have a custom Dependency Property defined like so: public static readonly DependencyProperty MyDependencyProperty = DependencyProperty.Register( "MyCustomProperty", typeof(string), typeof(MyClass)); private string _myProperty; public string My

What is the function of Silverlight?

What is the function of Silverlight?I'm not sure if that is meant to be ironic, but it is a .NET plugin providing rich media support and full vector graphics (with GPU acceleration) for use in the web. A "Mono" version (Moonlight) is also availa

Very simple JSON serialization in .NET

I have some simple .NET objects I'd like to serialize to JSON and back again. The set of objects to be serialized is quite small and I control the implementation, so I don't need a generic solution that will work for everything. Since my assembly wil

System.IO.Path or equivalent use with Unix paths

Is it possible to either use the System.IO.Path class, or some similar object to format a unix style path, providing similar functionality to the PATH class? For example, I can do: Console.WriteLine(Path.Combine("c:\\", "windows")); Wh

What is a singleton in C #?

Pretty straight forward question. What is a Singleton and when should I use it?A singleton is a class which only allows one instance of itself to be created - and gives simple, easy access to said instance. The singleton premise is a pattern across s

What are the XSLT processors for .NET?

I'd like people's opinion on the "best" XSLT processor for .NET, but what are the good options for processing XSLT in .NET? What do you use and how well does it serve you?If you want XSLT 2.0 then your best bet is probably Saxon. It's written by

Dot.net Single Sign-On Solution - Develop, Fly or Buy?

The problem: We have several dozen one off applications in our environment scattered across a dozen servers. Some apps are secured with one-off form/db based logins. Some apps have permissions defined in web.config. Some apps have folder level NTFS p