Ahmad Masykur

Share your knowledge although one function!

About the author

Ahmad Masykur is a Software Architecture Engineer at PT. Freeport Indonesia Jakarta Indonesia.
In this blog, I share things of interest to me. Most topics are likely to be related to software development, but don't hold me to it.

Certificates



Awards


Powered by

Widget Prayer Time not found.

There is an error in XML document (4, 16278).X

Page List

Validators


Ahmad Masykur

Resolving SQL BPA Command Line Problem when Running SQL Server 2005 Upgrade Advisor

Currently, I want to upgrade our SQL Server 2000 databases to SQL Server 2005. The first step is running Microsoft SQL Server Upgrade Advisor. I was installed this tool on my computer and no error in installation. When I running this tool and try to analyze database engine, it returning error message:

"SQL BPA command line has encountered a problem and needs to close. We are sorry for the inconvenience."

I confused about this error because I was use this tool a few year ago without any problems. What is the problem, my database, my account or the tool problem? I'm forget that used SQL Server 2005 Upgrade Advisor with Service Pack 1 that different with previous version that was used. I think it the tool problem. I'm try to look at the forum that any suggestions. One of the suggestions is to registering BPAClient.dll to the GAC. It resolve the problem for me.

To resolve this problem, follow the instructions below.

  1. Open Visual Studio 2005/2008 Command Prompt
  2. Change directory to C:\Program Files\Microsoft SQL Server\90\Setup Bootstrap\BPA\bin or based on your software installation path.
  3. Type following command:
    C:\Program Files\Microsoft SQL Server\90\Setup Bootstrap\BPA\bin>gacutil /i BPAClient.dll

I hope this information is helpful.


Categories: SQL Server | Tips
Permalink | Comments (4) | Post RSSRSS comment feed

Win32/Conficker Removal Tool

Last week, Microsoft released a version of the Malicious Software Removal tool (MSRT) that can help remove variants of Win32/Conficker and other resources. 

Background

Win32/Conficker.B exploits a vulnerability in the Windows Server service (SVCHOST.EXE) for Windows 2000, Windows XP, Windows Vista, Windows Server 2003, and Windows 2008. While Microsoft addressed this issue in October with Microsoft Security Bulletin MS08-067, and Forefront antivirus and OneCare (as well as other vendor’s anti-virus products) helped protect against infections, many systems that have not been patched manually through Server Update Services and Microsoft/Windows Update or through Automatic Updates have recently come under attack by this worm.  Attacked systems may lock out users, disable our update services and block access to security-related Web sites:

In response to this threat, Microsoft has:

It is our hope that these resources can assist you in resolving issues with unpatched, infected systems and that you can apply MS08-067 to any other unpatched systems as soon as possible to avoid this threat.


Permalink | Comments (4) | Post RSSRSS comment feed

How to Resolve WCF Issue: Can't host WCF service in a website with multiple identities

When a WCF service is hosted in a IIS website which has multiple identities, that is, responds on different hostnames/ports, the WCF service, when created, throws the exception below:

This collection already contains an address with scheme http.  There can be at most one address per scheme in this collection.
Parameter name: item

Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: System.ArgumentException: This collection already contains an address with scheme http.  There can be at most one address per scheme in this collection.
Parameter name: item

I am aware that this behavior is by design and I believe that it can be resolved. I'm searching to forums, MSDN and blogs but no solution was found. I'm only found one solution to create a custom ServiceHostFactory which filters the additional base addresses and instantiates the service on one of them only. Thank to Zeddy for the helps. This issue can be resolved by creating a custom ServiceHostFactory which clear all baseAddresses then override Behaviors and ServiceEndPoint described below.

Create Custom ServiceHostFactory

Create new class for custom ServiceHostFactory below.

using System;
using System.ServiceModel;
using System.ServiceModel.Activation;
using System.Linq;
using System.ServiceModel.Description;

public class MultipleIISBindingSupportServiceHostFactory : ServiceHostFactory
{
    protected override ServiceHost CreateServiceHost(Type serviceType, Uri[] baseAddresses)
    {
        // return the emply list Uri to make it automatically select baseAddresses by endpoint configuration
        var host = base.CreateServiceHost(serviceType, new Uri[] {/*empty*/ });

        // Setup MEX dynamically
        var behavior = new ServiceMetadataBehavior
                           {
                               HttpGetEnabled = true,
                               HttpGetUrl = baseAddresses.Where(addr => addr.Scheme == "http").First()
                           };
        host.Description.Behaviors.Add(behavior);
        
        // Setup Endpoint configuration dynamically
        foreach (var uri in baseAddresses)
        {
            // Service endpoint support http scheme only, exclude https scheme
            if (uri.Scheme == "http")
            {
                host.AddServiceEndpoint(serviceType,
                                        new BasicHttpBinding(BasicHttpSecurityMode.None),
                                        uri
                    );
            }
        }
        return host;
    }
}

 

Modify WCF Service Markup

To modify WCF Service Markup, right click on the MyService.svc file and then click "View Markup".

<%@ ServiceHost Language="C#" Debug="true" 
    Service="MyService" 
    CodeBehind="MyService.svc.cs"
    Factory="MultipleIISBindingSupportServiceHostFactory" %>

Modify Web.config File

Open web.config file and going to line with <system.serviceModel> element, replace <system.serviceModel> and all child elements with following config.

<system.serviceModel>
  <diagnostics>
    <messageLogging logMalformedMessages="true" logMessagesAtTransportLevel="true"/>
  </diagnostics>
  <serviceHostingEnvironment aspNetCompatibilityEnabled="true" />
</system.serviceModel>

After all steps above was done, the multiple identities issue should be resolved.

I hope this tips will be helpful.


Categories: WCF
Permalink | Comments (9) | Post RSSRSS comment feed

Google Talk is Crashing when Changing Status to “Show current music track” using Winamp 5.5

Winamp is my favorite music player with classic theme. Winamp is very simple music player. I’m using winamp for MP3 and online radio streaming player. I wanna share my winamp track status in GTalk but it getting hang. Please follow the steps below to resolve the issue:

  1. Exit Winamp and Google Talk
  2. Open notepad, keep blank document. Note: you must run notepad in administrator mode (right click and run as administrator in Windows Vista).
  3. Save the blank file to %PROGRAMFILES%\Winamp\winamp.m3u or %PROGRAMFILES(X86)%\Winamp\winamp.m3u for x64 OS.
  4. Open Winamp and Google Talk again.

Now, you can change your GTalk status to “Show current music track” without causing hang.


Categories: Tips
Permalink | Comments (1) | Post RSSRSS comment feed

Prayer Time Widget for BlogEngine.NET 1.4.x

Prayer Time is time schedule for moslem prayer. This widget shows the daily prayer time based on user location. Thispicture below shows prayer time at January 11, 2009 in Jakarta. If you are from outside of Jakarta, the prayer time will automatically calculate base on your location.

image

I’m using prayer time algorithm from here and previous post here. This widget use Shafii and Muslim World League calculation except Indonesia and Malay use custom calculation.

Complete source code can be downloaded from here. The installation is very easy, follow installation steps below:

  1. Extract the zip file to widget folder of your BlogEngine.NET site
  2. Login as Administrator
  3. Goto buttom of page
  4. Select “Prayer Time” from available widgets in combo box as picture below.
  5. Click Add.
  6. You can also move the widget to another location by refreshing the browser and drag n drop “Prayer Time” widget to desired location.

image

 

I hope this widget be useful for moslem blogger.


Categories: BlogEngine
Permalink | Comments (15) | Post RSSRSS comment feed

Upgrade to BlogEngine.NET 1.4.5

Alhamdulillah, my weblog already upgraded from BlogEngine 1.2 to BlogEngine.NET 1.4.5. Upgrading process is easy but should be carefully because there are incompatible settings and themes between BlogEngine 1.2 and BlogEngine 1.4.5. To upgrade BlogEngine from version 1.3 or 1.2 to version 1.4.x, you must prepare following items before upgrading:

  1. Upgrade theme if you are using custom theme (not included in theme package).
  2. Backup your xml data or database
  3. Backup your settings
  4. Create custom widget (if needed).

I’m alredy updated my theme (Cogitation) for BlogEngine 1.4.x and create new widget (Image List) for displays image in the side bar. You can download Cogitation theme and Image List widget from following links.

After upgrading BlogEngine, theme and installing widget, you might be need to reconfigure widgets. Rearange and add widget that you want to display in side bar.

I hope my theme and widget are useful for you.


Categories: BlogEngine
Permalink | Comments (17) | Post RSSRSS comment feed