about 2 months ago - No comments
It’s quite common to want to search a database for a key that starts with a given string. In SQL you have LIKE and in MongoDB you have regular expressions: But what if you want to do the inverse of this? i.e. to search the database for the keys that are themselves substrings of the More >
about 5 months ago - 1 comment
In an earlier post I explained a technique to create a class-free persistence layer using MongoDB. [Read that post first, then come back here.] Since then I’ve refined the techniques involved and created a cleaner implementation that does away with the `.props` collection on each object. Now when you add an interface to an object More >
about 5 months ago - 2 comments
With the addition of two more 3TB drives to the home network it’s becoming impossible to track files and to remember where each one is and whether it’s a backup of some other disk or not. There are 8 computers on the home network and over 10TB of storage distributed between them. Much of the More >
about 5 months ago - No comments
Can you imagine what life would be like it people behaved like software programs do? You’d be working away on something when someone would interrupt, steal your attention, and demand a response. You’d be interrupted in the middle of sentences all the time and while you were dealing with one interruption someone else could come More >
about 8 months ago - 1 comment
In an earlier post I discussed some ideas around a Semantic CRM. Recently I’ve been doing some clean up work on my C# Natural Language Engine and decided to do a quick test connecting it to a real CRM. As you may know from reading my blog, this natural language engine is already heavily used More >
about 1 year ago - No comments
Software Consultancy Serving the Greater Seattle Area Our consulting service is now open for business. We can help you with:- Business planning Program management Software Development for the Microsoft.NET platform Architectural advice and review Custom software development (offsite or onsite) Migrating web applications to ASP.NET MVC 2 Migration to Entity Framework 4 Complex threading using More >
about 1 year ago - No comments
When developing .NET applications there is often the need to execute multiple background processes, for example, fetching and rendering different size thumbnails for images. Typically you queue actions like these onto the thread pool. But in the case of thumbnail generation you typically want to fetch a base image first and then perform the resize More >
about 1 year ago - No comments
When developing .NET applications there is often the need to execute some slow background process repeatedly. For example, fetching a feed from a remote site, updating a user’s last logged in time, … etc. Typically you queue actions like these onto the thread pool. But under load that becomes problematic as requests may be coming More >
about 1 year ago - No comments
In GDI+ you can call Image.FromFile to load an image from a file. BUT there are several issues with this call, the biggest being that GDI+ will keep the file open long after you are done with it. Here is an image loader that gets around this issue. If you are running a high volume More >
about 1 year ago - 3 comments
ASP.NET 3.5 Routing is a very powerful tool not just for registering routes for newer ASP.NET MVC applications but also for adding SEO friendly routes to older Webforms (ASPX) applications, or for routing multiple URLs to a single page. But that’s not all it can do. You can create your own IRouteHandler and then have More >
about 1 year ago
I would like to post some of your ideas in my blog. Can I ,please take them?
about 1 year ago
It looks like the solution I am searching for.
But I did not understand, how to call the class from my code.
Can you give me an example?
Thank you in advance,
Bernd
about 8 months ago
HttpWebRequest oReq = (HttpWebRequest)WebRequest.Create(url);
Where is WebRequest defined?
about 8 months ago
WebRequest is in System.Net. See http://msdn.microsoft.com/en-us/library/bw00b1dc.aspx
about 7 months ago
Ahh, excellent! Here I was thinking C# didn’t have anything like that… I should have googled. Thanks a bunch! XD
about 5 months ago
Hi i used the HTML agility Pack’s method to get the HtmlDocument instead of WebRequest.
Is there any difference in these two approaches
I used:
HtmlWeb web = new HtmlWeb();
doc=web.Load(urlRoot.AbsolutePath);
about 5 months ago
By using WebRequest you can get more control over the process, e.g. checking the mime type first, or handling redirects (not shown here).