.net

Output Caching pages with user specific information

We have several sites that are mostly content managed using a sql database backend. these sites are most of the time serving up static information unless users change the content by voting or updating (similar to SO). These sites all have master pages where user specific information is often displayed at the top of each page (also simi...

How i can recreate this effect 3D

Hi i been looking a webpage and i found out a a website with beautiful effect ,here is the link Beautifl effect I like recreate these multi layers of background and when the mouse move you see a beautiful, almost 3D, illusion going on. The shapes seem to move in a fluid like motion in 3D, a fake perspective illusion has been created. ...

Exceptions during Finalize(): what methodology are you using to detect garbage collector-time exceptions?

I am developing a pretty extensive system in .NET, which involves a lot of system programming. Most time, I'm using the IDisposable pattern to handle resource disposal, but sometimes this isn't applicable (or left out by mistake) and resource gets destroyed during Finalize(). This might happen in COM interop, or when destructor calls Dis...

Gettting the host name of a Client making calls over WCF?

Is there a way to get the host name of the cleint making the call to a net.tcp binding in WCF. I'm trying to Diagnose an issue and I'd like to find out which client is sending me the message which is causing it. I've tried: OperationContext.Current.Channel.RemoteAddress.Uri.AbsoluteUri But that only seems to give me a generic schema ...

Strict Mocks using AAA syntax of Rhino Mocks

Hi, Is it possible to create a "strict" mock using the new AAA syntax of Rhino Mocks? The issue I am seeing is that the library I am mocking often returns null as a valid return value (which I handle in my function), so using the default mock I can never be sure if I tested all paths or I forgot to set some expectations. ...

How can I use memory mapped files for interprocess communcation?

.Net 4 will have a brilliant support for memory mapped files. The two main applications listed on different blogs (http://blogs.msdn.com/salvapatuel/archive/2009/06/08/working-with-memory-mapped-files-in-net-4.aspx) are: 1) editing large files, 2) interprocess communication. I'm already using WCF over named pipes for interprocess comm...

.NET "default line terminator"?

Is there any way to figure out what .NET is using as it's "default line terminator"? For example, documentation for StringBuilder.AppendLine(String) says it "Appends a copy of the specified string followed by the default line terminator...". Several text-related classes in .NET refer to the same concept. Is there any way to programmat...

What is the most efficient way to produce a report against a large set of in memory data in .NET?

I am working on a project that sends bills out to hundreds of thousands (if not millions) of customers each month. A lot of the data needs to be manipulated, with interest and whatnot dynamically calculated on the fly through an internal API. Right now I have the process which works in chunks of 2,500 bills at a time and writes out an ...

Looping through all items in ListBox?

I have a list box which is populated by this code: lstOutcome.Items.Add(lstMap.SelectedItem.Text); In the listbox lstOutcome, I need to be able to loop through the listbox and be able to take the value of the first,second, etc, list items. The reason I need to loop through each line and grab the value of that line is so I can use wh...

LINQ to SQL: Lazy loading an association

How can I lazy load an association (EntitySet) in LINQ to SQL? You can't set Delay Loaded on Associations in the designer, and I couldn't find a DBML attribute for it either. I looked at DataLoadOptions to see if there was a way to lazy load them that way, but DataLoadOptions really just provides a way to mold the SQL that is generated f...

open source instant messenger?

Hello everyone, I am using VSTS 2008 + ASP.Net + Forms Authentication + .Net 3.5 + IIS 7.0 + C# to develop a Web Application. I want to add web based instant messenging feature to my web application (using Forms authentication), I just need very basic features, like text based message, user presence status, etc. I want to know whether ...

Is there an easy way to find unused assembly references in my .NET project?

Possible Duplicate: Tools for finding unused references I inherited a brownfield project and am in the process of refactoring the code to support new requirements. The number of assembly references has grown considerably over time, and I would like to know if any references are no longer being used. What is the best approach t...

Ant colony optimization using .NET

Hi everybody. I'm looking for a .NET-Class library or .NET-Framework which implements ant colony optimization. Can you give me any links, resources, etc. about this topic. ...

Emulate a radius server in .NET

We have a wireless controller that prompts client machines for a username and pass using radius, the wireless controller than relays that request to us, where we need to then send that request to a third party unencrypted. is it possible to emulate a radius server in .net is there an api. is there a radius encryption algo short of clea...

Bulk Insert In SQLCE

Hi, i am new at SQLCE and using Visual Studio 2008,SQLCE 3,5.I want to know that what the best way of inserting bulk records into sqlce database?Does BULK INSERT statement work for SQLCE?I have near 45 tables and some of these tables should have large amount of data.Using command.Prepare is enough or is there more efficent and fast way?...

NHibernate and DTOs

I am considering bringing NHibernate into a project but have a question on how read only DTOs would be implemented. Entities are easy, but what about scenarios where you have a field our two from multiple entities/tables that need to be mashed together for display data on a view. Surely it would be overkill to load up all of the entities...

How to handle disposable objects we don't have a reference to?

If you have a brush and pen as in: Brush b = new SolidBrush(color); Pen p = new Pen(b); and dispose them like so: b.Dispose(); p.Dispose(); How would you dispose it if it was: Pen p = CreatePenFromColor(color) which would create the brush and pen for you? I can't dispose the brush inside this method, right? Is this a method not t...

Web Services - When referencing a web service locally, it asks for credentials

I am currently creating a web service locally. I created 2 separate files: One for the web app and the other for the web service. When I try to reference this web service from my web app, it asks for my credentials. It does not accept the credentials I inserted (which I know is correct). How do I remove this from my web service? ...

Unit testing a function that outputs via XmlWriter?

I'm trying to get into the unit testing and TDD way of doing things but I've come across a problem I'm not sure what to do with. I have a collection that saves itself to disk using XDocument and XmlWriter. I know you shouldn't write the file to disk then check it so I had the XmlWriter output to a memory stream then I checked the conte...

SSRS Parameter Problem

I have a Winforms application that uses the ReportViewer control to display SSRS reports. I have one report with many paramters that must be set by the user. I specifically set one of the parameters to have no default value so that the parameter prompts would display in the report viewer prior to running the report. However, when th...