.net

LINQ to SQL with too many records for memory

A lot of the LINQ to SQL that I've been doing involves reading data from a table and then calling the ToList() extension method and using the data in memory. However, I now want to use LINQ to SQL to process more records that can fit in memory. This is the pattern that I've come up with so far: int skip = 0; IList<Record> records = new ...

Which .NET JSON serializers can deal with NHibernate proxy objects?

Which .NET JSON serializers can deal with NHibernate proxy objects? I tried using JSON.NET but it craps out when it hits a proxied object. ...

Deadlock in WinForms that can be solved by right click on the taskbar

I encountered a strange problem with our Windows C# / .NET application. Actually it is a GUI application, my job is the included network component, encapsulated in an assembly. I do not know the code of the main/GUI application, I could contact it's developer though. Now the application's UI has buttons to "Start" and "Stop" the network...

Binding-Target never gets set in custom objects declared in *.resources; binding evaluation fails

I have a xaml view like this: <Tv:TvPanel xmlns:Tv="..."> <Tv:TvPanel.Resources> <Tv:Parameters x:Key="parameterList"> <Tv:ParameterDefinition ParameterName="MyParam" InitialValue="123abc"> <Tv:ValueBinding Value="{Binding ElementName=myTextBox, Path=Text}"/> </Tv:ParameterDefinition> </Tv:Parameters> <Tv:TvXmlDataPr...

Get the current UserProfile path from within a Service

Hello, I wrote some code to detect a users proxy information. This works when I run the program directly, but it doesn't work if the program from being called by a service. The service isn't able to know the current users folder path to grab the users Firefox settings. The program needs to be run by a service... how can the service ge...

Is it possible to set a page specific cookie?

I know it is possible to set a cookie for a path such as "/" or "/folder/", but is it possible to set a cookie for a specific page, such as "/folder/page.html"? ...

How can I index HTML documents?

I am using Lucene .NEt to do full-text searching. Till now I have been indexing PDF docs, but now I have a few webpages that I need to index. What's the best/easiest way to index HTML documents to add to my Lucene index? I am using .NET/C# ...

Unique set of strings in C#

I have a list of strings, I need to be able to simply probe if a new string is in the table or not. When the list is large, testing a simple list directly is pretty inefficient... so typically I use a Dictionary to get constant lookup speeds, although I don't actually care about the value. This seems like a misuse of a dictionary, so I'm...

How to create an multidimensional array in VB.NET or PHP

I have a data set that is setup for comments. I have levels and a sort column but now I would like to either get this in an array or display it somehow in a meaningful way: id comment Parentid Level sortcol 2 Test NULL 0 0x00000002 4 This is the Second NULL 0 0x00000004 5 First Reply ...

Performance of Image Proxy

I'm not good at putting up a question, feel free to reword/retag this to make it more understandable. Thanks. I have an image proxy page helps me handle all requests to images of product with custom manipulation values. For example: http://mysite.com/ImageProxy.aspx?id={ITEM ID}&width={WIDTH}&height={HEIGHT}&gloss={GLOSS}&reflection={R...

Changing UI elements from another thread in .NET

I don't get it. If I want to change the text on a button from a thread other than the UI thread in Visual Basic .NET, I need to use a delegate, and do something along the lines of Private Delegate Sub SetTextDelegate(ByVal TheText As String) Private Sub delSetText(ByVal TheText As String) Button1.Text = TheText End Sub Private...

Free Schema Export for SQL Server 2008?

Not sure if this belongs here or on ServerFault, but I wonder if someone knows a free tool to export a SQL Server 2008 Schema? It's only for Tables and their Indexes, Foreign-Keys etc. and it needs to be a command line tool to run as part of a build process. If it can read a .net connection string, that would be awesome (hence the .net t...

.NET Frustration - Process.GetProcessById Returns New Reference

I'm writing a c# program that will launch many child processes. At some time later on, I'll need to retrieve those processes by ID and then match those processes to a set of processes stored in a Dictionary that were added to the Dictionary when they were first created. However, I'm running into a problem that seems like pure ridiculou...

Why does the OutOfMemoryException get thrown?

What reasons cause the .NET runtime to throw an OutOfMemoryException? The garbage collector's job is to clean up memory and free memory as necessary before allocating objects; why would it appear to be out of memory? ...

Can NHibernate, Subsonic or L2S do Per-Entity Auto-Increment?

I have a SQL Server 2008 database with a composite key: ProjectID (GUID) and TaskID (int). ProjectID is a foreign key to a Projects table. I want to have TaskID Auto-Increment, but restart for every ProjectID (that is: every projectID should have 1,2,3,... as TaskID). To my knowledge, this is not possible in SQL Server out of the box, a...

Text to MP3 using System.Speech.Synthesis.SpeechSynthesizer

I am trying to get a text-to-speech to save to an MP3. Currently I have the System.Speech.Synthesis speaking to a WAV file nicely. With New System.Speech.Synthesis.SpeechSynthesizer '.SetOutputToWaveFile(pOutputPath) This works fine .SetOutputToWaveStream(<<Problem bit>>) .Speak(pTextToSpeak) .Se...

Maintaining the size and position of the Control in the form

I want to maintain size and position of the control relative to its container eg,size and position of the richtextbox in the form should be maintained when form resize. ...

.NET, Fail to post form by HttpWebResponse

i want to post the form with defined data, but it fails. If login success, the CookieContainer should contain a "username" field. I have used FireBug + firefCookie to browse the responsed cookie,it haven't that. And browse the responsed HTML, it don't say i am login incorrect.. one more thing i conside is the field name of post data,...

Application with Lucene.net on server

Hello everybody, i have a strange problem with my webapplication, it works on local host but not on our Server after reducing the code to a minimum there's a runtime error by declaring: Dim directory As Lucene.Net.Store.Directory = FSDirectory.GetDirectory("\1[...]9\search\Start\luceneindex") i also tried other paths like 127 or just ...

.NET Library for exporting PDF pages to a images(jpg or png)

Hello guys, Can anyone point me to a .net library that is capable of exporting a PDF document to a set of images, where each image represents a page from the original PDF file. Any suggestions would be highly appreciated! Best Regards, K ...