Nov 28th, 2009 by ocvirek.com
I’m working on Windows Forms C# app and I come across this error when starting up application and trying to read some information from app.config file. After a lot o research I came a conclusion that this error is caused by generating a malformed config file (according to schema in c:\Program Files\Microsoft Visual Studio 8\Xml\Schemas\DotNetConfig.xsd) by putting configSections after appSettings. Once I put the configSections element back to the top of the config file, everything worked as expected. Thanks to Dan for pointing this out on his blog: http://www.distribucon.com/blog/ConfigurationSystemFailedToInitialize.aspx.
Posted in C#, Visual Studio, Tips'n'Tricks
No Comments »
Nov 1st, 2009 by ocvirek.com
When you open a photo in Windows Photo Gallery, it looks too yellowish (or too redish or too greenihs or too blueish), but when you open it in another picture viewer such as IrfanView or XnView, it looks quite normal and all colors are well balanced. It’s especially noticable when opening scanned documents and the paper doesn’t look white. The thing is that Windows Color Management Profile affects how photos look when viewed in Windows Photo Gallery and probably there is some specific profile associated with your current display (monitor). In order to fix this you need to do this:
1. Open Control Panel and choose Personalization
2. Choose Display Settings
3. Click the button Advanced Settings
4. Go to tab Color Management
5. Click the button Color Management
6. In Device drop down listr choose Display
7. Make sure that checkbox Use my settings for this device is checked
8. Choose and remove your currently associated profile by clicking on the Remove button
9. Click the Add button and add sRGB IEC61966-2.1 Color Space Profile
10. Apply the changes and restart your computer.
Now photos and scans should look fine.

Posted in Windows Vista, Tips'n'Tricks
No Comments »
Oct 28th, 2009 by ocvirek.com

” Synergy lets you easily share a single mouse and keyboard between multiple computers with different operating systems, each with its own display, without special hardware. It’s intended for users with multiple computers on their desk since each system uses its own monitor(s).
Redirecting the mouse and keyboard is as simple as moving the mouse off the edge of your screen. Synergy also merges the clipboards of all the systems into one, allowing cut-and-paste between systems. Furthermore, it synchronizes screen savers so they all start and stop together and, if screen locking is enabled, only one screen requires a password to unlock them all. Learn more about how it works. Synergy is open source and released under the GNU Public License (GPL). ”. Introduction from official SourceForge site http://synergy2.sourceforge.net .
Tutorial:
BMHO, Synergy is not new kid on the block, but it’s still a great open source tool and I’ve been using it for few months now. Since I had to upgrade my laptop to Windows 7, I’ve wrote this little tutorial to make sure that I wouldn’t forget something 
I will assume that you have a desktop on the right side (which will play a server role) and a laptop computer on the left side (which will play a client role) and that they are both connected to the same LAN.
So, let’s do it. Here’s quick tutorial with few simple steps:
1. Install Synergy on Server and Client computer (e.g. deskop and laptop).
2. Configure Client - open Synergy and choose option Use Another Computer’s Shared Keyboard and Mouse (client), and enter other computer’s Host name (Server’s Network name e.g. computer1.domain.net). Now click Advanced and give your client computer apropriate screen name (e.g. laptop)
3. Configure Server - open Synergy and choose option Share this computer’s keyboard and mouse (server). Now click Advanced and give your server a screen name (e.g. master).
4. Now comes the tricky part. Click the Screens & Links Configure button on the Server. Under Screens Add both laptop and master screens and leave all the options in their default values. Under Links add two links:
a) “master is right of laptop” - 0 to 100% of the right of laptop goes to 0 to 100% of master.
b) “laptop is left of master” - 0 to 100% of the left of master goes to 0 to 100% of laptop.
5. Configuration is finsihed. Now click the Start button on the server and then click it on the client computer. You should be able to use mouse and keyboard on both computers just like when working on extended desktop. Enjoy!
Posted in Networking, Tips'n'Tricks, Open Source, Articles, Software
No Comments »
Oct 25th, 2009 by ocvirek.com
When trying to download Microsoft Security Essentials you got this message: Not available in your country or region ? Don’t worry, just point your browser to this address and you’ll get your download: http://www.microsoft.com/security_essentials/?mkt=en-us. I’ve been using AVG, Avast, Antivir and others for ages, but since there was lot of positive feedback on the net I’ve decided to give this all round Microsoft antivirus/antispyware/antimalware a chance. So far I like it. Small memory footprint, barely noticable. According to my expirience with this piece of software, I would recommend it as an healthy alternative to other free antivirus/antispyware combos. And yes, MSE replaces Windows Defender in Windows Vista and Windows 7.
Posted in Windows Vista, Tips'n'Tricks, Software
No Comments »
Oct 18th, 2009 by ocvirek.com
When trying to connect to SQL Server instance using SQL Server Management Studio 2008 (Express), you might stumble upon this error: Failed to retrieve data for this request. (Microsoft.sqlserver.management.sdk.sfc). Databases will not be enlisted in the Object Explorer and that’s really bad. Luckly there’s a solution for that.
- Close the error message
- Press F7 to open the Object Explorer Details pane. Right-click the column headers, and make sure that only the following columns are selected: Name, Date Created, Owner
- Right-click the Databases node, and then click Refresh. Voila!
More info: http://support.microsoft.com/default.aspx?scid=kb;EN-US;956179
Posted in SQL Server
No Comments »
May 30th, 2009 by ocvirek.com
Jamendo.com is a winner in the music category of the CNET’s Webware global contest among other sites such as last.fm, itunes.com, amazon mp3 and pandora: http://www.cnet.com/html/ww/100/2009/winners.html. I’m very happy to be part of Jamendo’s efforts as one of the many indy artists contributing to free culture. I’m especially happy about the facts that there’s been more 60.000 plays, 6.500 album downloads and 60 user reviews of my albums “Ephemeris”, “Fortadelis” and “Convergence” on Jamedno alone!
Posted in Music Production
No Comments »
Apr 28th, 2009 by ocvirek.com
I’m very pleased to announce that my composition “Infinitive Sight” from album “Ephemeris” is on #97 in Jamendo’s TOP 100 list this week which I consider a major success and recognition since there’s probably more than 20.000 albums and 200.000 individual songs published on Jamendo. Ephemeris in TOP 100
Posted in Music Production, News
No Comments »
Apr 19th, 2009 by ocvirek.com
You did some testing on your database before deploying it and you created new record and then deleted it right away, but there is a hole in your primary key ID’s now and it shouldn’t be. How to fix that before deploying it to production environment ?
It’s quite easy, just open SQL Server Managment Studio and fix it using this T-SQL:
DECLARE @LastID int
SELECT @LastID = MAX(ID) FROM MyTable
DBCC CHECKIDENT (’MyTable‘, RESEED, @LastID)
Posted in SQL Server, Tips'n'Tricks
No Comments »
Apr 19th, 2009 by ocvirek.com
There’s a simple and effective way to precompile your ASP.NET application in desired folder prior to publishing it (e.g. uploading to web server via FTP):
C:\Windows\Microsoft.Net\Framework\v2.0.50727\aspnet_compiler.exe -v /WEBSITENAME -p “C:\Projects\WebSiteSource” “C:\Projects\WebSitePublished”
And, as you probably already know, adding any other uncompiled files to this precompiled version (e.g. uncompiled user controls .ascx meant to be loaded dynamically via LoadControl), you have to change attribute updatable to true in PrecompiledApp.config file:
<precompiledApp version=”2″ updatable=”true”/>.
Hope this helps. Cheers.
Posted in ASP.NET, Visual Studio, Tips'n'Tricks
No Comments »
Dec 21st, 2008 by ocvirek.com
I’ve just come to conclusion that there’s another annoying thing which is actually very common when working with TableAdapters, ObjectDataSource and DataBinded controls on a WebForm. For example, when you use a DataBinded DropDownList control in a DetailView control to choose one value for your ForeignKey, everything works fine, until your ForeignKey has a Null value, and there is no such value in a DropDownList. You will immidiately get this error from the title. Off course, one ObjectDataSource is used to provide DataBinding for a DetailView control, and another is used to populate your DropDownList. Regarding this other one, the best thing you can do is to create a view, stored procedure or a SELECT statement which will include a NULL value, for example:
SELECT EmployeeTypeID, EmployeeTypeDesc FROM EmpyloeeType
UNION SELECT NULL, ‘– None selected –’
and then populate DropDownList with it. But you will still get this error if your TableAdapter, which will be used for populating it, has a PrimaryKey constratint on a EmployeeTypeID field (in this example). In order to solve this, we will have to Delete this Primary Key by right clicking on the row in a TableAdapter in a DataSet designer, and then choosing Delete Key option. But still, after saving changes you will still get this error. Well I guess this is a Visual Studio’s bug rather then a feature. TableAdapter methods/queries are pretty tricky if you mess with them so make sure that always recreate them insted of trying to change them through properties. In order to do so, right click on them, choose Configure and them complete all wizard steps. In worst cases, if this doesn’t help at all, delete whole TableAdapter and then recreate new one, but this time take more care. I’ve posted this since I’ve found more complicated workarounds presented on the web, and the fact is, this is quite simple once you understood it correctly.
Posted in SQL Server, ASP.NET, Visual Studio
No Comments »