Oct 21, 2011

PowerShell: script permissions

If you try to run a PowerShell script you can get something like Script.ps1 cannot be loaded because the execution of scripts is disabled on this system. Yet after running:

Set-ExecutionPolicy Unrestricted

you still get the same message! Then I bet you are running x64 system. That's because there is two versions of PowerShell on the x64 systems, both x64 and x86. And both must be set to desired execution policy to achive desired effect.

SharePoint: Service unavailable

If you receive "Service unavailable" then you try to open SharePoint 2007 Central Administration then it means your application pool for it (usually "SharePoint Central Administration v3") is stopped. But if you start it and it stops again, as you try to open administration page, then it means that you farm credentials are corrupted. This worked for me as a fix:

stsadm -o updatefarmcredentials -userlogin DOMAIN\login -password password

then run:

iisreset /noforce

and have a nice day.

Oct 4, 2011

How to force full backup for BizTalk backup job

Sometimes you need to force a full backup of BizTalk backup job. For example, then you reconfigure BizTalk, you can receive an error on some of the BizTalk jobs saying something about that backup is not possible without full backup. To trigger full backup on next job run you need to execute BizTalkMgmtDb.dbo.sp_ForceFullBackup stored procedure. More details can be found here.

Sep 27, 2011

Yet another BizTalk error

Your BizTalk installation worked like a charm, but suddenly you receive errors like this?

There was a failure executing the receive pipeline: "PipelineName, PipelineAssembly, Version=, Culture=neutral, PublicKeyToken=..." Source: "Init Message Processing Properties" Receive Port: "..." URI: "..." Reason: Loading property information list by namespace failed or property not found in the list. Verify that the schema is deployed properly.
In my case, and, as it seems, some others, this was caused by corrupted installation of third party adapters for BizTalk. Reinstallation of adapters solved the problem.

Sep 19, 2011

BizTalk tools: LoadGen 2007

The Microsoft BizTalk LoadGen 2007 Tool is the tool you want for load and performance testing of your BizTalk Server instance. It can do all you want and don't ;-). It's very intuitive and simple, despite being made by Microsoft ;-). One nasty thing, though it uses XML files for configuration it will not work if you add standard (!)
<?xml version="1.0"?>
 declaration at the beginning of the file. Except for that I didn't encountered any problems so far.

P.S. This dead blog is still very helpful if you doing your first steps in BizTalk server performance tuning.

BizTalk tools: Best Practices Analyzer

The BizTalk Server Best Practices Analyzer (V1.2 as of now) is another tool that allows you to nail minor potential problems in you BizTalk installation. It comes from Microsoft, so UI is even worse ;-), but if you really want to analaze and learn your BizTalk installation you definetely need to run it thru this app.

I must add, that such tools allows you to learn about some aspects of BizTalk, which you didn't even thought of before. This is very good in my opinion, it's extends your knowledge horizon and you understand system complexity deeper. You may not need that knowledge now, but you will be prepeared.

WPF: Final

So here it comes, Windows 8. This discussion on StackOverflow provides some really good answer about all-new WinRT platform from Microsoft employee. BTW seems like this fellow is definetely monitors and answers most of winrt tagged questions on StackOverflow, this is so nice of Microsoft.

So, what is the answer to question "Is WPF is dead?". The answer is both yes and no. In fact the whole .NET system is left behind. In the UI design aspect we that while you are still can use XAML you, in fact using all new WinRT libraries which are available not only to .NET, but to C++ and JavaScript. You can name WinRT as a "Native .NET". So WPF is dead for WinRT. Yet Microsoft did very good job in saving your XAML experience in WPF, so you can use it in WinRT via "replace namespace" method. Also WPF and .NET is still there, and will be for a very long time, but I don't think this is as good investment as it was three years ago, then Microsoft pushed WPF as their primary API for UI.

Resume. Microsoft made .NET second time, this time in native languages. This results in all Windows 8 cool features we have seen, such as very low memory usage and blazingly fast speed. WPF and .NET just couldn't make it, even using DirectX, so Microsoft falled back to native apps. To me, as developer, this is actually a good thing, since we get a "Win32 Reloaded" platfrom which have all (or most of) RAD stuff which makes .NET so popular.

P.S. Related video.

Previous post on subject.

BizTalk tools: MsgBoxViewer

MsgBoxViewer is one of that not pretty, but great tools that can gather all valuable information about your BizTalk installation in one place. It'll also provide incredibly valuable recommendations given it found some inconsistencies with your BTS installation. This is very helpful in many situations, from initial BTS tuning to quick examination of unknown to you BTS installations. You should certanly give it a try.You can get MsgBoxViewer here.

Sep 2, 2011

Python Tools for Visual Studio 2010

There is an incredible product available to all of us. Not only it's extremely nice to have Python language in VS, but to me no less important that it's also open source. There is a lot of open source code, but I think this one is specifically valuable since it covers a lot of aspects of VS integration at all levels, and it's from Microsoft.

P.S. some videos on features.

Sep 1, 2011

Conjurer: crafting engine for a games

A small PR of my own open source project. Conjurer is a game crafting engine. It's relays on a Terraria game as a model for it's functional capabilities. I mean by that (since I'm not a native speaker and can produce gibberish sometimes), if you use this engine in your game all major tasks which are required to perform crafting can be performed by the engine. For example: can a specific item be created now? Answering this question requires checking if all of the requred items are available and all required conditions are met. Crafting not always result in an item. It also can be some new condition of the game. Other questions can include:
  • What items can be produced by a player with his current items?
  • What items use this item as ingredient?
  • Which ingredients are missing in players inventory for creating that item?
and, most probably, many others. Not all this questions are answered by current version of Conjurer's code (actually only the very first one), but that's the point: it can be not an easy task to implement all of it from scratch. However easiness is not a major factor for any good developer. Most of us will gladly solve some interesting task. But if this task isn't interesting to you, then it will be, I hope, very useful to you.

P.S. Terraria is a great game, you should absolutely try it.

Aug 31, 2011

BizTalk Messaging Engine error codes list

A nice guy named Tomas Restrepo created a tool to:
..lookup common HRESULT codes returned by the BizTalk Messaging Engine and pipeline components.
However, this is so programmer — to complicate things unnecessary, I've done this myself many times. Now you need to download the code, compile it, run it with argument to finally see a result. My solution is as this: search text. Or download it, change extension to ".csv" and you can view/search it in any spreadsheet editor.

The thing to remember: one error code to rule them all can have many entries. Also be aware that not all error codes are present in the table, so it's absolutely possible that will not find the one you have. However if you manage to "decipher" such error code, please, add it here in comments.

Aug 20, 2011

Old games: Popcorn

I'm kinda like old computer games rather then new ones: they always run fast on your computer. OK, just kidding. However there are some really old games, which I was happy to play back in the end of 80-s, start of 90-s at my father's work. One of them was Popcorn:

I'm actually amazed now, how fast it made it's way then to USSR. Released in 1988, and I was playing in it in 1989 already. Popcorn is actually clone of Arcanoid game, and it's best of it kind until release of Ricochet Lost Worlds game, which I really suggest you to try out.

I'm always amazed how this incredible graphics was made back in 1988:

Now, DOSBox is totally rules. Amazing piece of software. Only it allowed my to create that blast from the past today. How I've managed to find POPCORN.EXE? Don't even ask about it, 'coz I don't know, and don't remember it now. Still I would gladly accept English version of the game, since my copy if French one (I believe it's native language of game creators). It was there for some reason on my hard drive, waiting for a miracle to come, since if you run it in plain Windows XP you get:

Which is about blocking low-level disk access to hard drive (which is good, XP is a nicely protected OS sometimes). But it works in DOSBox! Not as good as I want, but works!

You can view gameplay and get the game here. Even back then the game was freeware! Kudos to creators! I wasn't aware what freeware meant back then, I was thinking that everything is free on PC. Ah, tabula rasa.

Notepad2: best replacement for Notepad

Notepad2 is the best Windows Notepad replacement, period.

It hits the spot: simple, single file, small and blazingly fast app. It's feature set is carefully limited to only most valuable functions. Thus it achived perfect balance: still as small as original Windows Notepad, yet almost as feature rich as Visual Studio text editor. I was quite excited to notice that Scott Hanselman used it in his speech at DevDays, check it out on Channel 9.

You can actually (I did) replace default system Notepad to Notepad2 using safe registry modification method:
  1. Create the following registry key: HKEY_LOCAL_MACHINE\SOFTWARE\[Wow6432Node\]Microsoft\Windows NT\CurrentVersion\Image File Execution Options\notepad.exe.
  2. Inside the key, create a new string (REG_SZ) value, named "Debugger".
  3. Set the data of this new "Debugger" value to the full path to the Notepad2 executable, followed by the /z switch. For example, "C:\Windows\Notepad2.exe" /z
In step 1, if you are in 64-bit OS use additional Wow6432Node.

Running Firefox 7.0 beta 1

To add some thrill in daily web-life I switched to beta channel of Firefox, and currently running on Firefox 7.0 beta 1:

Changes from 6.0 are almost unnoticeable. However I've so far I noticed that http/https protocol part is hidden in address input box. Questionable move since in our widescreen world saving some 20-pixels-wide horizontal space doesn't changes anything.Also I've noticed a hardware acceleration option in preferences, but as for now it's probably mostly a stub, by my guess.

Claimed memory usage improvement are not noticeble so far. Overwise beta runs pretty well, and I haven't got any even minor problems with it (not counting uncompatible plugins), so you can give it a try. Acid3 result is near to excellent, general performance is also quite good, so you can give it a try. As of now Firefox is still best browser in my opinion: highly configurable, yet with clean and simple structure.

WPF "strikes back"

As a funny coincidence next day after my post about death, or more correctly, halt of WPF development, I've received another mail from a Microsoft mailing list. There was an article in Windows development section named Автоматизация стоматологического кресла в WPF (which is something like "Automation dentist chair using WPF" in English). I was thinking "Whoa! That was unexpeted!", but real fun was after clicking a link: a 2 month old article at CodeProject, that a clever move! While maintaning, for show, some articles about WPF, Microsoft isolates itself from it, so they can say afterwards: look, it wasn't even our guy article! Nice move, but one more proof of big instability and uncertainty around WPF.

P.S. check out CodeProject — it's a great place to learn and share code.

Previous post on subject. Next post on subject.

Aug 18, 2011

Is WPF is going to it's end?

Most propably it will in a some way. There most probably, I would say is about good 80%, and some way, is "will be left as is, and will not be promoted in any way". The rumors, strong rumors, for this are floating for about a year as of now. And Microsoft is holding a silence for too long on that matter.

Some individual responses by Rob Relyea are trying to deny this, but look at Rob Relyea current position: Program Manager on Kinect for Windows Team. And then Past: * Program Manager/Architect on WPF/XAML (2001-2011). Suddenly after 10 years on WPF/XAML he is in some quite other role.

Look at the official WPF team blog. Silence since November, 2010. That's not how actively developed product blog looks like. The last big boom (and only?) about WPF was about porting Visual Studio 2010 UI to WPF, this was end of year 2009.

Nowadays, Microsoft talks all about HTML5 and JavaSript, much more than about WPF, which is quite suspicious by itself: Microsoft will stand ground puching it's own technology, if possible. One of last WPF PDC videos (7:00 AM, no audience, no questions, and horrible quality of recording) is just "beating about the bush". It's not what you expect from technology vNext presentation. Watching this video, I can just say that next version of WPF is Silverlight. WPF will be left as a host, engine, core, whatever you like, to support existing infrastructure around WPF. Future development will be forced to move to Silverlight, and there is a reason — to push and boost Windows Phone 7 applications.

The most intriguing question about all that, is, why is this happening? I think this sitiation have many aspects, this is that this comes to mind:
  • WPF wasn't that successful enough to crown it as main platform for Windows UI. There was a quite of a negative experience with WPF, Evernote 3.5 is popular example. Speed and memory of course is a major factor if you want to put all OS graphics on that, Windows is not that fast by it's own, that to think about WPF?
  • Windows Phone  7+ lobby. If you force developers to use Silverlight, then you have all desktop developers that are able to write GUI and apps for Windows Phone.
  • Microsoft wants to get it all with all those HTML[5] and JavaScript developers. If you can write windows apps in Ajax, then Microsoft doubles (at least) number of developers for it's main platform.

This note is rather confused, yet I hope it will provide you with some food for thought.

Next post on subject.

.BAT file syntax highlight in Visual Studio 2010

Looks nice, isn't it? All thanks goes to TextHighlighterExtensionSetup (yes, that's a name). It also will add syntax highlight to some other types, including INI files and PowerShell script. The only hassle is that you need to install IronPython 2.6 for .NET 4.0, yet the latest version is 2.7 but add-in will not work with it (as of now).

Aug 16, 2011

If C/C++ IntelliSense is not working in Visual Studio 2010

If C/C++ IntelliSense is not working in Visual Studio 2010, not even creating it's 'ipch' folder, and you are happen to still use almost obsolete Windows XP, then you will be surprised as much as me, since it's, in fact, a Microsoft bug, which was introduced by recent bunch of updates to WindowsXP SP3.

I found it almost by chance, since there is a lot of other reasons for broken IntelliSense. I was lucky not going thru all of solutions and ultimately become extremely frustrated since none of them would work.

Aug 15, 2011

Documentation XML auto-comments

Actually I was quite sceptical about auto-commenters which stubs some text into your thriple-slash '///' Documentation XML comments. But after using AtomineerUtils and GhostDoc for some time I must admit: if you are serious about your code quality any of this kind of tools is a must. It saves a lot of time. I was suprised if not impressed about how much actually can tool get from variable name and produce adequate comment. You can even leave it as it is, though it will be absolutely useless, but it's absolutely much easier to fix this predefined comment then to write one from a scratch.

For a most of us C#/VB.NET users, I would recommend GhostDoc, but there are some unique features in AtomineerUtils which you can try out. If you are C/C++ coder then AtomineerUtils is the only solution you have, and you're lucky because it's also extremely good.

Aug 12, 2011

WMI Explorer: best observer for WMI

WMI "table" and "column" count is overwhelming. So a tool that will let you quick and easily peek at all of this data can be very handy.

WMI Tools from Microsoft are just too slow, ancient and ugly, though it have some unique navigation abilities between related items. WMI Explorer from Advanced Network Software is done right thing. It's just best WMI observer tool that I've seen so far.

Aug 11, 2011

If BizTalk HAT is suddenly stops showing recent instances

If BizTalk Health and Activity Tracking is suddenly stops showing recent instances, and yet shows some more recent instances, then solution is usually simple. Almost always this means your SQL Server Agent is stopped working. HAT is configured by default to look at BizTalkMgmtDb and not BizTalkMsgBoxDb, but if Agent is stopped nothing copies messages from one db to the other, hence some old messages are shown, but no new appears. If this doesn't help, verify that Agent can successfully execute all BizTalk related jobs (can be permissions issues).

It's also worth mention that BizTalk heavily relies on SQL Server Agent in it's work, so it's always should be working on db servers there BizTalk bases are hosted.

P.S. Valuable discussion also here.

Aug 9, 2011

New amusing pastebin service

Ideone.com is one of it's kind now I think. And it works! Nicely addition to services like jsFiddle.

Aug 8, 2011

Complexities of C/C++ development in modern world

I have not worked with C for a very long time, until recently, then I started DiggerC project. Working with .NET all last years I've took for granted it's all the benefits this architecture gives you. Going back to pure C is like a fresh shower. I'm talking not just about manual memory management, it's least significant part. The most significant thing, that I realized almost immediately — you are almost alone with a C Standard library and a WinAPI. There is just no convenient mechanism for creating reusable libraries in C. At best you can find something like this, but no more. The other part is code manipulation. The .NET 1.0 based Visual Studio .NET (i.e. 7.0) C# projects had same, or better "IntelliSense" support than you have now in Visual Studio 2010 for C. No refactor, comment or almost any other basic coding support feature, you name it — it's not there.

Aug 6, 2011

Personal uptime record

My personal uptime record. It is, in fact, runned for some more days before building power failure.

I'm quite impressed with my Windows Server 2008 R2 Standard x64 stability. It's a developer workstation with a lot of software being installed and uninstalled for this period of time, and no reboot was necessary, nor did I experienced any slowdown or memory exhaustion with time.

Aug 3, 2011

SMS text encoding for non-ASCII characters

In which encoding text must be sent to SMSC so non-ASCII characters, like "Привет" can be readable? The answer is unexpectedly good: it's 16-bit big-endian Unicode, a.k.a UCS2, a.k.a. UTF-16BE.

Character Map in Windows Server 2008 R2

Wondering where to find old good Character Map application in Windows Server? Here it comes:
  1. Open Server manager;
  2. Go to Features Summary then click Add Features;
  3. Select Desktop Experience, click Next and Install;
  4. Reboot (duh!) as suggested;
  5. You have Character Map in Accessories -> System Tools.
Reboot server to get Character Map? That's Microsoft way :-).

Aug 2, 2011

C/C++ code Documentation XML in Visual Studio

It's amusing how Visual Studio C++ IntelliSense team completely ignores documentation helper functions of text editor, given that C/C++ code is much harder to analyze without comments than managed code. For example you don't get anything on typing /// (three slashes) before function.

Gladly I'm not the only one annoyed with this, so a cool guy named Jason Williams wrote a tool named AtomineerUtils which does just that. Again I note it does this in C/C++ code, not just managed code (in which BTW I satisfied with built-in functionality of Visual Studio.

So here is resume, and don't consider it advertisment. You want nice and clever way to add smart XML comments to your C/C++ code in Visual Studio, then AtomineerUtils is what you want. I must add that while this tool is not free, it's price — $10 is more then reasonable for that you get with it.