.net

Deploying .NET components (upgrade the component for only a single client application)

I use Visual Studio .NET to create a component that will be shared by two client applications. Eventually, I plan to deploy new version of this component. However, not all of the new versions will be compatible with both client applications. When I deploy component and the client applications, I must ensure that I can upgrade the compone...

Limiting the number of threads executing a method at a single time.

We have a situation where we want to limit the number of paralell requests our application can make to its application server. We have potentially 100+ background threads running that will want to at some point make a call to the application server but only want 5 threads to be able to call SendMessage() (or whatever the method will be)...

DRM for videos bundled with a desktop app?

Hey everybody, So, I have this desktop app built using WPF and C#. It's basically an offline course system that has videos, quizzes, and other assorted content. My dilemma is that I don't know how to protect the videos once they are downloaded and installed on the users machine? Are there any DRM systems out there that I can look into? ...

CMS/E-commerce asp.net project: one database or multiple databases?

Hi, I'm currently working on an C#/ASP.NET project that will host several differents e-commerce websites, all running in the same application. I use LinqToSql (moving to PLINQO soon) to access my database. The database contains both informations on the website structure (pages, ...) and the products/orders/users data. My question is,...

Display Image in Crystal reports Using URL

I want to show image in a crystal report. Scenario is something like this. I have a database where my path of an image is persisting. eg ftp://Images/1.jpg Now i want to repeat this image in a crystal report. When i fills my datatable it shows me complete url. When i displays this field in GridView i uses imageBox to display my image...

c#/.Net Unzip a file with Zlib1.dll

Hi Is it possible to extarct a ".zip" file using Zlib1.dll in the c#/.Net? Regards Raju ...

XmlSerializer constructor error with class derived from a base class

Hi @all the following code specifies a type "MyBase64Binary" which is derived from a base class "TestBase" using System; using System.Xml.Serialization; using System.Collections; using System.Xml.Schema; using System.ComponentModel; namespace Test { public class TestBase { public TestBase() { } } ...

UDP receiver with background threads

Hi, I am writing a UDP receiver using UdpClient class. IPEndPoint broadcastAddress = new IPEndPoint(IPAddress.Any, Settings.Default.SenderPort); UdpClient udpClient = new UdpClient(); udpClient.Client.SetSocketOption(SocketOptionLevel.Socket, SocketOptionName.ReceiveBuffer, 102400); udpClient.Client.SetSocketOption(SocketOptionLevel.So...

SVD algorithm implementation

Does anyone know good scalable implementation of SVD on C# for very big matrix? ...

Using .net Datetime in sql query

I have a DateTime object I want to compare against an sql datetime field in a where clause. I'm currently using: "where (convert( dateTime, '" & datetimeVariable.ToString & "',103) <= DatetimeField)" But I believe datetimeVariable.ToString will return a different value depending on the culture where the system is running. How would ...

NHibernate exception "Session is closed! Object name: 'ISession'."

Hi, I am getting the folloinwg error from NHibernate: System.ObjectDisposedException: Session is closed! Object name: 'ISession'. at NHibernate.Impl.AbstractSessionImpl.ErrorIfClosed() at NHibernate.Impl.AbstractSessionImpl.CheckAndUpdateSessionStatus() at NHibernate.Impl.SessionImpl.FireSave(SaveOrUpdateEvent event) at NH...

How can I differentiate between the .net WebBrowser component and an actual browser?

OK, so we have an online downloads store accessed via our software. Recently we've had requests to allow downloads via normal browsers and it's fairly easy just to slap a download page on. The problem is that it would be confusing to people having two download links, one for the software and one for their web browser, so we want to diffe...

Image control with pan and zoom ability

I am looking for a free .net winforms control which is able to display images. PictureBox isn't a solution because you have to implement all pan&zoom events yourself. The control should be able to display images like 4000x5000 pixels, have zoom and pan buttons. ...

Alternatives to Inflector.Net

I want to use inflector.net in my project. Just googled and it seems to have gone. :-< http://andrewpeters.net/inflectornet/ Are there any alternatives? ...

In .NET, will cleaning a nested dictionaries parent release all memory upon garbage collection?

I have the following nested dictionaries: Dictionary<int, Dictionary<string, object>> x; Dictionary<int, SortedDictionary<long, Dictionary<string, object>>> y; If I do x.Clear() and y.Clear() will all the nested objects clear and all the memory will be reused on the next garbage collection? Or do I need to iterate on all the items ...

Draw or create databound UserControls dynamically at runtime in WPF

I'm trying to createa time-tracking application in WPF. The user is supposed to draw elements that represent a timespan (timespan = bar) onto a Canvas. Now, exisiting bars are added when they are databound to a collection (each collection item contains the width and left position of the bar on the Canvas). The 'bar' Usercontrol has a de...

can we use sequence activity inside fault handler ?

I have a situation where i need to do some rollback in fault handler activity ? When i put Code activity inside fault handler it works , but when i put Sequence activity or custom activity derived from CompositeActvity , it does not execute. Please help me in this ? ...

Cannot create instance of abstract class

I am trying to compile the following code and i am getting the error: Cannot create instance of abstract class . Please help m_objExcel = new Excel.Application(); m_objBooks = (Excel.Workbooks)m_objExcel.Workbooks; m_objBook = (Excel._Workbook)(m_objBooks.Add(m_objOpt)); m_objSheets = (Excel.Sheets)m_objBook.Worksheets; m_objSheet = (E...

SSRS in .Net Windows Application

We have a C# Windows Application. We also have SSRS reports. Can we deploy the application so that the reports are rendered on the local machine rather than using a web server? ...

How to check if object is sql to linq type

Hi, anyone know if there's any easy way to check if an object is an sql to linq type? I have a method like this but would like it to only accept valid types. public static void Update(params object[] items) { using (TheDataContext dc = new TheDataContext()) { System.Data.Linq.ITable table; if(items.Length > 0) ...