by Andreas

HTML tag telling smartphones to dial a number for you

imageI wasn’t aware of this until today, and figured I’m either a bit slow or this might be something more of us are unfamiliar with. When developing web applications for smartphones or tablets with GSM capabilities you can create links of your phone numbers the same way you create email links that tell your default mail client to open up a “New email” window (href=”mailto: someone@thisaddress.com”)

By adding “tel:” to the anchor tag on your page, supporting devices (I’ve tested WP, iPhone and Android) will ask if you want to call the number you’ve clicked:

<a href="tel:+4722048700">Call us</a>

 

or

<a href="tel:+4722048700">+47 22 04 87 00</a>

 

(PS: don’t try calling that number. It’s belongs to the Royal Palace of Norway, and they’ll get the shits if you call and tell them you’re “just testing this new anchor tag!!”)

by Joakim

Getting back «Developer options» on Android devices running Jelly Bean version 4.2+

During the Christmas holidays I finally received my new phone, a “Nexus 4″. It’s a pretty good phone, and quite reasonably priced (even here in Norway). Being an official Google device, it runs the very latest version of Jelly Bean (which as I’m writing this is 4.2.1). It turns out that Google decided to hide the “Developer options” from being readily available from the system settings starting with version 4.2. It’s not that I do much (any) development for Android, but there is one option in there that I really like, the possibility to turn on the “Screen will never sleep while charging”-feature. There wasn’t any need to worry though; it was quite easy to get everything back. Here’s how you do it:

  1. Open up Settings on your phone, scroll down to the bottom and tap on About Phone
  2. Inside About phone scroll down to the bottom again and tap on Build number 7 times
  3. Going back to the Settings-menu you should now be able to see/access the Developer options

There doesn’t seem to be an option to hide the “Developer options” again though (at least not for now), so keep that in mind. Once a developer, always a developer, I guess! J

by Andreas

Remove action icons from text fields in Internet Explorer 10

Internet Explorer 10 introduced a new feature for input fields: the action icon. These certainly are user friendly, but introduces a problem with KnockoutJS which depends on changes being made to a field by key stroke (read more about forcing binding re-evaluation in one of my other blog posts). If you have a text field where you enter a value to filter the contents of a list, deleting the contents using the action icon will not trigger an update to the view model.

Here’s a text field displayed in Internet Explorer 10:

image

As you can see, the action icon is visible and will clear the contents of the text field when clicked. However, unless you add a custom binding your KnockoutJS view model will not re-evaluate its bindings and trigger an update of your filtered list. That will only happen if you start entering a new value in the text field, or change focus to a different control.

The quickest fix is to remove the action icon through CSS:

::-ms-clear {
      display: none;
}

Refresh your page and notice that the icon is now gone:

image

 

Note: this does not work when you’re running IE10 in IE7, IE8 or IE9 mode.

by Stian

The [NeutralResourceLanguage] attribute is missing on the entry assembly

When trying to submit a new application or update an older (pre-mango) application in the Windows Phone marketplace / AppHub, you may get the unpleasant surprise of an error saying “The [NeutralResourceLanguage] attribute is missing on the entry assembly”

This is due to a new requirement that came around the launch of Mango. All applications must now have a natural resource language specified (will allow the new languages that came with Mango to work correctly).

There is an easy way to fix this, I will give you two ways it can be accomplished:

ATIV-S-Product-Image-Front-5-600x399Option #1

Update your Assembly.cs:

// Add this to you usings
using System.Resources;

// Then add this line in the code
[assembly: NeutralResourcesLanguageAttribute("en")]
Option #2

Follow these steps:

  1. Right click the project name in Solution Explorer and click Properties
  2. Under the Application tab, click the Addembly Information button
  3. Select the default culture in the Neutral Language list
by Aage Andre

DPM has detected a discontinuity in the log chain

When using DPM to backup Exchange 2010 databases, I kept getting this error for one of the mailbox-stores. The only concrete resolution was to disable circular logging, but this has never been enabled on the servers in question.

Simple solution:

- Dismount the databases in the Storage Group
- Make a copy of all .log files in the log-directory of the storage group, and then delete them.
- Remount the databases.

by Stian

Outlook: Synchronization Errors shown as unread e-mail

I’ve been bugged a lot with some synchronization errors between Outlook 2010 and our exchange server. I check different forums to try to figure out how I could fix these problems, but so far I only have a solution that at least keeps it out of my sight.

There is a “Sync Issues” folder in the root of your exchange account and this is where several times a day I get new errors like this one:

14:12:40 Synchronizer Version 14.0.6109
14:12:40 Synchronizing Mailbox ‘XXXX XXXXX’
14:12:40 Synchronizing local changes in folder ‘Drafts’
14:12:40 Uploading to server ‘XXXXXXX.mailbox.com’
14:12:40 Synchronization of some deletions failed.
14:12:40                                 [0-130]
14:12:40                   1 item(s) deleted in online folder

14:12:40 Done

I don’t experience any problems in Outlook and I wouldn’t know there was a problem unless these sync issues showed as unread e-mails in the default Search Folder “Unread e-mail”. I wanted to solve the errors because they showed there, but as I realized that this wasn’t an issue worth throwing hours at, I figured out a way to change the “unread e-mail” search folder instead.

To customize the search folder, follow these steps:

  1. Right click the “Unread e-mail” search folder
  2. Click “Customize This Search Folder…”
  3. In the “Mail from these folders will be included in this Search Folder” click “Browse”
  4. Select the folders that you want to show results from – note that the Sync Issues folder is not even showing in this list, but since the top node is selected by default, it is included.

menuoutlook2012-12-11_0735

Selecting the “Inbox” with “Search subfolders” ticked would be a great suggestion here as long as your personal folders are located directly under your inbox and not in the root.

by Joakim

Error when clicking a hyperlink in Outlook (Win8/Chrome)

I switched to Windows 8 on my computer as soon as it was available as an RTM version on MSDN, and so far I’m really happy with Microsoft’s latest OS offering. I have however run into a few problems related to using Chrome as my default browser (e.g. the problem I had with external links in Visual Studio 2012).

The problem for today is the error message I got when clicking hyperlinks in emails using Outlook. Instead of the hyperlink launching a website in my default web browser (Chrome) I would get an error message saying;
This operation has been cancelled due to restrictions in effect on this computer. Please contact your system administrator.”

outlook-link-error

The cause of this problem lay in the registry. It turns out that Chrome modifies some values in the registry that it (probably) shouldn’t, namely Computer\HKEY_CLASSES_ROOT \.htm and Computer\HKEY_CLASSES_ROOT \.html

outlook-link-error2

Chrome had changed the (Default) value of both these entries from htmlfile to ChromeHTML….  Changing the value back to htmlfile fixed the problem. Clicking hyperlinks in emails now opens up the web address in my default browser (namely Chrome) just as expected. No annoying error message.

It looks like you could run into this problem under other circumstances than mine (Win8/Chrome as default browser), as Microsoft has written a support article about it which can be found here. The support article lists several methods to fix the problem, depending on what the root cause for the error is.

by Joakim

Using WinMerge as the default diff/merge tool in Visual Studio 2012

I found the default diff/merge tool in Visual Studio 2012 to be a huge improvement over previous versions, as you know is actually able to see what has changed quite easily.

vs12-compare-1

But that being said, I still prefer to use WinMerge as the default diff/merge tool since it has more features. Another nice feature of WinMerge is the possibility to integrate it into Windows Explorer which allows me to diff files (and folders) on my hard drive.

So how do you make WinMerge the default diff/merge tool in Visual Studio?

Go into “Tools –> Options –> Source Control –> Visual Studio Team Foundation Server”, click on “Configure User Tools …”, and add new commands for the “Compare” and “Merge” operations.

vs12-compare-3

vs12-compare-4

Values for the compare command;
Extension: .* (meaning all files)
Operation: Compare
Command: C:\Program Files (x86)\WinMerge\WinMergeU.exe (the path to where WinMergeU.exe is located)
Arguments: /e /u /wl /dl %6 /dr %7 %1 %2 (the arguments for WinMerge, I’ll explain them in detail further down)

Values for the merge command;
Extension: .*
Operation: Merge
Command: C:\Program Files (x86)\WinMerge\WinMergeU.exe
Arguments: /e /u /wl /dl %6 /dr %7 %1 %2 %4

After you add these two commands, right-clicking a file in Visual Studio and selecting “Compare…” should result in the two files being opened and compared in WinMerge. Should you want to go back to using Visual Studio’s own diff/merge tool, you just remove the two commands again.

vs12-compare-2

So what do the values used in the arguments field in the two commands actually mean?

Values starting with a forward slash (/) are WinMerge command-line parameters. The full list of possible parameters can be found here. But I’ll list the ones I use (not all of them are necessary, you may remove some or add others as you prefer):

/e –> Enables you to close WinMerge with a single Esc key press
/u –> Prevents WinMerge from adding either path (left or right) to the Most Recently Used (MRU) list
/wl –> Opens the left side as read-only
/dl –> Specifies a description in the left side title bar
/dr –> Specifies a description in the right side title bar

Values starting with a percentage sign (%) are provided by Visual Studio as input for the WinMerge parameters. You can see what they stand for by clicking the “play” button behind the arguments field when you create the command, but I’ll list them here as well (I’ve greyed out those I don’t use):

%1 –> Original file
%2 –> Modified file
%3 –> Base file
%4 –> Merged file
%5 –> Diff command-line options
%6 –> Original file label
%7 –> Modified file label
%8 –> Base file label
%9 –> Merged file label

WinMerge can be downloaded the from here.

by Andreas

Sharepoint 2010 – get rid of the Windows Security login dialog

When you’re running Sharepoint 2010 in your development environment you probably wont have a domain and Active Directory set up. After all, it is a bit of an overkill when it’s just you and your cat that require a login and a profile. Unfortunately the lack of an Active Directory means you will be prompted to enter your username and password each and every time you open up your Sharepoint site, whether this be during development and debugging or just accessing the intranet you’ve set up (for you and your cat – hey, animals need shared calendars and document libraries too..).

image

“Remember my credentials” doesn’t seem to work in this case, and if you’ve attempted to create a new entry in the Credential Manager you’ll soon find out that it doesn’t help either (which is where “Remember my credentials” should have stored your login info in the first place). So, the trick is to add your Sharepoint site as a local intranet site in Internet Explorer. Go to Internet Options, open the security tab and choose “Local intranet”. Click sites, and in the following dialog box choose Advanced. If you did this while browsing your Sharepoint site the web site address should already be in the input textbox, but if not just add it manually (e.g. “http://localhost”):

image

Close your browser and reopen your Sharepoint site – and you’re automatically logged in.

by Andreas

Visual Studio 2008/2010/2012 error: “The following module was built…”

I just encountered DAE #6 (Daily Annoying Error) when debugging an application:

The following module was built either with optimizations enabled or without debug information

image

This was in a solution with a couple of (signed) Sharepoint webparts, and even though I was attempting to debug a standalone command line app, the assembly in question was one of the webparts. Visual Studio seemed to believe that this code wasn’t “my code” (copyright infringement, anyone?), so by going to Tools –> Options –> Debugging –> General you can disable the “Enable Just My Code” option to fix the problem:

image

You might also want to look at other options, but at least this one worked for me this time.