Archive
Fix: remove ‘optimized for Bing and MSN’ from IE titlebar
Seems some Microsoft software (probably Bing bar) version is changing Internet Explorer title bar to write “optimized for Bing and MSN”.
To remove this:
- Use Start/Run or Start/Find and type there regedit then press ENTER to launch the Registry Editor.
- At the tree on the left navigate to HKEY_CURRENT_USER\Software\Microsoft\Internet Explorer\Main
- At the right handside of the window right click the value “WindowTitle” and select “Delete” to restore the default “- Windows Internet Explorer” suffix on the IE titlebar
IIS FTP login fails after Windows platform update for Server 2008 R2
I had recently enabled FTP access to the ClipFlair Gallery to easy its maintenance during development and after the Windows Server 2008 R2 platform update last night (together with release for Internet Explorer 10), the FTP login stopped working.
To fix it, from a command prompt with administrator rights (Start/Find, type Command and right click the Command Prompt item found to open as administrator), give the command:
netsh advfirewall set global StatefulFtp disable
It’s easy to copy-paste it from here and right-click on the command prompt title bar, then select Edit>Paste (no shortcut key for that unfortunately), then press the ENTER key and it should reply “Ok”.
Had done this before, but seems the platform update re-enabled filtering for Stateful FTP (also note that at http://www.iis.net/learn/publish/using-the-ftp-service/configuring-ftp-firewall-settings-in-iis-7 it seems to erroneously say that you need to use “enble” instead of “disable” when not using SSL).
Fix: Silverlight Media Framework Player VolumeElement out of sync
I was just adding a storable (persistent) Volume property to the MediaPlayerView class used at ClipFlair’s MediaPlayerWindow (connected to the underlying SMF player’s VolumeLevel property), when I realized that after reloading saved state, the SMF player’s Volume control would show a different value than the value set to it (which I could confirm by flipping the MediaPlayer control and looking at its properties on the backpanel that the ClipFlair app features for each component and for the activity container itself).
It seems to be some bug in the SMF logic or in its default template, since the following fix makes the issue disappear. The trick is that at a descendent class from SMFPlayer (like the MediaPlayer class that ClipFlair’s MediaPlayerWindow uses), one can override the OnApplyTemplate method (a standard method in templated XAML-based controls at Silverlight and WPF) and call the UpdateVolumeElement method shown below.
That method temporarily sets the volume to another value than its current one (this is important, just setting again to the same value would be ignored), then set again the current value to force the VolumeElement control’s UI to update.
//Project: ClipFlair (http://ClipFlair.codeplex.com) //Filename: MediaPlayer.cs //Version: 20130211 using System; using System.Linq; using System.Windows; using System.Windows.Media; using Microsoft.SilverlightMediaFramework.Core; using Microsoft.SilverlightMediaFramework.Core.Media; using Microsoft.SilverlightMediaFramework.Core.Accessibility.Captions; using Microsoft.SilverlightMediaFramework.Plugins.Primitives; namespace ClipFlair.MediaPlayer { public class MediaPlayer : SMFPlayer { public override void OnApplyTemplate() { base.OnApplyTemplate(); //... UpdateVolumeElement(); //patch for SMF bug } protected void UpdateVolumeElement() { //patch for SMF to update VolumeElement UI with any already set VolumeLevel double volume = VolumeLevel; VolumeLevel = (volume == 1) ? 0.9 : 1; VolumeLevel = volume; } //...
Update: While submitting this as a bug to SMF source site on Codeplex it came to me that I could try setting the VolumeElement’s VolumeLevel value directly at ApplyTemplate and indeed it works:
protected void UpdateVolumeElement()
{
//patch for SMF to update VolumeElement UI with any already set VolumeLevel
VolumeElement.VolumeLevel = VolumeLevel;
}
Fix: Visual Studio opens class diagram in XML editor with double click
Recently, to save myself sometime after having renamed some interfaces/classes in the ClipFlair project sourcecode, I right-clicked one of the class diagrams (.cd files) in it at Visual Studio’s “Solution Navigator” (this is an enhanced Solution Explorer addon) and using “Open With…” I opened up the diagrams with the XML editor to do a rename-all operation for the respective class names.
However, after saving the project I found out that from then on, that specific .cd file was opening up as XML file when double-clicked instead of opening up as a Class Diagram in the respective designer pane. Using Open With dialog would open it as a Class Diagram when asked to specifically, but using the checkbox to always open up as Class Diagram wouldn’t help fix the double-click problem for that specific .cd file (others would open up fine as class diagrams, not as XML files, when double-clicked).
I just managed to fix that issue by right clicking the file node in solution navigator’s tree and and excluding that file from the project (not deleting!), then saving the project, closing the solution containg the project and adding the file (via “Add existing file”) again after having reopened the solution. I could also possibly have right clicked selected “Unload project” after saving it and then select to reload it again, think that would have worked too.
Using VisualHG addon for Visual Studio I commited the changes to the Mercurial repository used by ClipFlair on Codeplex, which showed me that the file difference that did the fix was the following in the .csproj project file:
<ItemGroup>
<None Include="Diagrams\Windows.cd" />
- <None Include="Diagrams\Windows.Views.Interfaces.cd">
- <SubType>Designer</SubType>
- </None>
+ <None Include="Diagrams\Windows.Views.Interfaces.cd" />
<None Include="Diagrams\Windows.Views.ViewModels.cd" />
</ItemGroup>
That is instead of that marked-as-bold entry above (marked by the diff tool with – prefix), the line marked with + prefix should be used instead. This is obviously some bug in Visual Studio 2010, it’s nice to know though that you can easily take the project offline and edit the .csproj to fix it (or remove the .cd file, save the project, reload it and add the file again).
Fix: can not delete install subfolder after upgrading phpBB on IIS
To upgrade a phpBB forum, one usually downloads an automatic upgrade package to the latest version, selecting on the website which version they currently have. The current version number at a phpBB installation is shown at the Admin Control Panel (there’s a link to it at the bottom of the main page of a phpBB forum usually) and there admins also see a warning if they have older version and links/info on how to upgrade.
After the correct automatic upgrade package is download, the install subfolder it contains has to be unpacked into the forum folder on the webserver. From that point on the forum is taken offline and users can’t log-in or see discussions anymore till the install subfolder is deleted.
The installation process is quite smooth, you just point the browser to the install subfolder (say http://localhost/myforum/install) and then it will show a step-by-step wizard, where it first updates the database to the latest version and then shows option to update the PHP files and other file resources at the forum either via FTP automatically or by creating an archive on the fly that you can download and unpack into the forum’s folder on the webserver, replacing any previous files with the same path/filename as the ones in the archive, without closing the upgrade wizard webpage. Then you tell the wizard to check again if files are now updated and you’re done.
However, there’s one last and very important step to bring the forum online again and let users log-in again to it and/or see discussions. You have to remove the install subfolder you had placed at the forum folder on the webserver.
If you use IIS (note that you can easily install WordPress and PHP on IIS using Microsoft Web Platform Installer), you may find that you can’t delete some subfolders nested a bit deeper under the install subfolder, like db and en.
I just had this issue while upgrading phpBB on http://robotics.mech.upatras.gr/forum and had tried various ways to delete the install folder, like the handy Take Ownership command on the Windows Explorer folder context menu, to no avail – that is till I realized it was IIS that was blocking deletion of those subfolders. So I opened up IIS Manager, did a Stop action on the webserver (it might have also worked if I had just stopped the respective website) and then I could delete the install folder from Windows Explorer. Started IIS again and all was up and running nicely.
HowTo: Remove Babylon search from Mozilla Firefox address bar
Babylon Search is one of the most abusive addons for Mozilla Firefox and other web browsers. It installs with other free software (most probably profiting from tracking your searching habits) and then it is quite hard even for experienced users to completely uninstall it.
While maintaining other computers in the past I’ve used a combination of Add-Remove programs dialog, searching programs folder for Babylon text string and deleting related files, entering “about:config” at Firefox address bar and searching for Babylon in Firefox settings, right clicking each one of them to restore etc.
For the separate search bar it is easier to remove Babylon, since Mozilla has a dropdown menu there with search engine settings, however it’s sad that the aforementioned menu doesn’t control the address bar search.
However, in a recent incident I found an easier way to get rid of the crappy Babylon search which hijacks the search action when one types at Mozilla address bar some search query.
There’s a (quite hidden) action to reset Mozilla settings. You go to Mozilla’s menu (either from the old menu bar if visible, or from the newer yellowish button at the top-left of the Firefox window) and select Help/Troubleshoot problems and it takes you to an (internal) webpage that hosts a button you can use to reset all Mozilla settings to defaults (as if it was installed for the first time).
This is quite useful since even updating Mozilla (another hidden action, placed at Help/About dialog), won’t fix it if settings have been tampered with by malicious installers like Babylon’s. In fact some malicious addons for Mozilla even tamper its version setting so that it won’t update. Resetting settings as mentioned above can help with that, if not you may have to download and install the latest Firefox manually from http://www.mozilla.com (preferably download it in such a case from another browser like Internet Explorer if that seems to work OK).
Fix: The tag ‘TimeUpDown’ does not exist in XML namespace (Silverlight Toolkit)
If you use TimeUpDown control from Silverlight Toolkit in your XAML like below (copy pasting from CaptionGrid at ClipFlair source):
<ResourceDictionary
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
>
<DataTemplate x:Key="StartTimeCellTemplate">
<TextBlock Margin="4" Text="{Binding Begin}" />
</DataTemplate>
<DataTemplate x:Key="StartTimeCellEditTemplate">
<input:TimeUpDown Format="hh:mm:ss"
Value="{Binding Begin, Mode=TwoWay, ValidatesOnExceptions=True, NotifyOnValidationError=true}"
/>
</DataTemplate>
…
</ResourceDictionary>
then even though it seems to not complain in the XAML designer of Visual Studio 2010, then at Build time, even if you’ve added a reference to System.Windows.Controls.Input.Toolkit assembly (the 5.0.5.0 version for the Silverlight 5 Toolkit [December 2011 release]), you get:
The tag ‘TimeUpDown’ does not exist in XML namespace ‘clr-namespace:System.Windows.Controls;assembly=System.Windows.Controls.Input.Toolkit’
Similar bad behaviour occurs if you try to drag-drop the TimeUpDown control from Visual Studio toolbar (assuming you’ve installed the Silverlight Toolkit first) onto the XAML designer, no xml namespace (named xmlns:input above) is added and you just get <TimeUpDown /> in the designer.
The solution is to also add to your project a reference to System.Windows.Controls assembly (be sure to select same version DLL as above [e.g. 5.0.5.0]). For some reason the System.Windows.Controls.Input.Toolkit doesn’t seem to pull that together and must have some internal dependency to it (although the error you get is very cryptic).
Below is the Add Reference dialog of Visual Studio 2010, you either use the “Extensions” from the right handside, or type-in “System.Windows.Controls” at the search box to quickly spot those two assemblies.
Note that If you have a Silverlight assembly project with some UserControl in it and you apply the workaround I mentioned above, then if you use that UserControl in a Silverlight app (in a Page or other UserControl) you get a RUNTIME error this time at launch saying XamlParserError at the title bar and the exception text:
The type ‘TimeUpDown’ was not found because ‘clr-namespace:System.Windows.Controls;assembly=System.Windows.Controls.Input.Toolkit’ is an unknown namespace
This time the fix is to add a reference to "System.Windows.Controls.Input.Toolkit" to the project.
The funny thing is that this project (that uses a library that hosts a control that uses TimeUpDown itself) DOESN’T NEED to have a reference to "System.Windows.Controls", as the library does need to compile.
The other funny thing is that it does compile OK without adding the "System.Windows.Controls.Input.Toolkit" reference, but it shows runtime error.
This issue has been reported for some time now at:
but hasn’t yet been fixed.
Update:
This may also be related:
http://zoomicon.wordpress.com/2012/07/02/fix-the-tag-xxx-does-not-exist-in-xml-namespace-clr-namespaceyyy/
I noticed that when I tried to compile on a machine that didn’t have Silverlight 5 Toolkit, it was eventually trying to use the Silverlight 4 Toolkit version of System.Windows.Control.Input from my Debug folder (not sure how that DLL ended up there, probably was brought in automatically via some other library’s dependencies by Visual Studio). So maybe you end up with multiple assemblies with the same name in the project and you have to remove the old ones.
You may also run into this issue if your solution was using Silverlight 5 Toolkit and you try to build the project on another machine that has Silverlight 4 Toolkit only. Solution is to install Silverlight 5 Toolkit too and then make sure the project refers to the 5.0 version of System.Windows.Controls.Input.Toolkit.dll and that the reference doesn’t have a path that points into your solution but to the program files folder instead, where Silverlight Toolkit gets installed.
Fix: The tag XXX does not exist in XML namespace ‘clr-namespace:YYY’
I just had some big trouble troubleshooting the Visual Studio / XAML compiler error message:
The tag XXX does not exist in XML namespace ‘clr-namespace:YYY’
It turned out this occurred because I had a Silverlight library with Assembly name X and default namespace X (at properties pane), but was using it from a demo project with Assembly name X (again!) and default namespace X.
If I removed the ";assembly=X" part from the XAML it worked fine, that is:
xmlns:my="clr-namespace:X"
Fixing the demo project to use Assembly name X.Demo and default namespace X.Demo (at its Properties pane), instead of having the same assembly name, now allows me to also use
xmlns:my="clr-namespace:X;assembly=X"
without problem.
Seems that when you have multiple assemblies with the same name in a project (wonder how the filesystem supports that), all of them are loaded fine and if they have classes with namespace X in them, the namespace gets classes from both assemblies (that’s why the xmlns without assembly=… works). When you specify assembly name in the XAML of a given project, it assumes you mean its own assembly, not any other referenced one with the same name.
BTW, at add references dialog I was using Projects option (to reference the output of other project in solution) and the project I was referencing was named X.Silverlight (can be named anything), I had not added reference the X assembly .dll file directly. Maybe that played its part too in the issue.
There may be other cases too that can cause this error to fire up, see:
http://social.msdn.microsoft.com/Forums/en/wpf/thread/56f933c8-a093-4c47-8e1a-cde4bb1864e9
Fix: WordPress media uploads not working on IIS
Using Microsoft Web Platform Installer (aka WebPI), one can easily install WordPress on IIS (together with PHP and MySQL database engine.
Btw, better install the latest PHP version from there and remove any older ones. Also do install from there the Windows Cache Extension for PHP for the version of PHP you’re using.
Windows Cache Extension for PHP stores the PHP bytecode, the compiled version of the PHP script, in memory making it available when subsequent executions of the same script are needed helping to increase the overall PHP application performance. The use of Windows Cache Extension for PHP allows the PHP bytecode to be generated only once and to be reused each time the same PHP script is executed.
An issue you will definitely face is when you try to use the Media Gallery feature of WordPress to upload some media asset. It will fail due to insufficient rights to the server filesystem. You should do the following to fix this:
- Right click the folder wp-content\uploads at your WordPress site installation (usually it’s a separate folder under c:\inetpub\wwwroot, or it’s flat inside the wwwroot folder). Select Properties from the context menu that pops up. At Security tab of the Properties dialog window, add the user IUSR (not IIS_IUSR) and give it Modify and Write access apart from the Read etc. rights it already has (but don’t give Full Control). Remember to do this again every time you may replace the site folder (btw to not lose your previous uploads, neither those access rights settings, you can “cut” that folder and paste it on your server desktop, then paste it back after you’ve replaced the wordpress folder contents with say some new version of the site code, deleting first the new wp-content\uploads).
- Either repeat the same process as above for folder c:\windows\temp (or whatever system temporary folder you’ve set at advanced system properties / environment variables dialog), or to be more secure in case some PHP bug gets exploited, you can create a separate temporary folder specifically for all PHP apps or even specifically for your wordpress site and using PHP Manager plugin for IIS (can get that via WebPI) you can select to manage all settings for the whole server or for your site respectively. Then you select one-by-one the settings that say c:\windows\temp\… (or any ones that say /tmp to be safe) and change them to use the temp folder you’ve created. Make sure you use double quotes for those string settings, since the PHP Manager plugin doesn’t seem to add them itself (not sure if not having them would cause problems to PHP when trying to read php.ini file).
Troubleshoot: WCF HTTP Error 404–Not Found
Copying from MPPVE (formerly RCE) documentation:
…might indicate that WCF is not correctly configured.
To resolve the WCF issue
- The error returned is a “HTTP Error 404 – Not Found”. This might be due to an issue with the WCF scriptmaps registrations. To solve this issue:
- Open a command line console as Administrator
- Browse to “%windir%\Microsoft.NET\Framework\v3.0\Windows Communication Foundation\”
- Run the command “ServiceModelReg.exe –i”
btw, for some more troubleshooting tips regarding MPPVE and the CSM (Composite Stream Manifests) files the latest version creates in specific, checkout: