Archive for category Windows
How to get the week number for a date in C#
Posted by suddenelfilio in .net, OS, Programming, Visual Studio .Net, Windows on 07/10/2010
Today I needed to know which week of the year a certain day was in. My first instinct was DateTime.Now.Week but it seems there is no Week property on a DateTime instance. So I started looking for a way to get the week number. As it turns out the CultureInfo class will get you where you want to go using the Calendar property.
I updated my extensions library (How to get the mime type of a file using the name of a file in C# and PART 2: How to get the mime type of a file using the name of a file in C# ) to add an extension method called WeekNumber for a DateTime instance here is the code:
public static class DateTimeExtensions
{
public static int WeekNumber(this System.DateTime value)
{
return CultureInfo.CurrentCulture.Calendar.GetWeekOfYear(value, CalendarWeekRule.FirstFourDayWeek,
DayOfWeek.Monday);
}
}
You can download my updated extension library here : Suddenelfilio.ExtensionMethods.zip
Downloaded 204 times
New Windows Live Beta
Posted by suddenelfilio in Windows on 28/06/2010
The Windows Live team released a public beta of the latest innovations in the Windows Live product family.All products have undergone updating and there are also some new things like the Windows Live Sync service.
This Sync service is something I’m looking forward to since I was a user of the Microsoft Live Mesh program. I stopped using Live Mesh because I reached my storage limit and at the time there was no possibility to upgrade. The new Sync service is integrated with you Windows Skydrive storage which – as far as I know – is upgradeable.
Another big change is the Messenger application, it is no longer targeted at “just” IM messaging, but now has an integrated sort of activity stream with social networks like Facebook and Myspace. My guess is that in the future this might expand to other networks as well.
So if you want to try this latest beta release go to: http://bit.ly/deEQxl
Note: this post is written using the latest beta of Windows Live Writer

Windows 7 x64 + nforce chipset + >= 4 GB RAM + large file copy = disaster
Posted by suddenelfilio in General, Windows on 24/03/2010
I’ve wasted an entire day AND evening on some stupid issues at work. I reinstalled my portable with windows 7 x64. Only to notice that after 6 hours of installing that some software that I need for work doesn’t play nice with x64 (I know because I tested it in x86 where it works just fine). So I decided to install the x86 version of windows 7. I downloaded it and wanted to copy it to my USB stick only to discover that the file copy got stuck around 700 MB left to copy. It seems there is an issue with windows 7 x64 with at least 4 GB ram of copying large files. Microsoft released a so called hotfix: http://social.technet.microsoft.com/Forums/en-US/w7itprohardware/thread/38f25c1d-de67-4c74-8845-2cd3a15d8e41 but as it turns out my system already had this update and it seems that it doesn’t work at all. So now I’m stuck with an >2GB iso file I can’t copy away from my desktop because copying fails halfway through. I recently upgraded my system to 8GB so downgrading to 32 bits is not an option as the extra 4GB will go to waste. Maybe I should put back windows xp x64?
If you recognize this issue and have found a working solution please let me know by posting a comment!
Outlook Social Connector for LinkedIn
Posted by suddenelfilio in .net, Windows on 25/02/2010
The social networking site LinkedIn released their Outlook Social Connector for Microsoft Outlook. Something that was new to me is that OSC is not an office 2010 feature anymore because it is possible to download osc for outlook 2007 and 2003 so you can use the osc connecters in the ‘older’ versions of ms outlook as well. Very nice move I think.
To download the LinkedIn outlook social connector go to: http://www.linkedin.com/outlook
Microsoft temporarily removes Windows 7 Beta download limit – Engadget
Posted by suddenelfilio in Windows on 12/01/2009
Windows Server 2008 beta 3
Posted by suddenelfilio in Windows on 25/07/2007
Yesterday I installed the new windows server 2008 beta OS. I was really surprised by its speed of installation and operating. After looking around I managed to turn on the nice looking graphics and sound
So now it’s like I’m running vista, but with all the nice features of a server OS.
The thing I really like is the fact that you can say what needs to be installed like the server roles and features. Server roles already existed in Windows Server 2003 but they have been extended as well as optimized using new wizards and so on. The new thing is features. If you want to enable sound this is now a feature. I think there are about 73 features you can enable or disable.
To be honest this system looks like vista, feels like vista (actually is vista) but runs faster than my previous vista environment and you get the extended possibilities a server has got to offer. In my opinion I would advice this for developers wanting to develop for vista instead of doing it on vista. It’s like developing on windows server 2003 for windows xp.
How to ignore a blogging career ?
Posted by suddenelfilio in .net, Windows on 02/07/2007
That’s simple buy a house that needs to be finished in the meantime switch jobs and on top of that move out of your current appartement.
I’ve not been writing as much as would like, but I can’t seem to find the time. Lately I’ve been watching more closely to LINQ, Nhibernate, EDM, Windows Server 2008 and Visual Studio .net Codename “Orcas”… I know that’s a lot but I can’t keep up and I would like to explore as much as humanly possible under current conditions.
Anyways my findings in short are:
LINQ: nice
NHibernate: same as LINQ = nice + advantage current support .net 2.0 and older versions.
EDM: yeah well… nice as well ![]()
Windows Server 2008: mmm still beta, should say enough.
VS.Net Orcas: surprisingly “stable”.
How to: Print from ASP.Net on a network server
Posted by suddenelfilio in .net, Asp.net, Windows on 15/02/2007
Yesterday we had a small problem with a project of ours. We have a reporting system that server side will process the report and if configured it will print this on a printer somewhere in the network.
When we first tried this every time we printed to a network attached printer we got an error saying that we did not have access to this printer. This behavior is actually normal if you think about it. The server side code runs through an ASP.NET Web Service which in our case runs under it’s native aspnet account. Since this is a local account it does not have access to the network printer.
A solution could be impersonation or just simply make sure the web service runs as a dedicated domain account that has access. This however was not an option for us so we had to look for something else.
The solution I came up with was creating a local printer, but instead of letting it print to a local port like LPT1 I created a new standard TCP/IP port. This allows you to enter an IP and port for the networked printer. The advantage is that this printer is a local printer which requires no authentication at all, so asp.net can use it to print without knowing that it is actually being sent to a network printer.


