.net

Response.Redirect to same page without Page Refresh

I need to do a response.redirect to the same page. How can I do this without the page "refreshing" or "flashing"? I can't use updatepanels because, this is a search website and I want the user to be able to use the browser's back button. I have some search filters on the page, and each time a filter is clicked, I do a resposne.redirec...

MD5 on ASP Classic and .NET

I have a working .NET web application that perform hashing and encryption using MD5 on a certain string. This string will be stored in a cookie. The problem is, I will need to validate this cookie from an ASP classic application. From what I know, there are no built in cryptographic providers in ASP classic, thus I may need to copy/wri...

web services, generics, typed DS, on Compact framework 2.0, current (2009) best practices?

Struggling here, many documents I find are CF 1.0 centric and talk of the 2.0 changes to allow generics and typed DS'es on CF 2.0. Well, CF 2.0 has come and gone, and MS still shows these without update. I am not ready to jump into WCF, and my clients have a lot of older compact framework 2.0 machines. I am fortunate in that these We...

Hierarhical data and BerkeleyDB

Good news! Since version 4.8 BerkeleyDB has c# interface. BerkeleyDB is a quite interesting thing for me due to it's non-SQL nature. I know it's an excellent tool if someone wants to store a lot of key/value pairs. And I know about 'attachable' tables. What i don't know is how to store hierarchical data with BerkeleyDB. Is it suitable f...

"Peeking Ahead" while looping through Dictionary Items

This seems like it should be something very easy to do, but every time I approach this issue, I end up w/ solutions that feel "less than elegant" Here is my basic question: If I am looping through a dictionary that I have ordered in a particular way, within any given point in the loop how can I "peek" or get reference to a dictionary ...

Tracing the SOAP envelope that is being sent by a .NET web service client possible?

A C# client application we developed calls an external SOAP web service of a third party company. Now I want to trace the exact SOAP request envelopes that are being generated by the VS.NET-generated SOAP proxy in our application and transfered to the external SOAP web service. The method of using a network monitor like Wireshark (as d...

Object Databases and C#

I have an application where my domain model just works. It's all very clear, clean and maps to objects very well. My problem is that it does not map to a relational database very well. With that in mind, I'm looking for object databases that play with .Net/C# reasonably well. Is there a defacto best in class object database for the...

NHibernate. Is there something like "CreateMultiSQLQuery" for batch SQL Statements

I am using CreateSQLQuery to retrieve some entities with complex criteria and everything works fine with entity retrieval. But I want at the same query to use a Batch of SQL statements having the same result as this HQL Query (Want to make some record Counts) : IList results = s.CreateMultiQuery() .Add("from Item i where i.Id > :id")...

Are there .NET Framework methods to parse an email (MIME)?

Is there a class or set of functions built into the .NET Framework (3.5+) to parse raw emails (MIME documents)? I am not looking for anything fancy or a separate library, it needs to be built-in. I'm going to be using this in some unit tests and need only grab the main headers of interest (To, From, Subject) along with the body (which ...

Where do I put a FileSystemWatcher in my mvc application?

We have an asp.net mvc application that we would like to integrate a FileSystemWatcher with. I have seen many good examples on how to implement the FileSystemWatcher but I don't really know where to put it in my application. It seems like it should be started with the application. Any ideas? ...

i have hundreds of thousands of pages i need to scan and document

i have many documents that i want to scan. every document will have about 10 different meta data tags by which i want to be able to search. so maybe i am thinking of getting a huge scanner, scanning everything in, but then how do i label evverything? i guess i will turn them into pdf files and i will put them in a mysql DB? what is the ...

Jpeg compression with high quality in c#

I want to save images with c# but while using .net jpeg format it reduces quality and compression is not enough. It must save the file like its orjinal quality and size. I am using this code but It has not enough quality and compression. I am archiving studio photos and quality and compression is very important. Thanks. Bitmap bm = (Bit...

Keep an ASP.NET IIS website responsive when time between visits is long

After years of ASP.NET development I'm actually quite surprised that I can't seem to find a satisfying solution for this. Why does an IIS ASP.NET site always seem to fall asleep (for 2-6 seconds) after a certain time of inactivity (after several hours), during which no HTTP response is sent from server to client. This happens on any typ...

How do I access the metadata of one particular item in an MSBuild ItemGroup?

Given this Itemgroup: <ItemGroup> <Foo Include="First"> <Value>1</Value> </Foo> <Foo Include="Second"> <Value>2</Value> </Foo> </ItemGroup> How can I get the Value metadata for the second item (2)? I'm thinking along the lines of: <Message Text="%(Foo.Value)" Condition="'' == 'Second'" /> But I don't know how to wri...

On-the-fly conversion of MPEG files on MonoTouch

I have an iPhone application that uses small MPEG movies showing hand signs in the Dutch Sign Language. I get the movies from the Gebarencentrum, with their permission. But they are all in the old MPEG-1 format, and the iPhone won't play that. The allowed me to convert a couple of hunderd of the movies in batch and put them on my own web...

detect duplicate insert

Is there an easier way to prevent a duplicate insert after refresh? The way I do it now is to select everything with the all fields except ID as parameters; if a record exists i don't insert. Is there a way to possible detect refresh? ...

.Net Runtime Optimization Service Is Turning My System Unstable

Hello, I'm using Windows Vista Ultimate and today I've installed the Visual Studio 2008 SP1, now that I restarted my computer, it's very unstable and when I got in the Task Manager I see that it's taking 88% of my CPU! What I can do to solve this? Thanks. ...

Is there a way for one .NET Control to contain another Control which is owned by a seperate GUI thread?

I'm looking at creating a tabbed interface which has user controls (possibly written by plug-in developers) within a tabbed or MDI interface. These plug-in controls could unintentionally freeze their GUI thread, and I'd prefer that they not influence user controls in other tabs. Much like Google Chrome creates a process for each tab; b...

.net application crash, state of unmanaged resources

what happens to the unmanaged resources like DB connections, open files,... when a .net application (not web app) crashes ...

Making a short URL similar to TinyURL.com

I'm building a new web app that has a requirement to generate an internal short URL to be used in the future for users to easily get back to a specific page which has a very long URL. My initial thoughts are to store a number in a database and output it in a HEXADECIMAL value to keep it shorter than an integer. TinyURL.com seems to use s...