You are here

Feed aggregator

Node.js Library for Authentication with Windows Azure Active Directory

MSDN Blogs - Wed, 05/22/2013 - 12:00

Node.js developers: add some Windows Azure authentication and access control to your Node app with the newly MS Open Tech’s released open source library for Windows Azure Active Directory service.

Windows Azure Active Directory is a REST based service that provides authentication and access control functionality for web applications. Libraries are available that make integrating the service with web applications easier.

Microsoft Open Technologies, Inc., has developed the Node.js library in the form of Passport strategies and made the code available on github. You can use the Node Package Manager (npm) to use the library and package it into your Node.js. We are also working with the Windows Azure team to integrate this new Node.js library in the Windows Azure SDK.

As most Node.js applications use Passport as the authentication middleware, we created this new library as a couple of Passport strategies that can be used similarly to other ones. These 2 strategies are SAMLp and WSFed .

The GitHub repository also contains source code examples and instructions to configure the Windows Azure service.

Check out the Windows Azure Active Directory site to learn more about the service and get started today typing the following in your command prompt:

npm install passport-azure-ad

Let us know what you think in the comments below!

Future-Proofing Design

MSDN Blogs - Wed, 05/22/2013 - 11:44

The first thing about designing software is this:

  • Design for change first and extensibility last.
  • They're different, and so is the mindset.
  • Designing for change is about solid fundamentals.

You know from experience that the later you make a change, the more expensive the change is. How do we reduce these costs? One way to go about it is to address the change earlier, when it's cheaper. You do more requirement-gathering and design upfront. At least you try to put extensibility hooks and some preemptive code in place for when the right time comes, then you can add new stuff without having to modify the existing stuff too much. It's a great idea, but it only takes you so far. Doing it well requires increased predictive powers, you must commit now to what you think you'll need later. Predicting the future is tricky though. Adding extensibility ahead of time is like buying extended warranty for a specific incident when you should be saving for any emergency, not just the particular ones you can foresee. Too much speculative stuff too early leads to additional complexity that gets in the way of changing the code right now for things you didn't predict. Then it becomes a self-fulfilling prophecy.

All along you were trying to reduce costs, so the first question to ask is not "how do I avoid writing this code later?", but "why is writing this later more expensive?" After all, if you can make changes cheap at any time, then suddenly you don't need to be as good at forecasting.

So what makes changing code expensive? The thing is, the cost of writing the code is roughly the same whether you do it now or later. It's the cost of understanding the context in which the code is to be written that increases. The messier the context, the more expensive it becomes to plow changes through it. Between a codebase that has no extensibility hooks in place, but is otherwise broken down in small, well-decoupled and well-encapsulated pieces, and a codebase with lots of extensibility and preemptive code built in, but otherwise made of big chunks of highly-entangled, spaghetti-woven pieces, the first one is better prepared for what comes next. It can reach into a broader set of possible futures than the one you predicted.

Simply put, the probability of any change happening is larger than the probability of a predicted change happening, for the former includes the latter, of course, so go with a design that has robustness around changes in general instead of one that tries too hard to preempt future requirements. At the end, future-proofing design is about solid fundamentals: low coupling, high cohesion, good layering, keeping things simple. The beauty about it is this: it's easier to tell if a design has good fundamentals than to try to predict the domain-specific requirements that will disrupt it.

IE 开发人员中心:快速查找您需要的资源

MSDN Blogs - Wed, 05/22/2013 - 10:57

上周我们发布了重新改造的 Internet Explorer 开发人员中心 (msdn.com/ie),以简化开发人员快速查找全面的文档的过程。作为更大规模的 Windows 开发人员中心重新设计的一部分,我们根据您的反馈对我们的网站结构进行了调整,以便能够:

  • 简化跨不同版本的 IE 查找开发人员主题的过程
  • 快速查找更全面的 API 文档
  • 了解开发人员指南、教程和示例代码中的最佳做法

我们将新的 IE 开发人员中心划分为三个主要方面:

入门

您可以在此处下载 IE、了解关于 F12 开发人员工具,并访问我们的开发人员指南兼容性手册以了解最新版本的 IE 中的新增内容和更改内容。

计划

了解灵感十足的想法、更新 Web 标准的技巧、关于 Windows 8 上的 IE10 浏览体验的详细信息,以及关于免插件运行、构建自适应和触控就绪的网站和将您的网站与 Windows 集成的有用信息。

开发

访问 Web 平台功能的门户页面、我们的 API 参考、示例库和社区论坛。

“开发”部分代表着 IE 库内容的核心。为了帮助您快速查找您需要的内容,我们重新组织了我们的高流量页面以将相同主题的所有相关资源汇集到一起。

借助重新组织的 IE 开发人员中心,您无需知道哪个版本的 IE 引入或更改了功能来了解与之相关的所有信息。取而代之,您可以通过 IE 支持的现代 Web 平台功能的按字母顺序排列的列表来方便地查找我们的开发人员指南主题,或者您也可以根据主题来按区域浏览。当然,我们将继续在介绍相关内容的特定版本的 IE 开发人员指南中发布这些相同的主题。

我们还有更多的改进正在进行中,但我们希望您立即访问全新的 IE 开发人员中心,其更加有用并且可用性更强。我们将继续努力听取各位的反馈,并寻求使我们的内容更易于访问并与您的工作更相关的方式。我们欢迎您在此处的博文中或在网站上提出您的反馈。

Erika Navara,内容开发人员

IE Dev Center: Der schnelle Weg zu erforderlichen Ressourcen

MSDN Blogs - Wed, 05/22/2013 - 10:57

Seit der vergangenen Woche ist das neu gestaltete Internet Explorer Developer Center online (msdn.com/ie), in dem Entwickler einen noch einfacheren Zugriff auf die umfangreiche Dokumentation erhalten. Wir haben die Struktur der Website im Rahmen einer größeren Umgestaltung des Windows Dev Center anhand Ihres Feedbacks angepasst. Das neue Design bietet die folgenden Vorteile:

  • Entwicklerthemen zu verschiedenen IE-Versionen sind einfacher zugänglich.
  • Der Zugriff auf die umfassende API-Dokumentation wurde vereinfacht.
  • Sie finden bewährte Vorgehensweisen in Entwicklerhandbüchern, Tutorials und Codebeispielen.

Wir haben das neue IE Dev Center in drei Bereiche unterteilt:

Erste Schritte

Hier können Sie IE herunterladen, mehr über die F12-Entwicklertools erfahren und auf unsere Entwicklerhandbücher und Kompatibilitäts-Cookbooks zugreifen und sich ansehen, was in den neuesten Versionen von IE hinzugekommen ist oder sich verändert hat.

Planen

Hier können Sie sich inspirieren lassen, erhalten Sie Tipps zum Aktualisieren auf Webstandards, Einblicke in die Benutzeroberfläche von IE10 unter Windows 8, nützliche Informationen zum Entwickeln ohne Plug-Ins, zum Erstellen von adaptiven und für Touchscreens vorbereiteten Websites und zum Anheften Ihrer Website in Windows.

Entwickeln

Hier finden Sie Portalseiten mit Webplattformtechnologien, unserer API-Referenz, Galeriebeispielen und Community-Foren.

Der Bereich "Entwickeln" enthält den Grundstock der IE-Bibliotheksinhalte. Wir haben die am häufigsten besuchten Seiten neu strukturiert, indem wir alle für ein bestimmtes Thema relevanten Ressourcen zusammengeführt haben, damit Sie benötigte Informationen schneller finden.

Dank der neuen Struktur des IE Developer Center müssen Sie nicht mehr wissen, in welcher IE-Version welche Funktion eingeführt oder geändert wurde, damit Sie alle wesentlichen Informationen erhalten. Stattdessen finden Sie die Themen in unserem Entwicklerhandbuch bequem in einer alphabetischen Liste der von IE unterstützten modernen Webplattformtechnologien oder thematisch nach Bereichen geordnet. Selbstverständlich werden wir die gleichen Themen auch weiterhin in den zugehörigen Versionen des IE-Entwicklerhandbuchs veröffentlichen, in denen das Thema eingeführt wurde.

Weitere Verbesserungen befinden sich auf dem Weg, doch hoffen wir, dass Sie das neue IE Developer Center schon jetzt hilfreicher und nützlicher finden. Wir werden Ihr Feedback auch weiterhin berücksichtigen, um den Zugriff auf unsere Inhalte einfacher zu gestalten und so relevanter für Ihre Arbeit zu machen. Wir freuen uns über Ihr Feedback hier im Blog oder auf der Site.

Erika Navara, Content Developer

Centre de développement IE : trouvez rapidement les ressources dont vous avez besoin

MSDN Blogs - Wed, 05/22/2013 - 10:57

Nous avons lancé la semaine dernière une nouvelle version du Centre de développement Internet Explorer (msdn.com/ie), qui permet aux développeurs d'accéder plus rapidement à une documentation complète. En nous appuyant sur vos commentaires, nous avons modifié la structure de notre site, dans le cadre d'une refonte plus générale du Centre de développement Windows, pour vous aider :

  • à trouver plus facilement les sujets destinés aux développeurs concernant les différentes versions d'IE ;
  • à accéder plus rapidement à une documentation plus complète sur les API ;
  • à découvrir les meilleures pratiques issues des guides de développement, de didacticiels et d'exemples de code.

Le nouveau Centre de développement IE est désormais organisé en trois sections principales :

Commencer

Vous pouvez télécharger IE, obtenir plus d'informations sur les Outils de développement F12 et accéder à nos Guides du développeur ainsi qu'à nos Guides de référence sur la compatibilité, pour découvrir les modifications apportées aux dernières versions d'IE et les nouveautés.

Planifier

Trouvez des idées inspirantes, des conseils sur la mise à jour pour le respect des standards du Web, des détails sur les expériences de navigation dans IE10 sur Windows 8, des informations utiles sur la navigation sans plug-in et sur la création de sites adaptatifs et compatibles avec le tactile, ainsi que sur l'intégration de votre site avec Windows.

Développer

Accédez à des pages de portail consacrées aux fonctionnalités de la plateforme Web, aux informations de référence sur les API, à une galerie d'exemples et aux forums de la communauté.

La section « Développer » constitue véritablement le cœur des contenus de la bibliothèque IE. Pour vous aider à trouver rapidement les contenus dont vous avez besoin, nous avons réorganisé nos pages les plus visitées afin de regrouper toutes les ressources pertinentes consacrées à un même sujet.

Grâce à la nouvelle organisation du Centre de développement IE, vous n'avez plus besoin de savoir quelle version d'IE a introduit ou modifié une fonctionnalité pour trouver toutes les informations la concernant. Ainsi, pour plus de praticité, vous retrouverez facilement nos sujets Guide du développeur dans une liste alphabétique regroupant les fonctionnalités de la plateforme Web moderne prises en charge par IE. Vous pouvez aussi parcourir les sujets par thème. Bien évidemment, nous continuerons à publier ces sujets dans les Guides de développement IE consacrés aux versions spécifiques dans lesquelles les fonctionnalités ont été introduites.

D'autres améliorations sont en projet, mais nous sommes convaincus que vous trouverez le nouveau Centre de développement IE plus utile et plus pratique. Nous allons continuer à écouter vos commentaires, et à chercher de nouveaux moyens de faciliter l'accès aux contenus et de les rendre encore plus pertinents pour votre travail. N'hésitez pas à nous faire part de vos commentaires sur ce blog ou sur le site.

Erika Navara, Développeur de contenus

IE デベロッパー センター: 必要なリソースを簡単に探せるようになりました

MSDN Blogs - Wed, 05/22/2013 - 10:57

Microsoft は先週、ページ構成を新たに整理した Internet Explorer デベロッパー センターを公開しました (msdn.com/ie)。これにより、開発者の皆様は、総合的な情報を提供するドキュメントをすぐに見つけられるようになりました。皆様のフィードバックに基づく今回のサイト構造の見直しは、より大規模な Windows デベロッパー センター再編成の一環として実施され、以下が実現されました。

  • IE のバージョンにかかわらず、開発者向けトピックが簡単に見つかる
  • 総合的な API ドキュメントが今まで以上に簡単に見つかる
  • 開発者向けガイド、チュートリアル、サンプル コードからベスト プラクティスを入手できる

新しい IE デベロッパー センターを構成する 3 つの領域を紹介します。

はじめに

IE をダウンロードし、F12 開発者ツールに関する情報を入手できます。IE の最新バージョンの新機能と機能変更に関する情報を提供する開発者向けガイド互換性クックブックにもここからアクセスできます。

計画

インスピレーションを与えてくれるアイデア、Web 標準準拠のためのアップデートに関するヒント、Windows 8 の Internet Explorer 10 が提供するブラウジング エクスペリエンスの詳細、プラグイン フリー化に役立つ情報、適応力に優れたタッチ対応サイトの構築方法、既存サイトと Windows の連携方法などの情報を提供します。

開発

Web プラットフォームの機能、Microsoft の API リファレンス、サンプル ギャラリー、コミュニティ フォーラムの各ポータル ページにアクセスできます。

IE ライブラリ コンテンツの中心となるのが、この「開発」セクションです。必要なコンテンツを簡単に見つけられるようにするため、最もアクセス数が多いページを起点に、同じトピックの関連リソースにアクセスできるように構造を変更しました。

IE デベロッパー センターの再編成によって、ある機能に関するすべての情報を、その機能が導入あるいは変更された IE バージョンを知らなくても見つけられるようになりました。新しい構造では、開発者向けガイドのトピックに、IE がサポートする最新の Web プラットフォーム機能のアルファベット順一覧、または分野別表示を使ってアクセスできます。もちろん、同じトピックを、該当する機能が初めて導入された IE の開発者向けガイドの中でも読めるようにする予定です。

現在もさまざまな改善が進行中の新しい IE デベロッパー センターを今すぐご覧いただき、その使いやすさと役立つ情報をご確認いただければさいわいです。引き続き皆様のフィードバックを参考に、よりアクセス性の高い、皆様の取り組みを適切にサポートできるようなコンテンツにしていきます。ご意見ご感想を、本ブログ記事またはサイトよりお聞かせください。

コンテンツ開発者 Erika Navara

IE 개발자 센터: 필요한 리소스 빨리 찾기

MSDN Blogs - Wed, 05/22/2013 - 10:57

지난주 우리는 개발자들이 포괄적인 설명서를 빠르게 찾아볼 수 있도록 새 단장한 Internet Explorer 개발자 센터(msdn.com/ie)를 선보였습니다. 여러분의 의견을 바탕으로 Windows 개발자 센터를 새롭게 디자인하는 차원에서 사이트 구조를 조정하고 다음과 같은 사항들을 개선했습니다.

  • 여러 버전의 IE 전체에서 개발자들이 필요한 토픽을 쉽게 찾을 수 있도록 만들었습니다.
  • 더 포괄적인 API 설명서를 더 빠르게 찾을 수 있습니다.
  • 개발자 가이드, 자습서, 샘플 코드에서 모범 사례를 참조할 수 있습니다.

우리는 새로운 IE 개발자 센터를 크게 세 분야로 나누었습니다.

시작

이곳에서 IE를 다운로드할 수 있습니다. F12 개발자 도구에 대한 더 자세한 내용을 알 수 있으며 개발자 가이드호환성 설명서를 통해 최신 IE 버전의 새로운 사항이나 변경 내용도 볼 수 있습니다.

기획

톡톡 튀는 아이디어, 웹 표준을 업데이트하는 방법, Windows 8에서 IE10의 브라우징 경험에 대한 자세한 내용, 플러그인에서 해방되는 것에 대한 유용한 정보, 터치 기반에서도 잘 작동하는 사이트 만들기, Windows로 여러분의 사이트를 통합하는 방법 등 다양한 정보를 볼 수 있습니다.

개발

웹 플랫폼 기능에 대한 포털 페이지, API 참조, 샘플 갤러리, 커뮤니티 포럼에 액세스할 수 있습니다.

개발 섹션은 IE 라이브러리 콘텐츠의 진수를 보여줍니다. 필요한 콘텐츠를 빨리 찾을 수 있도록 하기 위해 가장 많이 찾는 페이지에서 연관성 있는 리소스들을 모두 같은 토픽으로 모아두었습니다.

새로운 구조로 개편된 IE 개발자 센터에서는 새로 도입되었거나 변경된 IE 기능을 알고 싶을 때 해당 IE 버전을 몰라도 관련 정보를 찾을 수 있습니다. IE가 지원하는 현대적 웹 플랫폼 기능에 대한 알파벳순 목록이나 분야별 테마에서 기존의 개발자 가이드 토픽을 찾아보면 됩니다. 물론 이러한 토픽은 원래 소개되었던 IE 개발자 가이드의 특정 버전에도 계속 게시될 것입니다.

아직도 개선 작업이 진행 중이긴 하지만 지금 선보인 새 IE 개발자 센터가 사용하기 편리하고 유용하기를 바랍니다. 여러분의 의견을 항상 기다리고 있으며, 또한 콘텐츠에 더 쉽게 접근할 수 있는 방법을 찾고 여러분의 작업에 더욱 도움이 될 수 있도록 노력하고 있습니다. 이 블로그와 사이트에 여러분의 의견을 남겨 주십시오.

콘텐츠 개발자, Erika Navara

Centro de Desenvolvimento do IE: Localize com rapidez os recursos de que você precisa

MSDN Blogs - Wed, 05/22/2013 - 10:57

Na semana passada, lançamos a Central de Desenvolvedores do Internet Explorer remodelada (msdn.com/ie) para que os desenvolvedores localizem com rapidez e facilidade as documentações detalhadas. Com base em seus comentários, ajustamos a estrutura de nosso site como parte de um plano mais abrangente de recriação do Centro de Desenvolvimento do Windows com o objetivo de:

  • Facilitar a localização de tópicos do desenvolvedor em todas as versões do IE
  • Localizar com mais rapidez documentações detalhadas da API
  • Permitir o aprendizado das melhores práticas com guias do desenvolvedor, tutoriais e códigos de exemplo

Organizamos a nova Central de Desenvolvedores do IE em três áreas principais:

Comece

Aqui é possível baixar o IE, saber mais sobre as ferramentas de desenvolvedor F12 e acessar nossos Guias do Desenvolvedor e Compatibility Cookbooks para saber mais sobre as novidades e alterações nas últimas versões do IE.

Planeje

Encontre ideias inspiradoras, dicas sobre a atualização dos padrões da Web, detalhes sobre a experiência de navegação do IE10 no Windows 8, informações úteis sobre o uso do navegador sem plug-ins, criação de sites adaptáveis compatíveis com toque e integração do seu site com o Windows.

Desenvolva

Acesse as páginas do portal para consultar os recursos da plataforma Web, nossas referências de API, galeria de exemplos e fóruns da comunidade.

A seção Desenvolver é o centro do conteúdo da biblioteca do IE. Para ajudá-lo a localizar com rapidez o conteúdo de que você precisa, reorganizamos nossas páginas mais visitadas reunindo todos os recursos relevantes no mesmo tópico.

Com a nova organização da Central de Desenvolvedores do IE, não será necessário saber qual versão do IE introduziu ou alterou um recurso para que seja possível localizar todas as nossas informações sobre ele. Em vez disso, você pode localizar com facilidade nossos tópicos do Guia do Desenvolvedor por meio de uma lista alfabética dos modernos recursos da plataforma Web compatíveis com o IE, ou você pode navegá-los tematicamente por área. Claro, continuaremos a publicar esses mesmos tópicos dentro das versões específicas do Guia do Desenvolvedor do IE nas quais eles foram introduzidos.

Outras melhorias estão a caminho, mas esperamos que a nova Central do Desenvolvedores do IE seja mais útil e fácil de usar. Continuaremos a acompanhar os seus comentários e a buscar novas maneiras de facilitar o acesso ao nosso conteúdo para torná-lo mais relevante ao seu trabalho. Os seus comentários são bem-vindos aqui no blog ou no site.

Erika Navara, desenvolvedora de conteúdo

Центр разработки для Internet Explorer: быстрый поиск необходимых ресурсов

MSDN Blogs - Wed, 05/22/2013 - 10:57

На прошлой неделе мы запустили обновленный Центр разработки для Internet Explorer (msdn.com/ie), чтобы помочь разработчикам проще и быстрее находить исчерпывающую документацию. Опираясь на ваши отзывы, мы скорректировали структуру нашего сайта в рамках более масштабной модернизации Центра разработки для Windows, чтобы достичь следующих целей:

  • Упростить поиск разделов по разработке для разных версий Internet Explorer.
  • Ускорить поиск более подробной документации по API.
  • Предоставить доступ к рекомендациям из руководств по разработке, учебников и примеров кода.

Мы разделили Центр разработки для Internet Explorer на три основные области:

Начало работы

Здесь вы можете скачать Internet Explorer, больше узнать о средствах разработчика F12 и получить доступ к нашим руководствам для разработчиков и руководствам по совместимости, чтобы узнать о новых компонентах и изменениях в новейших версиях Internet Explorer.

Планирование

Здесь вы найдете вдохновляющие идеи, советы по обновлению до веб-стандартов, подробные сведения о способах навигации в Internet Explorer 10 в Windows 8, полезную информацию по отказу от использования подключаемых модулей, созданию адаптивных и оптимизированных для сенсорного управления сайтов, а также по интеграции вашего сайта с Windows.

Разработка

Здесь вы можете получить доступ к страницам портала, посвященным компонентам веб-платформы, к нашему справочнику по API, коллекции примеров и форумам сообщества.

Раздел "Разработка" является центральным хранилищем библиотеки по Internet Explorer. Чтобы помочь вам быстро находить необходимый контент, мы переработали наши самые посещаемые страницы и собрали все нужные ресурсы по каждой теме.

Благодаря новой организации Центра разработки для Internet Explorer вам не нужно знать, в какой версии Internet Explorer был введен или изменен тот или иной компонент, чтобы найти всю информацию о нем. Вы можете найти разделы нашего Руководства для разработчиков в списке (в алфавитном порядке) современных компонентов веб-платформы, поддерживаемых Internet Explorer, или просмотреть их по темам в зависимости от области, что очень удобно. Разумеется, мы продолжим публиковать те же разделы в соответствующих версиях Руководства по Internet Explorer для разработчиков, где они были представлены.

Еще много усовершенствований находятся в процессе реализации, но мы надеемся, что вы сразу заметите, что новый Центр разработки для Internet Explorer стал более удобным и полезным. Мы продолжим внимательно изучать ваши отзывы и искать способы упростить доступ к контенту и сделать его более полезным для вашей работы. Мы ждем ваших отзывов здесь, в блоге, или на сайте.

Эрика Навара (Erika Navara), разработчик контента

Project Server and Project Online: New posts this week

MSDN Blogs - Wed, 05/22/2013 - 10:46

A few new posts this week over on the Project Support blog.

Enjoy!

Saving Suspended Messages using WMI, PowerShell and the Microsoft.BizTalk.Operations Assembly (Part I)

MSDN Blogs - Wed, 05/22/2013 - 10:08

Often, there’s a need to save out suspended messages out to a file, so that we can resubmit/inspect them later. From the BizTalk Admin Console, we can right-click the suspended service instance -> Show Messages. When the messages associated with that service instance opens up, we can right-click -> Save to File. However, for hundreds (possibly thousands) of suspended instances, this is not possible.

One of the options of doing this is using the wonderful BizTalk Terminator Tool (http://www.microsoft.com/en-us/download/details.aspx?id=2846). If you’re okay terminating these instances, you can use this to save out the suspended messages, before terminating the suspended service instances. The only drawback to this approach is that you have no option but to terminate the instances. [After you click Connect on the first Terminator window, you need to click the Delete button at the bottom, and then select the ‘Terminate Instances’ option to get to this screen]. 

 

What if you wanted to retain the suspended instances, and yet save the messages out to disk?
Well, time to write some WMI code. We chose to use a PowerShell script in this case. We could easily have called the same WMI queries using VBScript or, C#. So, here is the code -

#
# Use:
#    C:\.\Save_Suspended_msgs.ps1 -action list
#    C:\.\Save_Suspended_msgs.ps1 -action save
"c:\temp\Suspended_msgs" ([optional]> log.file) 

#
# declare our parameters: the action to take, and an optional
# path to save messages to
#
param(
   [string] $action=$(throw 'need action'),
   [string] $path=$(if ($action -eq 'save') { throw 'need path' })
)
$counter = 0 

function bts-get-messaging-svc-instances()
{
   get-wmiobject MSBTS_ServiceInstance `
      -namespace 'root\MicrosoftBizTalkServer'
      -filter '(ServiceClass=1 or ServiceClass=4) and ServiceStatus = 4 '

#

# save the message associated to the
# specified messaging Service Instance
#
function
bts-save-message([string]$msgid, [string]$sname)
{
   "msgid is $msgid"
   "ServiceName is $sname"
   "msg_counter is $counter"
   $msg = get-wmiobject MSBTS_MessageInstance `
      -namespace 'root\MicrosoftBizTalkServer'
      -filter "ServiceInstanceID = '$msgid'"
      $newpath = (Join-Path $path $sname)
     "new path is $newpath"
     $r_code= (test-path $newpath)
     "return code is $r_code"
     if ($r_code -eq $False)
     {
         md $newpath
        "new directory created"
     }
       if ($msg.psbase.length -gt 0)     
       {
        foreach($m in $msg)
                     {           
$m.psbase.invokemethod('SaveToFile', ($newpath))
             "Message from ServiceInstanceID=$msgid saved to $newpath."
                     }
       }

#
# main script
#
switch ( $action )
{
   'list' {
#       bts-get-messaging-svc-instances   
      bts-get-messaging-svc-instances |
      bts-get-messaging-svc-instances |
         fl * 

#        fl InstanceId, ServiceName, SuspendTime,HostName,
#            ServiceStatus, ServiceClass, ErrorId, ErrorDescription
   }
   'save' {
      bts-get-messaging-svc-instances |
          %{ $counter++; bts-save-message $_.InstanceID $_.ServiceName }     

   }
}

In the bts-get-messaging-svc-instances() function, we have –
get-wmiobject MSBTS_ServiceInstance `      

-namespace 'root\MicrosoftBizTalkServer' ` 
      -filter '(ServiceClass=1 or ServiceClass=4) and ServiceStatus = 4 '

 

We are filtering on Service instances with ‘ServiceClass = 1’ (this gets Orchestration suspended instances) or, ‘ServiceClass = 4’ (messaging service instances).  ‘ServiceStatus = 4’ means Suspended (Resumable). These are the other Service Status codes, in case you need it:

//******** List of WMI Service Statuses ********

//ServiceStatus = 1 - Ready To Run
//ServiceStatus = 2 - Active
//ServiceStatus = 4 - Suspended (Resumable)
//ServiceStatus = 8 - Dehydrated
//ServiceStatus = 16 - Completed With Discarded Messages' in BizTalk Server 2004
//ServiceStatus = 32 - Suspended (Not Resumable)
//ServiceStatus = 64 - In Breakpoint 

Usage : To use this script, save this to a file (say at the path - C:\script\Save_Suspended_msgs.ps1 ), and run this from the PowerShell command prompt:
PS C:\Users\Administrator> C:\script\Save_Suspended_msgs.ps1 -action save "c:\temp\Suspended_msgs"

 

This would create separate folders for each suspended instance type under the ‘Suspended_msgs’ folder specified above. So, if you have suspended instances for two different Orchestration types, it would create folders named after those Orchestrations and save out the messages in their respective folders.
All good, right? Well, this solution works great as long as your suspended orchestration instances don’t contain multiple suspended messages. We cover in Part II of this article how to handle this specific case.

Written by
Arindam Paul Roy

Reviewed by
Jainath V R

Microsoft India GTSC

Create location aware apps using geolocation and Bing Maps

MSDN Blogs - Wed, 05/22/2013 - 09:49

Ross Heise has a quick walkthrough on adding geolocation to your Windows store Apps. Here’s a bit of code to whet your appetite:

The Windows.Devices.Geolocation namespace is used for retrieving your location. Whether you use GPS, a WiFi network, or an IP address to retrieve a user’s location depends on two primary factors:

  1. The accuracy level requested. This is the ideal level of accuracy to meet your app’s needs.
  2. The availability of location data.  Meaning, not all devices have GPS built in.   Or a network or Wi-Fi connection may not be available when the location is requested.

C#

Geolocator geolocator = new Geolocator(); geolocator.DesiredAccuracy = Windows.Devices.Geolocation.PositionAccuracy.High; Geoposition pos = await geolocator.GetGeopositionAsync().AsTask(token);

JavaScript

var geolocator = Windows.Devices.Geolocation.Geolocator(); geolocator.desiredAccuracy = Windows.Devices.Geolocation.PositionAccuracy.high;   // Get the geoposition, capturing the request in a 'promise' object. var promise = geolocator.getGeopositionAsync();

[…] For full details on using geolocation and the Bing Maps SDK, we have a new video, how-to topic , and code sample that leads you through the steps of asynchronously acquiring your location and then using the Bing Maps SDK to show where you are in a visual manner.

Create location aware apps using geolocation and Bing Maps

Technorati Tags: ,,,,,,

Final Call: Life Science Innovation Awards

MSDN Blogs - Wed, 05/22/2013 - 08:58
Have you submitted your application for this years Microsoft Life Science Innovation Awards ? Do you have an innovative solution focused on bringing therapeutic breakthroughs to market faster, fight serious ailments, improve health and enhance patient’s qualify of life? Is your solution in a Life Science or related organization? Pharmaceutical Companies Biotechnology Companies Medical Device Companies University Research Medical Centers Federal Research Organizations...(read more)

How do I map a differential/transaction log backup to its full backup without using MSDB?

MSDN Blogs - Wed, 05/22/2013 - 08:38
If you have multiple full, differential and transaction log backups, there are chances you may end up facing the error below during the restore process. “ This differential backup cannot be restored because the database has not been restored to the correct earlier state”   You know that any differential/T-log  backup is mapped to particular full backup. You will encounter above error message when there is mismatch in the LSN (Log Sequence Number) chain between the full backup and differential...(read more)

Windows Azure Action – Community Newsletter – 22nd May 2013

MSDN Blogs - Wed, 05/22/2013 - 08:22
WINDOWS AZURE IN ACTION – LOCAL   NEWS TECHNOLOGY COMMUNITY Toby Bowers Windows Azure expands Downunder Mahesh Krishnan New Windows Azure datacenters in Oz. Finally!!! Dean Robertson What an Australian Azure Region Means for Customers Mick Badran Local Windows Azure: Integrate, Innovate & Australia just got smarter Tom Hollander Windows Azure in Australia: Facts and Rumours Conor Brady Windows Azure Downunder (DC migration considerations Loryant Strant Microsoft to extend Windows Azure datacentre...(read more)

連載: Microsoft 技術における Identity 連携開発の今 (Build Insider)

MSDN Blogs - Wed, 05/22/2013 - 08:00
こんにちは。 アーキテクト・フォーラムのセッションでご紹介した「アイデンティティ プロバイダーとの連携手法」を、Build Insider の記事として書き下ろしました。 連載: Microsoft 技術におけるアイデンティティ連携開発のいま .NET で使えるアイデンティティ連携のためのライブラリまとめ 前編 .NET で使えるアイデンティティ連携のためのライブラリまとめ 後編 利用シナリオごとのプログラミング手法 (今後掲載予定) 「.NET で使えるアイデンティティ連携のためのライブラリまとめ」では、ソーシャル・アイデンティティとの連携や、AD FS、Windows Azure Active Directory との連携、さらに、提供されている各種ライブラリーの使い分けなど、さまざまな技術をどういう視点で利用するかまとめようと思いましたが、内容が長すぎるため前後半に分離する結果となりました。(すみません、その結果、前編は、DotNetOpenAuth の話だけになってしまいました。。。)...(read more)

Create location aware apps using geolocation and Bing Maps

MSDN Blogs - Wed, 05/22/2013 - 08:00

By tying together a user’s location to the business logic of your app, you can easily provide app users with weather, coupons, sporting events, or concert listings for their current location. You can use the geolocation capabilities of Windows 8, along with the Bing Maps SDK, to create great location aware Windows Store apps.

Let’s take a look at how your app can use the location service to provide users location-specific info with either an IP address, WiFi network, or GPS data. Once you have the location, you can use the Bing Maps SDK to show the user where they are.

Retrieving Location

The Windows.Devices.Geolocation namespace is used for retrieving your location. Whether you use GPS, a WiFi network, or an IP address to retrieve a user’s location depends on two primary factors:

  1. The accuracy level requested. This is the ideal level of accuracy to meet your app’s needs.
  2. The availability of location data.  Meaning, not all devices have GPS built in.   Or a network or Wi-Fi connection may not be available when the location is requested.
Desired accuracy

When requesting a location, your app should specify your desired accuracy so the location data can be returned as quickly as possible within the given range.  Each of the location types have degrees of accuracy:

  • GPS – GPS provides the most accuracy, down to approximately 10 meters.  However, if the GPS sensor needs to ‘wake up’ and acquire satellite data and then triangulate the data, it can take a minute or two to return the location details. But, once the GPS has acquired satellite connections, it can then acquire the next location point more quickly.  Of course, the more the GPS is used, the more power it consumes. The Geolocator.DesiredAccuracy property must be set to High to enable to GPS to acquire data.
  • Wi-Fi – A Wi-Fi connection can provide accuracy between 300-500 meters.  If the connection exists, the location data can be returned faster than a GPS can acquire satellite connections. Set the DesiredAccuracy property to Default in order to acquire the location with Wi-Fi.
  • IP – IP level resolution can bring accuracy down to about the 1 kilometer level.  If the network connection exists, the location data can be returned faster than a GPS can acquire a satellite connection. You also set the DesiredAccuracy property to Default to acquire the location with IP. The location service returns the highest accuracy it can and lets you know how accurate it is in the Geocoordinate.Accuracy property.

Consider your desired accuracy value carefully. It can affect your app’s performance and power consumption.  For example, if your app is providing a weather forecast, you rarely need the high accuracy of GPS.  Also be sure to indicate the accuracy of your data by displaying an error radius based on the accuracy of the data returned. Here is the C# code to set your desired accuracy:

C#

Geolocator geolocator = new Geolocator();
geolocator.DesiredAccuracy = Windows.Devices.Geolocation.PositionAccuracy.High;

No matter what accuracy you want, the call to get your location is:

C#

Geoposition pos = await geolocator.GetGeopositionAsync().AsTask(token);

Here’s the JavaScript code that creates an instance of the Geolocator class, sets the desired accuracy, and then gets the current location. Note that the ‘promise’ variable below is a WinJS.Promise object – you’ll need to use the done method to access the data from the call to getGeopositionAsync.

JavaScript

var geolocator = Windows.Devices.Geolocation.Geolocator();
geolocator.desiredAccuracy =
Windows.Devices.Geolocation.PositionAccuracy.high;

// Get the geoposition, capturing the request in a 'promise' object.
var promise = geolocator.getGeopositionAsync();

Remember that if you set your desired accuracy to High, you can’t be assured that the user’s device will be able to return high accuracy. Their PC may not have a GPS or it may be turned off or they may not be connected to Wi-Fi, etc. Always be prepared to gracefully handle these instances of lower accuracy data. How you do this depends on the functionality of your app. Can you continue with lower accuracy? Can you require GPS level accuracy? See the Guidelines for location-aware apps for more info. Bing Maps

The Bing Maps app is a good example of an app that adapts to the accuracy of the location data available to it.  On a desktop PC, which typically doesn’t have GPS or Wi-Fi, it finds the location based on the IP address and zooms in to a region level when mapping the current location.  On a laptop, which typically has a wireless card, it uses the Wi-Fi to get a more precise location and zoom in further when showing current location.  If the user zooms in even further, the current location icon will show an error radius.  On a device with GPS, Bing Maps gets the high accuracy location data from the GPS and displays a more accurate location.

Bing Weather

As mentioned above, an app like the Bing Weather app only needs region information.  Because of this, it can specify that it only needs low accuracy allowing it to quickly get a location value back.  This makes the app more responsive to the user.  Other examples of apps that may need only region level information include radio station guides, shopping deals, or local news feeds.

Displaying location data with the Bing Maps SDK

After you have the location information from your call to GetGeopositionAsync, you’ll want to display it on a map.

  • First, convert the Geoposition into a Location that can be used with Bing Maps, use the following code:

 

C#

Location location = new Location(pos.Coordinate.Latitude, pos.Coordinate.Longitude);

JavaScript:

promise.done(
function (pos) {
// Get the coordinates of the current location.
var coord = pos.coordinate,
location = new Microsoft.Maps.Location(coord.latitude, coord.longitude);

},
function (err) {
// Handle the error.
});

 

  • Next, display your location using Bing Maps. You can get the Bing Maps SDK here. You’ll also need to get a Bing Maps Key by registering on the Bing Maps Portal and following the instructions for Getting a Bing Maps Key. When you register make sure you look at the usage restrictions for each type of key and choose one that is appropriate for your app.
    Add a Bing Maps control to your designer and insert your key into the credentials.
<Page
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:local="using:SimpleMapping"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:Maps="using:Bing.Maps"
x:Class="SimpleMapping.MainPage"
mc:Ignorable="d">

<Grid Background="{StaticResource ApplicationPageBackgroundThemeBrush}">
<Maps:Map x:Name="Map" Margin="0,120,0,0" Credentials="Insert Your Bing Maps Key Here"/>
</Grid>
</Page>
  • Now you can use the following code to the page in your app where the map is displayed. This sets the zoom level of the map and shows the location. Learn more about zoom level in How to display your location on a Bing Map:

C#

double zoomLevel = 13.0f;

Map.SetView(location, zoomLevel);

Adding a Bing Maps control to your app in JavaScript and HTML requires a little more work. Add the following <script> tag to the HTML of your app:   <script type="text/javascript"
src="ms-appx:///Bing.Maps.JavaScript//js/veapicore.js">
/script>

Then, you’ll need to create a <div> tag to contain the map, setting the id attribute so that you can access it.

<div id=’map-div’></div>

Last, you’ll need to initialize the map control in the HTML page. Here’s some JavaScript code that does so:

// Load the Microsoft.Maps.Map module and then call getMap when the
// module has loaded.
function initMap() {
Microsoft.Maps.loadModule('Microsoft.Maps.Map',
{
callback: getMap,
culture: "en",
homeRegion: "US"
});
}

// Get the div to contain the map from the interface of the app.
function getMap() {

// Create a new instance of the Map class, passing in the app ID.
var map = new Microsoft.Maps.Map(
document.getElementById(mapDivId),
{ credentials: “Insert your credentials here” });

// Set the initial zoom level and type of map.
map.setView({
mapTypeId: Microsoft.Maps.MapTypeId.road,
zoom: 3
});
}
  • Finally, any app that uses location must respect the user’s permissions settings, which can change at any time.  The Weather app uses location to get the weather for the current location.  But at any time, the user may go into the Settings and turn the Locations permissions off.  Your app always has to handle the possibility that the Location permission has been disabled.  In this case, the Weather app displays a “Your location cannot be found. Change your Permissions to allow Weather to user your location.” message. See the User experience guidelines in Guidelines for location-aware apps for examples of handling location permissions.

 

For full details on using geolocation and the Bing Maps SDK, we have a new video, how-to topic , and code sample that leads you through the steps of asynchronously acquiring your location and then using the Bing Maps SDK to show where you are in a visual manner. The video, how-to topic, and sample guide you through enabling the location capability, getting the location asynchronously, setting the map to a given location, and setting the location icon based on the accuracy of the location data. You can also find more info in Bing Maps for Windows Store Apps.

Wrapping up

Location can be a powerful and time saving feature to add to your app. You can provide the user with more pertinent information based on where they are. Whether it’s a list of local radio stations, shopping deals, traffic information, or weather information, the control to tailor that information based on location can make your app more useful. And the ability to make that happen automatically, without user interaction, saves the user time and makes them more likely to use your app.

--Ross Heise, Senior Content Developer, Windows Developer Content

How do I get a window back on the screen when it moved far, far away? Windows 7 (and 8) edition

MSDN Blogs - Wed, 05/22/2013 - 07:00

Some time ago, I showed how to get a window back on the screen when it moved far, far away. That technique still works in Windows 7 and 8, but there's an easier shortcut that takes advantage of window arrangement features added in Windows 7.

First, you switch to the application by whatever means. Then hit Win+UpArrow to maximize the window. That should put the window on-screen, albeit at the wrong size. Now you just grab the title bar of the window with the mouse and drag it off the top edge of the screen. Bingo, the window returns to its original position, and you can use the mouse to put it wherever you like.

This trick doesn't work for windows that cannot be resized (such as Calculator), but for those windows, you can use the old version of the trick.

Retail Performance White Paper and Benchmark Results for Microsoft Dynamics AX 2012 R2

MSDN Blogs - Wed, 05/22/2013 - 06:40

Two new capability resources from the Microsoft Dynamics AX product management team have recently been made available.

Retail Performance White Paper for Microsoft Dynamics AX 2012

This white paper provides an overview of a series of performance tests run by Microsoft to enable customers and partners to better size capacity for the infrastructure that they require for an implementation of the Microsoft Dynamics AX 2012 Retail module.

As a part of the release process for Microsoft Dynamics AX 2012 R2, Microsoft conducted a series of performance tests to enable customers and partners to better size the capacity for the infrastructure that is required for their implementation. The performance tests showcase the ability of the solution to scale based on critical business scenarios that pertain to the Retail industry. The performance tests include many functional scenarios across different client and integration technologies providing a view of the core retail scenarios.

Visit PartnerSource to view or download the document.


Retail Benchmark Results for Microsoft Dynamics AX 2012 R2

These documents provide a set of detailed results from benchmark testing of multiple retail workloads on Microsoft Dynamics AX 2012 R2.

The benchmark showcases the ability of Microsoft Dynamics AX 2012 R2 to handle various specialized loads concurrently, without compromising performance and scalability on critical business processes. The benchmark includes many functional scenarios across different client and integration technologies, thereby providing a view of retail back-end scenarios.

Visit PartnerSource to view or download the documents.

--Kevin

Office and SharePoint 2013 Continuous Integration Using Team Foundation Service and Office 365

MSDN Blogs - Wed, 05/22/2013 - 06:00

When your team is collaborating on a project, you need a regular and reliable development process to ensure smooth delivery while maintaining high quality. This process typically includes frequent integrations from team members, regular builds, and testing against the new build to measure quality. Continuous integration is a great way to manage this kind of process.

In SharePoint development, continuous integration has historically meant setting up a SharePoint server together with a build server in your organization to get regular builds and run tests on it. With the launch of Office 365 and Team Foundation Service (TFS), this onerous setup is no longer required. Instead, you can simply sign-up for each of these services. In this post, we’ll walk through configuring these services so that you can enable continuous integration for your projects.

Get an Office 365 Developer account

To develop, test, and deploy apps for Office and SharePoint, you can sign up for an Office 365 Developer Site. Follow the instructions in Sign up for an Office 365 Developer Site to start your free trial.

Get your Team Foundation Service account

Team Foundation Service lets you plan projects, collaborate with your team, and manage your code online from anywhere without needing to set up your own Team Foundation server. Instead, it stores your source code and work items in the cloud. You can check your code directly into the cloud through Team Foundation Service using Visual Studio or Eclipse, and you can manage your work items and bugs in the browser.

Team Foundation Service offers a free plan for up to five users per account. It provides features including version control (through Team Foundation Version Control or Git), work item tracking, agile planning tools, feedback management, and build and test management. Go to the Team Foundation Service site to get started. The cloud-hosted build service on Team Foundation Service is preconfigured with the right environment for apps for Office and SharePoint 2013, and also for SharePoint 2010 or 2013 farm and sandboxed solutions.

Note that the build machines on Team Foundation Service can access only public visible SharePoint (and web) servers. This means that your target SharePoint site should be either on Office 365 (for apps) or on a SharePoint virtual machine (VM) in the cloud (for SharePoint farm and sandboxed solutions).

Start your continuous integration on Team Foundation Service

Earlier this year, we shipped Office Developer Tools for Visual Studio 2012 for developing apps for Office and SharePoint 2013. At the same time, we also published a CodePlex project to support continuous integration for Office and SharePoint 2013 projects using TFS 2012: see Office/SharePoint 2013 Continuous Integration with TFS 2012.

This CodePlex project contains a set of Windows PowerShell scripts for deployment and a custom TFS Build workflow template, which lets you build and deploy (for testing purpose) apps for Office and SharePoint 2013 projects using TFS 2012. Here’s all you need to do:

  1. Check the files (deployment scripts and workflow template) into the root of your source control team project.
  2. Update the parameters.ps1 file in the project to specify the parameters used for deployment, including your SharePoint site URL and your credentials.
  3. Create a new build definition using OfficeToolsAppTemplate.xaml, and specify the corresponding deployment scripts offered in the CodePlex project. The build definition also lets you specify what projects to build and when to trigger a build.

For detailed instructions, see the Documentation page of the CodePlex project.

Using these resources, you will be able to do continuous integration for Office and SharePoint 2013 projects. Depending on your project, you may find these tips helpful:

  • Project contains a NuGet package
    If the NuGet package delivers some assemblies that your project references (for example, you use the EntityFramework NuGet package in the web project of your app for SharePoint, which references EntityFramework.dll), make sure the assemblies are checked into source control. You can find the assemblies from the NuGet package in the “packages” folder under your solution folder.
  • Autohosted app for SharePoint includes a SQL Database project
    This is a known issue in the Office Developer Tools for Visual Studio 2012. If you are using Team Foundation Service, the TFS build service will copy the .dacpac file built from the SQL Database project to a different folder defined in the app for SharePoint project target file. To work around this, add the following code at the end of your app project file:
<Target Name="xxx" BeforeTargets="PackageSharePointApp"> <PropertyGroup> <SqlPackage>%OutDir%\YourDacpacName.dacpac</SqlPackage> </PropertyGroup> </Target>
  • Project is a SharePoint farm or sandboxed solution
    Continuous integration is also supported for SharePoint farm and sandboxed solutions. Hosting SharePoint in a VM in Windows Azure is a great way to enable continuous integration with Team Foundation Service because it is hosted outside of a firewall. Check out the Downloads page for instructions about configuration.
    Although the build service on Team Foundation Service has been configured with essential SharePoint assemblies, your farm solutions may contain some assemblies that are not available in the default build environment because solutions can actually reference any assembly. In that case, you will need to check those missing assemblies into the source control with your project. You will know that your project is in this state if an assembly that you reference in your SharePoint farm solution cannot be found (and Team Foundation Service throws the “System.IO.FileNotFoundException: Could not load file or assembly” exception when you build the project).

I hope that you will give continuous integration a try. Like always, I’d love to hear from you. If you have a suggestion, question, bug, or anything else, please don’t hesitate to let me know!

Have fun!

Pages

Subscribe to Randy Riness @ SPSCC aggregator
Drupal 7 Appliance - Powered by TurnKey Linux