Tag: CSharp
All the articles with the tag "CSharp".
-
PackageExplorer, not only great for OpenXML...
The last few days, I’ve been working with Wouter to discuss some new features and ideas for his PackageExplorer. PE is an editor for OpenXML packages, enabling you to view the contents and relations of different parts in a package, to validate XML against OpenXML schemes, …
-
TFS Team Build and ASP.NET websites
Here’s one I’d really like to share with everyone trying to build ASP.NET websites using TFS Build. First of all, a little story about the project setup…
-
Open XML Developer workshop content
Over the last few months, Doug, Wouter, Brian and lots of other people delivered a series of OpenXML workshops around the globe. Those who were there, and those who weren’t, can now download all content of these workshops from OpenXMLdeveloper.org. There are some interesting slideshows available for those of you who never heared about OpenXML before, as well as some nice code samples to get you started developing in C# or Java. As a side note: I also spotted a good article on OpenXML, explaining the Open Packaging Conventions with a self-created file format (based on OpenXML).
-
NHibernate 1.2.0 - Unexpected row count: 0; expected: 1
Great… I’ve been working with NHibernate and MySQL for a while now, without having any strange problems. For a project I’m working on, I’m using SqlClient instead of MySQL now, and strangeness occurs. When I try to Flush() a NHibernate session, here’s what is thrown:
-
Enable sitemap security trimming in ASP.NET 2.0
Want to enable security trimming for your ASP.NET sitemap? Here’s how… First of all, you need a new section in your web.config system.web element: Next, you should specify which pages are visible to who: In this example, the page ForgotPassword.aspx is visible to anonymous users, while authenticated users do not need this page (as they already knew their password while logging in…). ModifyPassword.aspx is only visible to authenticated users, as anonymous users can’t do that.
-
ASP.NET URL rewrites using .htaccess-like syntax
Having a PHP background, I’ve been using .htaccess mod_rewrite in Apache for ages. ASP.NET allows rewriting too, but using a different syntax than mod_rewrite. Using the attached library, you can now use mod_rewrite syntax to perform rewrites on your ASP.NET application. Here’s how… First of all, you need to download the attached library. Reference it from your web project, and register it as a module in Web.config, preferrably as the first one: Second, create a file UrlRewriter.xml in the root of your web project, and add rewrite conditions in there:
-
Enlisting an ADO.NET command in an NHibernate transaction
For everyone who has read my article on NHibernate, here’s a story for you… When building an application, everyone comes to a point where one needs to batch-update records in a database table, based on one or more criteria. Let’s say, for example, there’s a table “User” containing an activation date. And you want to remove all users that have activated in 1999. In a regular database environment, or when using ADO coding, one would write a DbCommand “DELETE FROM User WHERE activationdate < ‘2000-01-01’”.
-
Commandline FTP folder download
A quick annoyed post… I just spent two hours searching the Internet for a means on how to recursively download a complete FTP folder, command-line, and in a simple way. Oh yeah, and preferably freeware. The solutions I found were not what I expected: a $50 software product providing a GUI (I said command-line! [:@]), a bloated scheduler thingy that does download in the background (I said simple! [8o|]), to batch-files relying on Windows built-in ftp.exe and a gigantic list of all files that need to be downloaded.
-
OpenXML news overview
A lot of news around OpenXML these days, so I decided to bundle some things into one big blog post. In .NET 3.0, there’s the System.IO.Packaging API, which allows programmatic access to OpenXML packages (amongst them Office2007 files). Since this API is quite low-level, the Microsoft people introduced a new SDK built on top of System.IO.Packaging, which allows you to use strongly typed classes for document parts. Checkout a code sample on Wouter’s blog and see for yourself: this SDK provides access to an OpenXML package in a much easier way than System.IO.Packaging. Download the SDK here.
-
MCTS for .NET framework 2.0 Web applications
Just like my colleague Kristof did last friday, I passed the Microsoft.NET Framework 2.0 - Web-based Client Development (Exam 070-528) exam yesterday, resulting in a new certification title: I’m now offically a Microsoft Certified Technology Specialist for .NET framework 2.0 Web applications.