Sunday, December 27, 2009

HP ProLiant boot failure

After firmware update on HP ProLiant you may encounter following trouble: the machine failes to boot form HDD or USB stick.
The system check routine displays valid boot sector on HDD, but the boot still fails.

The possible reason: check if your box has an external USB HDD attached. Try to detach the USB cable, restart the machine - and enjoy!

UPD: alternatively
1. Boot the box and enter the boot setup
2. Insert floppy boot option between HDD and USB (you shouldn't have any floppy drives, but the boot option is still here)
3. Reboot the box

Saturday, December 05, 2009

Windows Live Writer @Win7

This entry was written with Windows Live Writer @ Windows 7.

I like it!

Wednesday, December 02, 2009

While using "Result to Text" the output is trimmed to 256 chars

The output of query results in SQL Management Studio (Microsoft SQL Server 2005, 2008) is redirected default to Grid(s).

Optionally you may want to redirect them to text (for example, to re-use output as composed statements etc.). You will be wondered, why the same results are displayed complete while "Results To Grid" set and trimmed to 256 chars once you switch to "Results To Text".

The reason is the default setting in Query Options:



Adjust the setting "Maximum number of characters displayed in each column" and enjoy!

Thursday, October 29, 2009

eTrust Realtime Monitor does not start on Windows Server 2003

Once you installed eTrust Agent on Windows Server 2003 be careful in session management.

Following scenarion takes place:
1. Administrator starts first terminal session to the box and sees the eTrust Realtime Monitor started normally.
2. Administrator disconnects (no logout!) the session.
3. Administrator starts another TS or performs logon on the console: Realtime Monitor doesn't start.

While eTrust runs in background and still protects the machine, there's no notification icon in systray neither possibility to start the updates manually, to open eTrust console etc.

Solution: logout all the connected sessions and restart eTrust Realtime Monitor manually ß it worked for me.

Enjoy!

Monday, October 26, 2009

Two of most popular problems with handmade XML

Sooner or later everybody tries to master his/her own XML files using notepad. And sooner or later one gets troubles with it:

1. XmlSerializer reports on Deserialize():

"http://abcde.efg/blabla" was not expected here

Assure the case in the path - xmlns attribute value is case sensitive: http://abcde.efg is not the same as http://Abcde.efg

2. Trying to open a "handmade" XML file in Internet Explorer

Invalid character in content. Error on processing the resource file:///filename

Most popular cause: create XML with notepad and save a ANSI. Once there's a special character in the content (like german Umlaute or french accents) - you'll be notified with the error message above.

The cure: open the file and save as UTF-8.
Check also MS KB

Enjoy!

Friday, October 16, 2009

Generation of designer file failed: The method or operation is not implemented.

Working with AJAX and ReportViewer controls with VS2008 in an Web Application, we've got suddenly a problem: the designer file for a WebForm won't update.
The error in VS error pane sounds:

Generation of designer file failed: The method or operation is not implemented.

After a numerous tries and web searches the workaround is:
1. Delete designer file.
2. Restart VS and reopen the project (important step!).
3. Open a context menu on a victim page (.aspx) and select "Convert to Web Application"

The designer file with correct entries appears immediately.

Enjoy!

Tuesday, October 13, 2009

Timer in managed Windows Service

Writing a managed Windows service be careful trying to implement any timer functionality: Timers from Forms namespace won't work - mostly

Use System.Threading.Timer instead.
A couple things to know:
1. Use the Timer constructor wisely:
public Timer(
TimerCallback callback, // create a private void method with only stateInfo
// argument (the method signature is essential)
Object state, // can be null if you do not plan to use a sync object
int dueTime, // delay before first timer event gets fired
int period // timer event interval - what else
)
2. Use Change method to Stop/Restart the timer:
public bool Change(
int dueTime, // set Timeout.Infinite to stop the timer or smth else to continue
int period // see above
)

3. Do not forget to Dispose() the timer when it is no more required

Enjoy!

Thursday, October 08, 2009

BizTalk 2009 configuration error 0x80070002 deploying Microsoft.BizTalk.GlobalPropertySchemas.dll

Seen this week: installing BizTalk 2009 x64 on two machines farm (one SQL 2008 SP1 and the second BizTalk 2009) - both Windows Server 2008 R2 Enterprise - we encountered permanent error configuring BizTalk group:

[INFO] WMI Deploying 'C:\Program Files (x86)\Microsoft BizTalk Server 2009\Microsoft.BizTalk.GlobalPropertySchemas.dll'
[WARN] AdminLib GetBTSMessage: hrErr=80070002; Msg=File not found

The cause of the error is DTC: you have to configure DTC on BOTH the SQL and BT boxes according the BizTalk installation guide.
What more to check:
- SQL server protocols enabled? (TCP/IP, Named Pipies)
- Firewall rules on BOTH machines should enable SQL connection
- DTC rules must be enabled on BOTH nachines.

Once we checked and implemented the requirements above - the BT group was installed in minutes.

Enjoy!

Thursday, September 24, 2009

Remote Managemet for DLINK DIR-100 problem

If you have an DIR-100, you may encounter a problem with setting remote management.
The manual says: just enable the remote management, select the port and save the settings...

Do not believe! Until you reboot the router, you will unable to contact to your router from internet.

If the DLINK guys read this post: you'd better update the manual and online help of this router.

Once the router rebooted, you can manage it over Web.

Every boot does good!

Enjoy

Add Windows Server 2008 R2 DC to existing Windows Server 2008 domain

Clear situation: you run a domain using Windows Server 2008 (SP1) and going to add an additional DC. But this time you plan to have a DC running Windows Server 2008 R2.
The Microsoft article describes all the preparation steps you need.

But once you start dcpromo on the new DC, you fail with an error message saying you have to run adprep /forestprep prior to add the new box as DC to the domain.

The adprep utility is resided under \support\adprep on the setup disk of Windows Server.

The clue is:
1. Copy adprep folder from setup disk of Windows Server 2008 R2 to the current DC running Windows Server 2008 (previous version).
2. Start it from there, watch for errors and expect successful finish.
3. Re-run dcpromo on the Windows Server 2008 R2 box.

Attention! Do not use adprep from Windows Server 2008 (the version of OS running on the existing DC), take the newest one (from Windows Server 2008 R2).

Enjoy.

Update: here the schedule worked for me

1. Starting with domain running W2K8 you are going to replace the DC with W2K8 R2
2. You setup a W2K8 R2 machine and make it domain member
3. You add the AD services role to the this new machine
4. You look for setup media with W2K8R2 bits and copy the \support\adprep folder to the W2K8 OLD DC!!!
5. You open an TS to the W2K8 OLD DC and start “adprep /forestprep” – watch for messages, must finish successfully!
6. You switch to the new W2K8R2 machine and launch dcpromo promoting the new W2K8R2 box to be an additional DC in the forest.
7. Do not forget to replicate DNS on this step. Mostly the DNS service is not running on this step and will need a time to start and synchronize with the OLD DC!!!
8. After a while start “active directory sites and services”.
9. Expand until you will see the – at least two – leaf nodes: one is your OLD DC and one is the NEW ONE.
10. Create new connections for replication on the new DC and let it replicate.
a. First you may receive an error with RPC server not available
b. Wait a couple of minutes until DNS synchronizes
11. After a while comes the message about succeeded synchronization.
12. You are done, lucky you! Now the old box can be powered down…

Wednesday, September 16, 2009

Windows Server 2008 R2 freezes on Dell (Part II)

Remember this post?

After long time and numerous investigations (thx to my colleague taking time to analyze the hang dumps!) we finally found out:

1. The problem is encapsulated in Samsung SATA HDD used as secondary drive: all the intensive file system operations led to freeze state of the box.
2. The OptiFlex 740 is known for problems with Samsung HDDs (look at OptiFlex recommended downloads list - navigate to download site and search for OptiFlex 740). Even W2K3 can hang using some Samsung HDDs (fortunately, my box had no problems with Samsung HDDs under W2K3).
3. Dell, nVidia and AMD do not provide actually complete list of drivers for Windows Server 2008 R2: for the moment of this post there are no installable drivers for the chipset (nVidia 6100/6150) and graphis adapter (in my configuration - 256 MB ATI dual monitor card).

We run stress test to confirm the problem is solved.

By the way: the "bad" HDD was put into external USB SATA<-->USB adapter and does work without problems as external disk now...

Enjoy!

Monday, August 31, 2009

The remote certificate is invalid accroding to the validation

Two Windows Server 2008 SP1 boxes, both x64. One runs WCF service hosted in IIS secure website (SSL), the second consumes the service using WCF client.

The configuration does work just fine on two Windows Server 2008 SP1 x86.

Using IE we installed the certificate in all the possible storages on the client computer: IE navigation shows the services files without any certificate errors or warnings.
But the client won't work reporting
"The remote certificate is invalid accroding to the validation".

The problem is: using IE you install it into current user storage, not computer storage - thus the client running under its own service account still cannot validate the certificate.

We should install the certificate into computer storage using MMC and not the internet settings control panel applet.
Do not forget to launch the MMC as local admin!

Later seen also:

http://brainof-dave.blogspot.com/2008/08/remote-certificate-is-invalid-according.html


and

http://www.arcencus.nl/Blogs/tabid/105/EntryID/39/Default.aspx


Enjoy!

Tuesday, June 16, 2009

Could not connect to SQL Express 2008

Have connection problem accessing SQL Express 2008? Try following:

  1. Check SQL Server network configuration for the installed instance: ensure TCP/IP protocol is enabled, activated and listens to the port 1433. Restart SQL service after each change in service/network configuration.
  2. Try to connect to installed instance locally using osql.exe (to find in %Program Files%\Microsoft SQL Server\100\Tools\Binn):
    osql -S localMachineName -E
    or
    osql -S localMachineName\instanceName -E
  3. Does it work? Try the same from remote machine (i. e. from the client where you experienced connection problems).
  4. Connection timed out on login? Or another message like "Connection string invalid"? Return to the SQL Express machine and check the firewall settings.
  5. Ensure firewall rules allow port 1433 as exception.
  6. Ensure firewall rules allow sqlservr.exe as exception: ensure the path is %Program Files%\Microsoft SQL Server\MSSQL10.\MSSQL\Binn\sqlservr.exe
  7. Check firewall rules on the client: at least the port 1433 should be allowed.
  8. Retry the connection: does it work now? My client can connect now - and yours?
Do not ask me, why the SQL Express 2008 doesn't configure automatically firewall exceptions: neither during setup nor while perform SQL servic configuration. It is so...

Enjoy!

Thursday, June 04, 2009

Windows Server 2008 R2 freezes on DELL OptiPlex 740

Couple of days ago I've installed Windows Server 2008 R2 Standard on my playground box: an OptiPlex 740 from DELL.
Unfortunately, the machine runs extremely unstable: freezes, becomes suddenly terribly slow, doesn't respond on network access requests.

Guessed the problem are drivers, I was looking around for some updates from DELL and found new BIOS version (I had 2.1.8, the new one is 2.2.2).

After update the strange effects didn't apper yet. Let's wait...

Anyway: if you are going to setup WIndows Server 2008 R2 on your box - update BIOS before setup and enjoy Windows Server 2008 R2, the first Microsoft Server Operating System available only as 64-Bit OS.

Monday, May 18, 2009

Troubleshooting LiveMesh setup

Well, LiveMesh is still beta... Tried to install on three different boxes:
  • Vista Ultimate en-us SP1 - ok
  • Windows Server 2003 Std en-us SP2 - ok
  • Windows XP Pro en-us SP3 - failed... Failed with blue screen and other ugly things.
Reboot, restart Windows XP, restart Live Mesh - setup fails with error code 0x80070020.

1. Go to %temp%, delete LiveMesh folder.
2. Go to %programfiles%, delete LiveMesh folder.
3. Open regedit, delete HKLM\Software\Microsoft\LiveMesh.
4. Restart OS.
5. Re-install Mesh: it worked for me.

Enjoy!

Wednesday, May 06, 2009

Custom data generators for VSTSDB (GDR R2)

The GDR R2 of the Visual Studio 2008 is released!

Among numerous improvements (see here), there's a very useful functionality - automatic data generation.
There are some built-in test data generators providing you with random generated data. In case of your need to get randomized test data matching your specific regulations, the extensibility of VSTSDB allows you to plug-in your own data generators.

The creation of a custom data generator is surprizingly easy: attached code demonstrates implementation of a custom car signs generator for Germany and Russia and can easily be extended for other countries.

The sources and installer are available for download or on request (just put a comment below).

How to use:
  1. Install VSTS 2008 GDR R2.
  2. Close all open instances of VS.
  3. Install special string generator.
  4. Open VS and create or open a database project.
  5. Create or open a generation plan for table(s) with string fields to receive random car signs.
  6. Select table and field to receive custom car signs.
  7. In the generators list select "CarSignGenerator".
  8. In Properties Window enter desired country (currently only DE and RU supported).
  9. Use VS Menu "Data" -> "Data Generator" -> "Preview Data Generation" to inspect generated car signs.

Enjoy!

Wednesday, April 29, 2009

Deployment of BizTalk 2006 R2 solution failed with "The database or the database version is incompatible with the installed version of this product"

Scenario: you have created a BizTalk 2006 R2 solution (using Visual Studio 2005) on one machine and just copied it to another one to continue work and deploy. The rebuild goes fine, but when you try to deploy the solution, the error message comes:

"The database or the database version is incompatible with the installed version of this product"

Probably you had different versions (mostly SP of SQL Server) on your source and target machine.

What to do?

1. Close the solution.
2. Open Explorer and delete *.btproj.user files.
3. Reopen the solution, rebuild and deploy it.

Enjoy!

Monday, April 20, 2009

"Sharepoint Designer 2007 - now free!" or how to build a webportal with minimal investment

Good news, folks! Sharepoint Designer is now free - look here!

From now everybody can build webportal with minimal investments:
- Windows Sharepoint Services ("small MOSS") - free;
- Sharpoint Designer - free;
- Additional Kits (for example, accessibility kits - ARF, AKS, BKS) - free!

The only things required: a machine, a license of Windows Server (2003 and better), an internet connection and a little bit of time :-)

Enjoy!

Sunday, March 29, 2009

Problem with localization ASP.NET applications: thing to keep in mind

Ever tried to create an localizable ASP.NET 2.0 application?
Seen following links?
http://msdn.microsoft.com/en-us/library/fw69ke6f(VS.80).aspx
http://msdn.microsoft.com/en-us/library/w7x1y988.aspx
http://msdn.microsoft.com/en-us/library/1021kkz0.aspx

It does work very well until you decide to keep only localized resources, for example:

MyPage.aspx.en-US.resx
MyPage.aspx.de-DE.resx
MyPage.aspx.ru-RU.resx

Once you delete the default resource MyPage.aspx.resx - the localization stops to work!

So here is the rule:

NEVER DELETE DEFAULT RESOURCE FROM PROJECT IF THE APPLICATION MUST BE LOCALIZABLE

and enjoy...

Thursday, March 26, 2009

Windows Server 2008: alternate actvation method not available

You may encounter a problem with activation of Windows Server 2008: there's no internet connection in place (for example, a virtual machine with internal connect only) and the link to alternate activation methods either does not appear or disabled (not clickable):



The reason is: you have no or wrong product key entered. As long as you do not change the product key you won't be able to activate you copy of Windows Server 2008 by phone.

So enter the valid product key and retry.

Enjoy!