.net

Is Windows Workflow widely used?

I read a bit about the overall idea of this technology but it reminds me of a few decades ago when we were told "in the future you won't write code, you'll connect boxes in some graphical tool". Is it a technology which has become central in .NET development (like WCF and WPF have) or has it failed to catch on? ...

Using SimpleSession Storage in a WPF/Winform/WindowsService Client project

Hi guys, There is a requirement for a WPF client and Windows Service for an existing S#arp Architecture project and I was wondering what ISessionStorage to use? I have used SimpleSessionStorage in some of my integration tests already and the Northwind sample test project also use the same in MappingIntegrationTests. I have also heard th...

Using LINQ to SQL to search entire database

Is it possible with LINQ to SQL to search the entire database (obviously only the parts that are mapped in the .dbml file) for a string match? I'm trying to write a function that will take a string of "Search Term" and search all mapped entities and return a List(Of Object) that can contain a mixture of entities i.e. if I have a table "F...

.NET LicenseManager license embedding for redistributable components

Hi all, We are trying to use the .NET LicenseManger/Provider for our own custom component. However, it seems that this can't really be used if the licensed control will be wrapped in a 3rd party user control itself, since the saved license is always embedded in the control assembly in that case, which would force the consumer of that co...

IEnumerable without data

If I have a method or a property that returns an IEnumerable<SomeType> that leads to no data, is it more efficient to return an empty array new SomeType[0] or is it better to return an empty list new List<SomeType>() or is there an even better solution (IMO building an own type with generics could be such a solution but it seems to me a ...

.NET GUI freezes when big load of data

Hi, I'm a junior developer using .NET framework. I'm dealing with an issue because my GUI freezes when I run my application with big load of data. I have a grid an a sort of output text box to log strings. The grid has a row for every message expected to arrive. Then, the application receives messages and the grid updates a cell in ...

Is there a pattern to synchronize data lists over network?

I've got a server app that offers data to a number of clients over network. You can imagine the data as a huge list of strings. The data on the server may change and need to be synchronized on all clients. I'm currently using this approach: On initial connection, a client app requests all current data (which may be a lot of bytes). Then...

Comments on a very bad idea

I got an really bad idea :) When exploring extension methods in vb I suddenly thought what about making an extension method on string to execute data access code. <Extension()> Function Execute(ByVal s As String) As Data.DataTable 'make code here to access the database .. 'read connectionstring from the .config file End Function ...

How to deploy files with a clickonce application?

I have some files, sound files (.wav and .mp3) and text files (.rtf), in my bin\Debug folder during coding, but after publishing they are nowhere to be found. My application can play sound files and these are the default sound files that are supposed to be installed with the application in the Application.Startup path. The text *.rtf f...

How to retrieve data from the DB for recursively binding a jquery treeview using asp.net mvc

I have a table structure like this. id | Name | ParentId so for example: id | Name | ParentId 1 | Alice | 0 2 | Bob | 0 3 | Charlie | 1 4 | David | 2 where 'Alice' and 'Bob' are Parent nodes( which has Id = 0) and Alice has a child node named 'Charlie' and 'Bob' has a child node named 'David'. My question is...

How to do event driven programming in C#.NET?

How do you make a event-driven program where the execution of the main flow is suspended whenever an event is raised and handled, until the event handler finishes? I created the following program using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Timers; namespace EventTest { class P...

WebClient UploadValues hangs

Hi, I'm trying to use WebClient to call a url and get the response. My problem is that this code hangs when calling the wc.UploadValues method. Dim wc As New System.Net.WebClient Dim myValues As New NameValueCollection() myValues.Add("Parameter", "Value") Dim responseArray As Byte() = wc.UploadValues("https://opensms.movistar.es/aplicac...

Entity Framework switching between models

Hi, There is a legacy application in my company which is still in use. I am in the middle of porting it to asp.net (using mvc framework) and also have to create new functionality. Because it's in use I have to develop it on top of existing database, which was developed really badly (not all relations exist, triggers used instead of rela...

Wix: Copy files in Custom Action to Programm Directory ( Windows 7)

Hi, in our project we want to copy 2 files, which are not included in the *.msi file. Therefore i created a managed custom action which copies the files using File.Copy(). The files should be copied to my installation dir, which is somewhere under C:\Program Files\... With Windows XP everything works fine. But in Windows 7 their is a p...

Improve performance of a regexp

My software allows users to use regexp to prepare files. I am in the process of adding a default regexp library with common expressions that can be re-used to prepare a variety of formats. One common task is to remove crlf in specific parts of the files, but not in others. For instance, this: <TU>Lorem Ipsum</TU> <SOURCE>T...

data contract issue wcf

hi all, i have a problem regarding data contract in my application. i have 5 tables in my database and i required 3 of them as datatype. so i created a class and decleared all required table as class under [datacontract] here's the code [DataContract] public class CustomerDetail { [DataMember] public int Custome...

open source C# proxy server - any projects/examples?

Anyone know of any open source C# proxy server projects? Otherwise any articles/tutorials that cover how to use C# classes to get proxy server basic functionality working (in particularly for HTTPS requests) The only one I have found so far (and I will look at) is: http://www.mentalis.org/soft/projects/proxy/ ...

WPF DocumentPaginator and DocumentPage unexpected cropping

I'm trying to print a WPF canvas over multiple pages. I'm perfectly happy with scaling it to fit on the page width, then clipping and translating the canvas for each page; all pretty simple maths. What I don't understand is how I get the dimensions of the printable area, and how to tell the printer where to print to. Whatever I try it ...

How to encode some frames into Key frame + dependable frames?

How to encode some frames into Key frame + dependable frames? From C#, using some thing like FFMPEG or its wrapper or sending data from my app using pipe to FFMPEG...? So I create RGB (or I can provide BGR etc) frames - 100 for example. from them I want to create some H264 or onVP8 peace of video data. Is it possible, how to do it? ...

Tree view visible in win XP but not in Windows 7

hello every one..... i have a problem in .net web application... i have created a tree view which runs perfect on windows XP but as i try to run this application on windows7 the tree view is not displayed/visible . i could not able to find the solution so please give me the solution... thanks in advance.... ...