December 18th, 2006 — ASP.NET
Version 1.9 adds a little requested feature to my ASP.NET Deployment Tool. Whenever you hit Deploy Local a file called compilerlog.txt will be created now in the Application Folder which holds the compiler output.
So if you got lots of warnings and errors popping up it’s easier to investigate them by looking into compilerlog.txt. Of course using Visual Studio is still best for investigation but it appeared that many people do small fixes without firing up VS once again.
“Bin” is checked by default now: It only copies the content of the bin directory when you hit Copy to FTP.
Short overview for people who don’t know it yet:
An avanced and robust Deployment Tool for precompiling your ASP.NET Websites! Pre-Compilation gives your site a performance boost and secures it.
Precompile and deploy your Website: Specific Error Panel, FTP Support, Deploy to Network, Merge Assemblies, easy to use.
Download it here: ASP.NET Deployment Tool v1.9 (I didn’t update the version number on that page yet, don’t mind it, it’s v1.9)
Edit: I set the background color of the Toolstrip to a static color as many people use black for their desktops 
December 15th, 2006 — Microsoft, Personal
I wanted to do this a long time ago already, now, finally, I finished redoing it. Hope you like it
ASP.NET AJAX RC1 has been released, the latest release before the fully supported final version
And Visual Studio 2005 SP1 Final is out now: VS 2005 SP1 Final
Enjoy 
December 12th, 2006 — Administration
This sometimes happen if you are going to install eaccelerator 0.9.5 for PHP optimizing. We just received our new dedicated server with debian sarge for our vBulletin forum and I’m optimizing it at the moment. There are many results in google for this error, however, none of them helped me.
What actually did help me was this:
apt-get install php5-dev
hth, one of my few non-windows posts
December 7th, 2006 — Administration
I just came up with an idea for our mails at work. We’re battleing spam every day and received more than 23 mio spam mails for 2006 so far. Good spam filters are most of the time very expensive.
What we did now is.. setting a gmail account in between:
One catchall address on our mailserver -> mails are getting forwarded to gmail -> gmail forwards the mails back to our postmaster address -> our local mailserver routes the mails to the proper persons
There you go, you probably can’t get a better spam filter for free as the one from Google.
PS: We don’t care about delivering our mail through Google but it’s eventually not that good for Yahoo or MSN employees 
December 3rd, 2006 — Windows
Heads up, Microsoft released a new Remote Desktop for WinXP and Windows 2003 Server which also adds better support for Windows Vista.
Some of the new features:
- Network Level Authentication
- Server Authentication
- Plug and Play redirection
- TS Gateway support
- Monitor Spanning
- 32-bit color and font smoothing
Download for:
- WinXP
- Win2k3 Server
November 22nd, 2006 — Reviews
Sponsored Post: What exactly is the CsvReader?
Csv Reader is an extremely fast and stable .Net class for stream based parsing of virtually any commonly found delimited data format, CSV files, tab delimited files, etc. It’s usable from C#, VB.Net, ASP.Net, or any other .Net language. It’s compatible with the 1.0 .Net framework, 1.1, 2.0, and even the .Net Compact Framework. The methods are designed for ease of use, while the inner architecture is designed purely for speed and efficiency. Parsing is done using the de facto standard CSV file specifications. It handles quoted fields, delimiters in the data, and even data that spans across multiple lines. This gives you the ability to open csv files, edit csv files, and save csv files all directly from code.
I downloaded the .NET Demo and had been impressed by its easy usage. Here is a screenshot of the demo:
You see the original CSV file on the top left side, the XML parsing on the top right side and a DataGrid attached to the CSV file on the bottom of the screen. The processing time is incredible fast as shown here:
CsvReader cleary wins with less than 5 seconds. The coding is really easy, let’s look at the code sample for the textbox and DataGrid of the screenshot above:
175 using (StreamReader reader = new StreamReader(“../../products.csv”))
176 {
177 this.textBox1.Text = reader.ReadToEnd();
178 }
179
180 using (CsvReader reader = new CsvReader(“../../products.csv”))
181 {
182 this.dataGrid1.DataSource = reader.ReadToEnd();
183 }
That’s all, it’s really that simple. With the included samples you can start using CsvReader immediately and implent it in existing applications in just a few seconds.
Bruce recently released CsvReader v2.0 which also enables you to insert data directly into SQL Server which is a great addition to the existing features.
Check out the CsvReader website, it’s the way to go for dealing with csv files. You get 25% off if you order it before November 24th!
November 13th, 2006 — ASP.NET
I’ve dealt with custom ASP.NET Paging lately and wanted to share the fastest possible way to do that with you if you don’t use ADO.NET or any ASP.NET Controls.
Create a stored Procedure like this:
CREATE PROCEDURE [dbo].[usp_PageResults_NAI]
(
@startRowIndex int,
@maximumRows int
)
AS
DECLARE @first_id int, @startRow int
– A check can be added to make sure @startRowIndex isn’t > count(1)
– from employees before doing any actual work unless it is guaranteed
– the caller won’t do that
– Get the first employeeID for our page of records
SET ROWCOUNT @startRowIndex
SELECT @first_id = employeeID FROM employees ORDER BY employeeid
– Now, set the row count to MaximumRows and get
– all records >= @first_id
SET ROWCOUNT @maximumRows
SELECT e.*, d.name as DepartmentName
FROM employees e
INNER JOIN Departments D ON
e.DepartmentID = d.DepartmentID
WHERE employeeid >= @first_id
ORDER BY e.EmployeeID
SET ROWCOUNT 0
GO
And in ASP.NET you execute a DataReader against this piece of code:
42 string SQL = “pics_Paging”;
43
44 cmd.Connection = cn;
45 cmd.CommandText = SQL;
46 cmd.Parameters.AddWithValue(“@startRowIndex”, 6);
47 cmd.Parameters.AddWithValue(“@maximumRows”, 4);
48 cmd.CommandType = System.Data.CommandType.StoredProcedure;
That’s all and it’s pretty speedy, thanks to 4GuysFromRolla.com for the input! All you have to do now is to create the logic for startRowIndex and maximumRows which is a piece of cake 
November 9th, 2006 — ASP.NET
Hosting in a basic configuration can be a developer’s pain when it comes to file operations. Usually the webspace doesn’t allow files to be created which has a good reason in that configuration, though.
A very smart way to deal with that is to use Isolated Storages. That way all the files are saved in a virtual storage which also means that you can control the access level which is pretending conflicts with other applications. That’s how it could look like:
176 // Filestore init
177 IsolatedStorageFile isoStore = IsolatedStoargeFile.GetStore(IsolatedStorageScope.Assembly | IsolatedStorageScope.User, null, null);
178
179 // Create dir
180 isoStore.CreateDirectory(“myAppData”);
181 isoStore.CreateDirectory(“myAppData/settings”);
182
183 // Write File into Store
184 IsolatedStoargeFileStream isoStream1 = new IsolatedStorageFileStream(“myAppdData/hello.txt”, System.IO.FileMode.Create, isoStore);
185 byte[] content = Encoding.UTF8.GetBytes(“Hello!”);
186 isoStream1.Write(content, 0, content.Length);
187
188 // Read file
189 IsolatedStorageFileStream isoStream2 = new IsolatedStorageFileStream(“myAppData/hello.txt”, System.IO.FileMode.Open, isoStore);
190 byte[] content2 = new byte[isoStream2.Length];
191 isoStream2.Read(content2, 0, content2.Length);
192 isoStream2.Close();
193
194 Response.Write(Encoding.UTF8.GetString(content2));
195
196 // delete store
197 isoStore.Remove();
That’s all, a pretty clean approach for dealing with files in ASP.NET due to hosting restrictions. Nevertheless it’s also interesting to use in Desktop Applications due to the customized privileges for that storage.
November 7th, 2006 — Development, Microsoft
If you haven’t noticed yet.. .NET Framework 3.0 final has been released! That’s a bit surprising for me I didn’t expect it that early.
Read more and download it here: .NET Framework Developer Center
October 31st, 2006 — Windows
Microsoft today revealed the retail packaging for Windows Vista and Office 2007, the eagerly awaited new products to be made widely available in early 2007. The boxes boast a completely revised and redesigned packaging. Writing on the Windows Vista Team Blog, Nick White said:
“Designed to be user-friendly, the new packaging is a small, hard, plastic container that’s designed to protect the software inside for life-long use. It provides a convenient and attractive place for you to permanently store both discs and documentation.
The new design will provide the strength, dimensional stability and impact resistance required when packaging software today. Our plan is to extend this packaging style to other Microsoft products after the launch of Windows Vista and 2007 Office system.”
Here are the Packshots:
Looks pretty good I’d say!
More german info on Windows Vista here: Windows Vista
October 27th, 2006 — Web/Net
I recently came across a blog which is really nicely done. JohnnyCoder.com, a blog about C# and the .NET Framework with useful articles for better development.
I was wondering which kind of plugins Johnny is using and what he did to make his blog look like that. He made a public article out of it: The Making of Johnnycoder.com - definitely a nice read for bloggers powered by WordPress.
Cheers
Andreas
October 25th, 2006 — ASP.NET
If you moved from ATLAS to the new ASP.NET AJAX Beta1 you might encounter that kind of problem, all other controls are affected as well like Element ‘UpdatePanel’ is not a known element.
To get around this issue you have to change the tagPrefix in your web.config:
Old:
<controls>
<add tagPrefix="asp" namespace="Microsoft.Web.UI"
assembly="Microsoft.Web.Extensions, Version=1.0.61025.0,
Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>
<add tagPrefix="asp" namespace="Microsoft.Web.UI.Controls"
assembly="Microsoft.Web.Extensions, Version=1.0.61025.0,
Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>
</controls>
New:
<controls>
<add tagPrefix="ajax" namespace="Microsoft.Web.UI"
assembly="Microsoft.Web.Extensions, Version=1.0.61025.0, Culture=neutral,
PublicKeyToken=31bf3856ad364e35"/>
<add tagPrefix="ajax" namespace="Microsoft.Web.UI.Controls"
assembly="Microsoft.Web.Extensions, Version=1.0.61025.0,
Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>
</controls>
This works as a temporary fix, this issue will be addressed in the next release of ASP.NET AJAX Beta.
hth
October 24th, 2006 — ASP.NET
Microsoft said, ASP.NET applications contain 40 to 70 percent less code than ASP `applications`. My little test shows that it’s true, ASP.NET is really faster. However, an exact statement on speed is difficult because it’s depending on many factors.
The point of success isn’t the compiling but the early binding. That can be shown in an easy loop. I’ve used a Dual AMD Opteron, 2GHZ, 4GB RAM on Windows 2003 Server / IIS 6.0 for that test, here’s the code:
In ASP:
<%
Dim b, a, start, end, count
count = 50000000
Response.Write("Loops: " & count & "<hr>")
start = now
for a = 1 to count
b = b + a
next
end = now
Response.Write("Start: " & start & "<br>")
Response.Write("End: " & end & "<br>")
Response.Write("Execution length: " & DateDiff("s",start,end))
%>
In ASP.NET 2.0 with late binding:
private void Page_Load(object sender, System.EventArgs e)
{
object b = null;
object a = null;
object start = null;
object end = null;
object count = null;
count = 50000000;
Response.Write("Loops: " + count.ToString() + "<hr");
start = DateTime.Now;
object tempFor1 = ;
for (a = 1; a <= count; a++)
{
b = b + a;
}
end = DateTime.Now;
Response.Write("Start: " + start.ToString() + "<br>");
Response.Write("End: " + end.ToString() + "<br>");
Response.Write("Execution length:
" + Microsoft.VisualBasic.DateAndTime.DateDiff("s", start,
end, Microsoft.VisualBasic.FirstDayOfWeek.Sunday,
Microsoft.VisualBasic.FirstWeekOfYear.Jan1));
}
And now in ASP.NET 2.0 with early binding:
Same like above but:
Int64 b, Int64 a, DateTime start;
DateTime end;
Int64 count;
Here are the results:
- The ASP Code: 26 seconds
- The ASP.NET 2.0 Code with late binding: 16 seconds
- The ASP.NET 2.0 Code with early binding: < 1 second!
The result speaks for itself.

October 22nd, 2006 — ASP.NET
Too bad. Microsoft said goodbye to Atlas and comes up with a *new* framework called ASP.NET AJAX. There are lots of new features and bugfixes within that beta release which comes in 3 pars:
- The ASP.NET AJAX v1.0 “Core†download. This redist contains the features that will be fully supported by Microsoft Product Support, and which will have a standard 10 year Microsoft support license (24 hours a day, 7 days a week, 365 days a year). The download includes support for the core AJAX type-system, networking stack, component model, extender base classes, and the server-side functionality to integrate within ASP.NET (including the super-popular ScriptManager, UpdatePanel, and Timer controls).
- The ASP.NET AJAX “Value-Add†CTP download. This redist contains the additional higher-level features that were in previous CTPs of “Atlas,†but which won’t be in the fully-supported 1.0 “core†redist. These features will continue to be community supported as we refine them further and incorporate more feedback. Over time we’ll continue to move features into the “core†download as we finalize features in this value-add package more.
- The ASP.NET AJAX Control Toolkit. This project contains 28 free, really cool, AJAX-enabled controls that are built on top of the ASP.NET AJAX 1.0 “Core†download. The project is collaborative shared source and built by a combination of Microsoft and non-Microsoft developers, and you can join the community or just download it on CodePlex today.
Sounds nice but the thing which makes me a little bit angry is.. the old Atlas code has to be migrated. It took me about 5 hours to migrate four of my existing ASP.NET Atlas applications. Here’s the migration guide: Atlas Migration guide.
Let’s hope we’re working with somewhat more stable bits now, ASP.NET Ajax.
October 19th, 2006 — Windows
Microsoft could be ready to release Windows Vista to manufacturing as early as next week, a milestone that would signify the end of a protracted development process. It could also set the company on a course to launch the operating system at the huge International Consumer Electronics Show in Las Vegas, where Chairman Bill Gates is to deliver the opening keynote Jan. 7.
“9 Days Until Vista RTM!!!” read a scrolling electronic reader board in a building on Microsoft’s Redmond campus Monday. If the countdown is correct, it would mean Vista is to be released to manufacturing (RTM) on Oct. 25, earlier than analysts expected.
Other than to reiterate that Vista is on track, a Microsoft spokesman had no comment on the reader-board message, which was visible from the lobby of Building 9, where part of the Windows Vista team works.