.net

How might I set up data plumbing for Silverlight to MySQL in my situation?

In short: What is a good method for setting up read-only data access from Silverlight to a MySQL database? Here are the details of my situation: I'm currently trying to set up a Silverlight application to present data from a MySQL database. Currently, I need to set-up read-only access to the MySQL database (I may set up other tables ...

Unbound column value disapears from DataGridView on sort

I have a DataGridView bound to a DataTable (it was bound to a List(of T) but the DataGridView is much more performant). I add an extra DataGridViewLinkColumn to the DataGridView (the value of this column is set to equal the value of one of the bound columns, I just need it to show as a link). The problem is when I sort the DataGridView...

Determine Child Processes for Thread or Appdomain

I'm using a 3rd party assembly to do some processing, and it spawns 2 child processes to perform some work. I'm running this in a separate thread. I want to be able to cancel the processing if it runs for too long - my problem is that if I abort the thread the spawned processes are still running. Is there a way to determine what proces...

How to get rid of exceptions thrown by the .NET Framework

In a recent project I'm using a lot of databinding and xml-serialization. I'm using C#/VS2008 and have downloaded symbol information for the .NET framework to help me when debugging. The app I'm working on has a global "catch all" exception handler to present a more presentable messages to users if there happens to be any uncaught exce...

Most suitable .net Timer for a scheduler

We've identified a hotspot in our code using CCR timers. It appears that if we enqueue many thousands of timers that the code suffers terminal slowdown. The fix is to choose the soonest scheduled item and enqueue a timer for this event. When it fires, we repeat. In this way, we're only ever enqueueing one timer interval at a time. What...

C# Client - Perl server - File Path Case Sensitivity

We have a C# .Net client application that sends some commands via REST over HTTP. The server is on a Linux machine written in Perl. These commands contain file paths located on the server that can be entered by the user. Since the users are on windows, we'd like for them to be case-insensitive, but this is giving us some issues in loc...

Getting class type from WCF service

In my client, I'm trying to declare an entity type from the service.... MyService.MyClass myClass = new MyService.MyClass(); .... MyClass isn't available. The assembly MyClass is within is referenced by MyService. What am I missing? ...

XAML Editor hangs for 4-10 seconds driving me mad

I know similar questions exists but they don't address this exact problem. I'm having an issue with Visual Studio 2008 SP1 whereby it hangs for 4-10 seconds whenever the xaml edit receives focus. It is literally driving me to despair and I'm about to move back to Winforms. Note - Just editing the straight up xaml (i.e no designer enable...

Creating Func<...> and Action<...> lambda support for projects targeting .NET Framework 2.0

Place the following in a core assembly: public delegate TResult Func<TResult>(); public delegate TResult Func<T, TResult>(T arg1); public delegate TResult Func<T1, T2, TResult>(T1 arg1, T2 arg2); public delegate TResult Func<T1, T2, T3, TResult>(T1 arg1, T2 arg2, T3 arg3); public delegate TResult Func<T1, T2, T3, T4, TResult>(T1 arg1, T...

NetUserModalsGet() returns strings incorrectly for C#.NET

EDIT: Yet another followup at http://stackoverflow.com/questions/1799742/shouldnt-netusermodalsget-tell-me-what-domain-a-machine-is-part-of-and-where Thanks to Gonzalo's help, I'm able to use the NetUserModalsGet() from C#. But there's still some kinks: the string members (usrmod1_primary and usrmod2_domain_name) come out messed up. Her...

How to connect to an SQLite(CE) database on a windows mobile phone?

Hi I want to make a database for my mobile 6 cellphone app. What I did was in visual studios I went to my project name and right clicked on it, went to add -> add new item -> data -> choose datafile. It created a database file called "AppDatabase1.sdf" Now I want to connect to my database but I don't know how what the connection strin...

.Net Application Hangs on Unpatched XP Machines

I'm developing a .Net 2.0 application using DevStudio 2005 and running on a Windows XP machine. On my machine, which is up to date with all the automatic updates, the release version runs OK. If I run the application on a vanilla XP SP2 machine (i.e. freshly installed OS with no updates) it hangs with 99% CPU usage. It's hanging at the p...

Can lambdas be used without Linq?

I'd rather not use Linq if I don't have to (I remove references to it when I start a new project). Lambdas look useful, though. I'm not going to get in the habit of using lambdas, however, if Linq has to tag along for the ride. Thanks in advance ...

to start coding in C# for eToken

Newbie request for advise. I have a task to develoop C# (VB.NET) service class (library) for storing/extractin user's passwords in/from Aladdin eToken devices. Advise me any: walkthroughs, tutorials forums, discussions code sample(s), examples I googled but couldn't find anything helpful for starting coding. "eToken PKI Develop...

Double postback causes SelectedIndexChanged to fire which fires AutoPostback

I have a Gridview in a UpdateTemplate. I have four template fields in the four different columns. Each TemplateField has an UpdatePanel with a control in it. All the columns are sortable and the Gridview is page-able. Three of the template fields has DropDowns in the UpdatePanel and one has a Textbox, all these controls have AutoPostBack...

TimeZoneInfo, if a timezone changes in the world, how quickly will microsoft roll out an update

I'm just wondering what happens in the case of a time zone changing, when your product is using .net. Is all you can do wait for Microsoft to update .net or write your own system for handling it? I'm assuming this stuff doesn't happen very often, but is this an example of why a close system may not be a good idea? ...

Custom table component in .net

How do I create a custom table in C#, where i'd be able to set up row titles? Is there a built-in component to do that? I'm currently migrating from Delphi, where there was a StringGrid component. So I wonder if there's such equivalent in .net. As for now, I've tried to play DataGridView, but as far as I understood, it lacks row heade...

How can I ignore a property when serializing using the DataContractSerializer?

I am using .NET 3.5SP1 and DataContractSerializer to serialize a class. In SP1, they changed the behavior so that you don't have to include DataContract/DataMember attributes on the class and it will just serialize the entire thing. This is the behavior I am using, but now I need to ignore one property from the serializer. I know that...

Recommended .NET PDF Renderer for multiple pages with form fields

We currently use TallComponents PDFKit.Net for rendering tedious state documents that have a number of form fields. Often we'll need to have a page that repeats many times within a single document. Most reports are 10 pages, with 3 unique template pages (pre formatted in Adobe), for example. We've worked with TallComponents to optimiz...

xml element name with colon

I'm working against a 3rd party xml api. They have defined a required xml structure similar to the following. <ns1:E xmlns:ns1="schema"> <ns1:B> <ns2:S> <ns2:V> <ns2:Bl /> </ns2:V> </ns2:S> </ns1:B> </ns1:E> There is a SQL table with the information that I need to put into this xml format. I have a LINQ to SQL adapter to ge...