You are here

Feed aggregator

如何处理WinJS程序崩溃

MSDN Blogs - Wed, 08/20/2014 - 23:44

我们开发程序的时候经常会遇到这样的问题,如何在WinJS程序崩溃的时候及时记录下来我们需要的错误信息, 以便我们修复程序, 发布下一个更好的版本. 

第一反应是WinJS.Log()或者普通的console.log()方法,当然, 这两个办法非常实用,具体用法网上教程很多,我们可以简单的把WinJS程序理解成一个HTML页面的调试,这里不再赘述。但不足之处在于这两个方法仅仅用于本地调试,一旦用户安装了应用之后出现了什么问题,这两个方法只能在用户本地记录错误信息,不能及时的发送给开发人员。 

我在论坛上遇到很多类似的提问, 比如开发者提到用户反映App出现了一些异常,开发者有什么办法及时获取这些异常信息?微软有考虑过这样的情况,有一个叫CEIP的计划,全称为Customer Experience Improvement Program,可以让开发者在DashBoard上获取用户运行App崩溃时候的一些异常信息,这是一个极好的工具,生成的Dump文件可以帮助分析各种出错的地方。 

但是开发者们也想自己搭建一个Server用于接收用户的错误信息,这样可以及时收集到第一手且全面的错误信息, 以便快速修复这些问题, 提高App用户的体验?通过参考WinJS大神的Blog,我们可以得出以下结论:WinJS.Application.onerror并不是导致程序立即关闭的重要因素, 而MSApp.terminateApp()才是关闭程序的根本原因,所以我们可以在这之间抽出一段时间用于保存我们的错误信息并且发送,当然我们还可以通过改变return值来阻止程序关闭。 

Windows.Application.onerror = function (e) {

showErrorPage(e); 

return
true; //
telling WinJS that the exception was handled, don't terminate

}

 在上面这段代码中,我使用了 showErrorPage()这个办法来显示一个错误信息的页面,并且把返回值改成了Ture,这样WinJS程序就不会退出,从而给了我们收集错误信息的时间,也带给用户更好的体验。 

下面我们要谈谈什么样的错误信息数据才是我们需要的数据。很多时候论坛上大家会问如何处理bug,但是似乎又缺少了点什么东西来做处理的判断,或合理的让错误信息指引我们修复程序. 我认为一个好的机制应该是反馈一些包括:


  • 操作系统版本以及补丁信息

  • 语言版本

  • 哪个页面出问题

  • 第几行代码出问题

  • 具体问题的异常信息

  • 设备信息(曾经有一个问题是跟设备的显示屏大小有关)

仅仅当我们获取了一个完整的信息的时候,我们才可以重现用户提到的问题,或许下次用户发邮件来询问这个问题的时候,你已经能提供一个完美的解决方案了。 

最后,我们还得考虑如何把错误信息发送出去,一般来说,我会在ShowErrorPage里面把错误信息发送出去,但有可能用户是在没有网络的情况下遇到这样的问题,所以我会检查一个网络连接是否正常,仅仅当有网络的时候发送错误信息,所以错误信息会预先记录在本地。或者还有一个思路就是程序开启的时候发送错误信息,不过请注意一点:我们应当优先考虑用户流畅使用度。 

另外,建议大家使用StackTraceJS(http://stacktracejs.com/) 这个工具来收集具体的错误信息,它是一个非常有用的JS扩展库。

Kurz upgrade a migrace z Windows XP

MSDN Blogs - Wed, 08/20/2014 - 22:40
Doporučujeme kurz Windows 8.1 - upgrade a migrace z Windows XP Stále ještě máte ve své organizaci Windows XP? Nevíte, jak správně zmigrovat na modernější systém? Kurz Počítačové školy Gopas - Windows 8.1 - upgrade a migrace z Windows XP vám přechod na modernější systém usnadní. Seznámíte se s Microsoft Deployment Toolkitem, možnostmi automatizace migrace, tvorbou...(read more)

The ALS Ice Bucket Challenge

MSDN Blogs - Wed, 08/20/2014 - 21:52

Yesterday, Brian took ALS Ice Bucket Challenge after being challenged by both Scott Guthrie and Adam Cogan. Brian then challenged me, James Phillips, and David Treadwell. I didn’t want to turn down a challenge from Brian. I happen to be in Redmond this week, so I thought why not do it with my team here.

I mentioned it to Jessica, who is my great admin, and she then got a bunch of the DevDiv admins in on it (the level of excitement among the admins was through the roof). My whole day was booked, so I had no idea when I would do this. Then my 2 PM meeting got canceled. It was on!

Then the admin team sent email to my team to solicit a volunteer to dump the ice bucket on me. That honor went to Sam Nuziale, dev lead working on our integration into the new Azure portal.

We did it out behind building 18 with a bunch of my team there to take pictures and video. They had the ice and water sitting out for about 15 minutes ahead of time, so it was plenty cold.

Of course, I named three more people. I’ve challenged Martin Hinshelwood, Munil Shah, and John Cunningham. Let’s see if they’ll take the challenge in the next 24 hours. Good luck!

Here’s the video: http://vimeo.com/103961763

And pictures…  

[Sample Of Aug. 21] How to unregister test controller with team project collection using TFS APIs

MSDN Blogs - Wed, 08/20/2014 - 19:08
Aug. 21

Sample : http://code.msdn.microsoft.com/How-to-unregister-test-a418652b

This sample demonstrates how to unregister Test Controller from team project collection using TFS APIs.

 

You can find more code samples that demonstrate the most typical programming scenarios by using Microsoft All-In-One Code Framework Sample Browser or Sample Browser Visual Studio extension. They give you the flexibility to search samples, download samples on demand, manage the downloaded samples in a centralized place, and automatically be notified about sample updates. If it is the first time that you hear about Microsoft All-In-One Code Framework, please watch the introduction video on Microsoft Showcase, or read the introduction on our homepage http://1code.codeplex.com/.

David Musgrave does the ALS #IceBucketChallenge

MSDN Blogs - Wed, 08/20/2014 - 18:30

You have probably heard on the various social media platforms about the ALS (Amyotrophic Lateral Sclerosis) Ice Bucket Challenge to raise awareness and donations for the ALS Association. ALS is known in Australia as Motor Neuron Disease, so you can also make a donation to MND Australia.

A number of important people in the Microsoft world have taken the challenge and got wet as well as made a donation. Check out the videos below from the three CEOs of Microsoft (Satya Nadella, Bill Gates and Steve Ballmer) as well the Microsoft Australia's General Manager, Pip Marlow:

Satya Nadella Ice Bucket Challenge for ALS (direct link)

(Please visit the site to view this video)

 

Bill Gates ALS Ice Bucket Challenge (direct link)

(Please visit the site to view this video)

 

Steve Ballmer takes the ALS Ice Bucket Challenge (direct link)

(Please visit the site to view this video)

 

Pip Marlow Takes The Ice Bucket Challenge (direct link)

(Please visit the site to view this video)

 

Anyhow, via Twitter Jivtesh Singh challenged me, Belinda Allen and Beat Bucher to the Ice Bucket Challenge. 

So, I asked Jivtesh where the video of him getting wet was and he said he had donated rather than do the challenge. I told him that was just not good enough and I wanted to see him get wet. And being the good sport he is, he accepted the challenge. See his blog post and video below:

Jivtesh Singh's ALS Ice Bucket Challenge Aug 2014 (direct link)

(Please visit the site to view this video)

 

Therefore, I could not delay any longer and this morning I did the challenge and also made a donation. 

David Musgrave does the ALS #IceBucketChallenge (direct link)

(Please visit the site to view this video)

 

As part of the challenge, I can nominate 3 others and so I nominate Mariano Gomez (The Dynamics GP Blogster), Pam Misialek (Inside Microsoft Dynamics GP) and Sensei David Wilkes of Wilkes Martial Arts Academy to take the ALS Ice Bucket Challenge with in the next 24 hours.

Please help this great cause and donate to the ALS Association or to MND Australia, especially those in Microsoft Dynamics GP community and GPUG Members

Waiting for your videos Mariano, Pam and David.

David

Dynamics CRM Online 体験版の申し込み手順が新しくなりました‼

MSDN Blogs - Wed, 08/20/2014 - 18:00

みなさん、こんにちは。

Microsoft Dynamics CRM Online 体験版の申し込み手順が変わりました。
今回は申し込みから構成までの手順を紹介します。

1. Microsoft Dynamics CRM のホームページを開きます。
http://www.microsoft.com/ja-jp/dynamics/default.aspx

2. 30日間トライアルのタイルをクリックします。

3. 無料トライアルの説明ページが開きますので、無料トライアルはこちらリンクを
クリックします。

4. 30 日間無料試用版の開始ページが開きます。先頭の国/地域より日本を選択します。
また、弊社より情報を受け取る際に利用したい言語を最下部の言語から日本語か英語を選択します。
※利用する CRM 組織の言語は後ほどより詳細を選択できます。

5. 姓、名、電子メール等必須項目を入力します。

6. [次へ] をクリックします。これまでは次ステップの認証コードを入力してから
アカウント情報を入力していましたが、 認証コードの入力前に変更になりました。

7. 電話番号の確認でテキストメッセージまたは着信を受けれる電話を指定し、
認証コードを入力します。

8. アカウント作成後、「準備が整いました」が表示されたら右矢印アイコンを
クリックします。

9. CRM Online 管理センターの画面が開きます。ここで任意の組織の言語、通貨を
選択します。

10. 設定が完了したらセットアップ続行をクリックします。

11. 以下の画面が出ますので、完了するまで待ちます。

 

12. 完了後以下の画面が表示されます。

 

以上で申し込み手順は完了です。

Office 365 管理センターは下記の新しいアドレスでアクセスが可能です。
https://portal.office.com/

まとめ

今回は画面のデザインが大きく変わりました。また、アカウントの情報を入力する
ステップが 電話番号の確認ステップの前に変更となりました。是非お試しください。

‐ プレミアフィールドエンジニアリング 河野 高也

 

Desenvolvimento de Jogos

MSDN Blogs - Wed, 08/20/2014 - 17:00

Olá! Meu nome é Fabricio Catae e sou evangelista técnico de Games.

Após trabalhar muitos anos com banco de dados SQL Server, decidi mudar o rumo da minha carreira. Hoje atuo na área de desenvolvimento, ajudando na criação de jogos. Garanto que é uma área muito divertida!

Nesse ano, minhas áreas de interesses são:

  • Programação em C# usando Unity 3D.
  • Jogos baseados em HTML5 e JavaScript
  • Game Engines em geral (Cocos2d, Corona, Construct2, GameMaker, MonoGame, etc)

Estamos trabalhando em um conteúdo técnico e disponibilizando nos canais:

Microsoft Virtual Academy – Games
http://www.microsoftvirtualacademy.com/training-topics/games

Games Brasil (Channel 9)
http://aka.ms/gamesbr

Se você tem interesse em jogos, não deixe de me contatar (@fcatae).

Reusing ViewModels in a Universal App – Part 1

MSDN Blogs - Wed, 08/20/2014 - 16:52

There is an increasing trend for Microsoft platforms to build what is called a “Universal App”.  In its ideal it is an application that you code once, and then it runs on desktop, tablet and phone platforms. 

This opportunity introduces new challenges – with a main one being that the different platforms have differences.  Differences in APIs, differences in capabilities and differences in display size and orientation.

All of these threaten the ideal of reusing most, if not all, of the code between the platforms.  The less code you can share between the platforms, means:

  • A higher cost for development – meaning either more resources needed, or more time required
  • More code that needs to be maintained
  • Higher probability of bugs, especially that impact one platform but another

The Model-View-ViewModel pattern has the potential to increase code reuse across the platforms.  This can be done by minimizing logic in the View and designing a View Model that is agnostic of the details of the View.  This will allow us to develop a different View for the different platforms, while sharing the code in the ViewModel and Model. 

To illustrate this I’ve created a Windows Store application, called My Calc, which is purposeful coded in a naive View centric way.  As is if one were to make the application available phone would be a large incremental cost.

MyCalc is a simple stack calculator application.  One can push numbers on the stack.  Operations, such as Add, take their operands from the stack and replace it with the resulting value.  Purposefully the set of operations implemented as basic, as the object is to focus on ViewModel development, and not develop a fully featured calculator app.

In the various parts of this blog we’ll first refactor the application to have a ViewModel, and end with porting the application to phone by coding up a phone specific View.

Attached is our starting solution.  It consists of 3 projects:

  • MyCalc.Shared
    • Contains code shared across the platforms
  • MyCalc.Windows
    • Contains code specific to Windows
  • MyCalc.WindowsPhone
    • Contains code specific to phone

The shared project contains a StackCalculator class.  This is our Model, or business logic.  It doesn’t know anything about the UI.

You can ignore the WindowsPhone project for now, as all it has in it is the broiler plate code the Visual Studio put in when the project was created.

The Windows project has the MainWindow.  If you’ve done UI development in XAML, WPF or Silverlight then likely you’ve seen (and written) code similar to this.

Here is a snippet of the xaml

<Button
x:Name="SixButton"
Grid.Column="4"
Grid.Row="2"
Style="{StaticResource ButtonStyle}"
Content="6"
Click="SixButton_Click"
/>

<Button
x:Name="ThreeeButton"
Grid.Column="4"
Grid.Row="3"
Style="{StaticResource ButtonStyle}"
Content="3"
Click="ThreeeButton_Click"
/>
</Grid>

<Grid
x:Name="StackGrid"
Grid.Column="1"
Grid.Row="1"
>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto" />
<ColumnDefinition Width="Auto" />
</Grid.ColumnDefinitions>
<Grid.RowDefinitions>
<RowDefinition Height="*" />
<RowDefinition Height="Auto" />
</Grid.RowDefinitions>

<ListBox
x:Name="StackBox"
Grid.Column="0"
Grid.ColumnSpan="2"
Grid.Row="0"
Margin="4"
FontSize="32"
ItemContainerStyle="{StaticResource ListBoxItemStyle}"
/>

<TextBox
x:Name="EnterBox"
Grid.Column="0"
Grid.Row="1"
Margin="4"
Width="400"
FontSize="32"
TextChanged="EnterBox_TextChanged"
/>

There are a few things I’d like to point out about thiscode:

  • The elements (buttons, ListBox, TextBox, etc…) have names so we can reference them in the code behind
  • Events are wired up to methods in the code behind, such as the Clicked and TextChanged events.

These are indicators that this UI was coded up in a traditional way without a ViewModel (or at least not a well designed one).  When we look at the code we get that confirmed with code like this:

private void EnterBox_TextChanged(object sender, TextChangedEventArgs e)
{
UpdateEnterBoxButtons();
}

private void UpdateEnterBoxButtons()
{
if (EnterBox.Text.Length == 0)
{
EnterButton.IsEnabled = false;
BackspaceButton.IsEnabled = false;
}
else
{
EnterButton.IsEnabled = true;
BackspaceButton.IsEnabled = true;
}
}

Here we see that the logic in the View is very tightly coupled with the XAML markup, since the View not only responds to events from the controls, but directly updates the state of various controls.

While one could theoretically compile this code against 2 sets of markup (and there are some challenges to just making that happen) we are quite limited in the changes that could be made – other than just layout
and style changes.  For example the View code expects both an Enter and Backspace button – but what if, due to space constraints, on phone we would rather just use the ones on the soft keyboard rather than have such buttons in our main UI.

 

 

Microsoft Small Basic Guru Awards - July 2014 WINNERS!!!

MSDN Blogs - Wed, 08/20/2014 - 16:41

Nonki and I were the only contributors this month, but a special thanks go out to Nonki for really knocking it out of the park with a lot of fantastic articles!

 

  

 Small Basic Technical Guru - July 2014  

 

Ed Price - MSFT Small Basic Survival Guide Michiel Van Hoorn: "Oh the overload!"
RZ: "Very nicely categorized and organized. Way to go!"

 

Nonki Takahashi Small Basic: Character Set - Unicode RZ: "Very well explained. I wager that many programmers can't quite explain what's unicode and utf-8 :)"
Michiel Van Hoorn: "Great article on this fundamental element in programming"

 

Nonki Takahashi Small Basic: Controls Michiel Van Hoorn: "Practical topic with good examples"

Also worth a mention were the other entries this month:

 

If you haven't contributed an article for August, and you think you have a good wiki article in mind, here's your chance to show it off! :D

 

Thanks!

   - Ninja Ed

Azure Network Maintenance Impacting Application Insights Services 8/23 - 8/25 UTC

MSDN Blogs - Wed, 08/20/2014 - 15:35

This is a proactive notification to inform our customers that our Azure partners are planning a network maintenance window in several Microsoft Azure regions and datacenters.  Application Insights is hosted in datacenters that will be affected on the weekend of 8/23 - 8/25.

We are taking steps to minimize impact to our live services, but customers may experience broad, intermittent service unavailability during the Azure maintenance window. 

Maintenance Window - 8/23 00:00 UTC to 8/25 00:00 UTC

For broader details about what this Azure maintenance might mean to you, please see the Azure blog post here:

http://social.msdn.microsoft.com/Forums/windowsazure/en-US/home?forum=WAVirtualMachinesforWindows&announcementId=791785c1-84d1-4e8e-9c1e-d09cf27f8692

We apologize for any inconvenience.

-Application Insights Service Delivery Team

Visual Studio 2010 uninstall utility back online

MSDN Blogs - Wed, 08/20/2014 - 14:56

Four years ago I published a utility to help perform a clean uninstall of Visual Studio 2010. Before we added package reference counting and related bundles to Visual Studio setup, we couldn’t always be sure which products were still required so not everything was removed. This utility will remove everything provided one of a few command line options documented in the original article.

Unfortunately, the old site where the utility was hosted was archived and some readers recently pointed this out. I’ve since reposted the utility on the Microsoft Download Center and created a short URL (http://aka.ms/vs2010uninstall) if you want to remove older Visual Studio bits since by now I’m sure you’re enjoying newer versions!

Programming and writing are similar things

MSDN Blogs - Wed, 08/20/2014 - 14:39

At least, that’s my opinion. They’re both ways of recording and communicating ideas, and they’re both best when they’re clear and brief and unambiguous. I do believe that similar skills go into each. But they’re for different audiences and those different audiences have different natures. So maybe that’s why we think of programming and writing as being so different, and we say that someone who’s good at one isn’t necessarily good at the other. But I feel that if you genuinely are good at the one then you would be good at the other if you tried it and gave it as much time and energy.

The audience of source code is a compiler (sure, it’s also you when you have to re-read your own code in a month’s time, but that’s secondary). The audience of the written word is people.

A compiler always knows when it has misunderstood you. People don’t always know when they’ve misunderstood you. But in either case the fault lies primarily with the communicator. Still, it’s durned convenient to always know when you’ve been misunderstood. Imagine the disasters that would have averted in history if people gave compiler errors and warnings.

When a compiler knows it's misunderstood you, it will tell you so. When a person knows they've misunderstood you, they won’t always tell you. But they should. Perhaps they feel it’d be impolite to do so; perhaps they’re in a hurry; perhaps they don’t think it matters; perhaps they think it’ll become clearer over time. Perhaps.

So there you go. If from time to time you think your compiler is a PITA, just try writing for people! :P

-Steve

VSO is Happy to See You! Project Welcome Pages

MSDN Blogs - Wed, 08/20/2014 - 14:09

The August 18th news article on the Visual Studio site announced a fun new addition to VSO: Project Welcome pages.

Think of Welcome pages as documentation, a greeting, or basic contextual information for the Team Project.  You can use a Welcome pages for things like:

  • Describing the purpose/business value of the project.
  • Basic tips and tricks for navigating the VSO project.
  • Project-specific nomenclature or acronyms
  • Project sponsors or contacts
  • You get the idea.. whatever!

The implementation of these pages is surprisingly simple.  Pages are really just Markdown files (.md) which are checked in/committed to the root of your project.  The default page is named “readme.md”.  For example, in my “Awesome Calculator” project, I checked in a “readme.md”:

Now if I got to my project’s homepage, I see a “Welcome” tab.  If I click on that, I get to any/all of my Welcome pages:

Adding additional Welcome pages is simple as well.  Just check in/commit more markdown files! 

My new markdown file, “The Truth.md”, then renders like this:

If you’re not familiar with markdown, don’t fear.  It’s a simple and fast markup.  VSO utilizes of GitHub Flavored Markdown, a common convention already used in some open source version control systems, based on then “marked” open source library. You can use virtually any editor (they are just text files) to work on your markdown files, including VIsual Studio, MarkdownPad, and others.

For additional details, please read Martin Woodward’s post on the Visual Studio ALM blog.

Enjoy!

WebDeploy using publish settings

MSDN Blogs - Wed, 08/20/2014 - 13:25

In the new version of Web Deploy 3.6 you can now use your publish settings that were created within Visual Studio. So instead of doing this

msdeploy.exe -verb:sync -source:contentPath=d:\web\wwwroot -dest:contentPath=siteName,computername=https://dev/msdeploy.axd?site=siteName,username=myUser,password=myPass,authtype=basic

Can now be simplified to this:

msdeploy.exe -verb:sync -source:contentPath=d:\web\wwwroot -dest:contentPath=siteName,publishsettings=d:\dev.PublishSettings

Happy days!

Serie: Eigene Anwendungen auf Microsoft Azure - Teil 1: Überblick

MSDN Blogs - Wed, 08/20/2014 - 13:21

Die meisten Personen, die sich für das Thema Cloud Computing interessieren, haben zunächst ein Szenario im Blick: die Ausführung einer eigenen Anwendung in der Cloud. Ob nun eine bestehende oder eine neu zu entwickelnde Anwendung: in beiden Fällen kommt man recht schnell an den Punkt an dem auffällt, dass es hierzu in Microsoft Azure – anders als bei einem klassischen Hoster oder vielen anderen Cloud-Anbietern – mehrere Optionen gibt. Microsoft Azure bietet nicht nur das Hosting klassischer virtueller Maschinen im Sinne eines Infrastructure-as-a-Service-Ansatzes, sondern auch speziellere Hosting Varianten, die optimiert sind auf die schnelle Bereitstellung von Web-Anwendungen oder die flexible Skalierung mehrschichtiger Anwendungen. Diese Blog-Serie beschäftigt sich nun mit der Auswahl der für ein bestimmtes Szenario bestgeeigneten Ausführungsmodells. Sie ist unterteilt in

  • Teil 1: Überblick über die Ausführungsoptionen
  • Teil 2: Virtual Machines
  • Teil 3: Cloud Services
  • Teil 4: Websites
  • Teil 5: Mobile Services
  • Teil 6: Auswahl des besten Ausführungsmodells
  • Teil 7: Wechsel des Ausführungsmodells

Folgende Optionen stehen für die Ausführung eigener Anwendungen auf Microsoft Azure zur Verfügung:

Dies klingt zunächst verwirrend, letztlich lässt sich die Frage nach der besten Alternative aber recht schnell beantworten. Hinzu kommt die Möglichkeit, diese Optionen miteinander zu kombinieren. D.h. es ist durchaus möglich, dass Teile einer Anwendung als Website betrieben werden und andere Teile (z.B. die Datenbank) nutzen, die in einer Virtual Machine ausgeführt werden. Darüber hinaus ist ein Wechsel zwischen den Optionen möglich, d.h. man verbaut sich nichts, wenn man mit einer Option (z.B. Websites) beginnt und später auf eine andere Option (z.B. Cloud Services) wechselt.

Die vier Alternativen unterscheiden sich primär dadurch, wie viele Aspekte der Umgebung durch das Ausführungsmodell vorgegeben und damit von Azure automatisiert verwaltet werden (Einspielen von Patches, Updates, Failover-Management etc.) und welche Aspekte durch den Nutzer bestimmt werden können. Je mehr Aspekte bestimmt werden können, desto weniger Aspekte werden von Azure verwaltet. Umgekehrt gilt entsprechend: je mehr von Azure automatisiert verwaltet wird, desto weniger Einfluss auf die Umgebung ist durch den Nutzer möglich. Höchste Automatisierung (dafür geringste Möglichkeiten, die Umgebung zu kontrollieren) bieten Mobile Services. Bei Virtual Machines ist auf der anderen Seite die Möglichkeit, Einfluss auf die Umgebung zu nehmen, am größten, dafür ist der Automatisierungsgrad am kleinsten. Die beiden anderen Alternativen, Cloud Services und Websites, liegen dazwischen. Folgende Tabelle gibt einen Überblick auf die Alternativen und deren Automatisierungsgrad bzw. die Möglichkeiten, Einfluss auf die Umgebung zu nehmen.

  Virtual Machines Cloud
Services Websites Mobile
Services Automatisierungsgrad ● ●● ●●● ●●●● Einflussmöglichkeiten ●●●● ●●● ●● ●

Die Tabelle gibt schon den wichtigsten Hinweis: wann immer möglich, sollten Anwendungen als Mobile Service bzw. Websites ausgeführt werden. Dort ist der Automatisierungsgrad und damit die Einsparungen im Vergleich zu einem Eigenbetrieb oder dem Betrieb in einer virtuellen Maschine am höchsten. Nur wenn die Anforderungen bestimmte Konfigurationen der Umgebung erfordern, d.h. die Umgebung stark angepasst werden muss, sollten Virtual Machines zum Einsatz kommen.

Für einige Szenarien können recht einfach erste Empfehlungen für die Ausführungsoption genannt werden:

Szenario Naheliegende
Ausführungsoption Grund Hosting einer ASP.NET- oder PHP-basierten Webseite Websites Websites bieten den höchsten Grad an Automatisierung, und die bereitgestellte Umgebung eignet sich sehr gut zur Ausführung von skalierbaren Web-Anwendungen. Betrieb einer bestehenden Linux-basierten LOB-App Virtual Machines Virtual Machines bieten als einzige Ausführungsoption den Betrieb einer Linux-basierten Umgebung. Diese kann dann individuell konfiguriert werden. Der Nutzer kann sich hierzu als Admin anmelden. Bereitstellung eines REST-Backends für mobile Anwendungen Mobile Services Mit Mobile Services lassen sich in kürzester Zeit Backends für mobile Anwendungen bereitstellen. Die Dienste können dabei leicht mit Funktionen zur Benutzerauthentifizierung, Push Notifications, Datenspeicherung versehen werden. Cloud-Anwendung, die auf Ressourcen im lokalen Unternehmensnetzwerk zugreifen soll Cloud Services oder
Virtual Machines Cloud Services und Virtual Machines bieten die Möglichkeit, über ein virtuelles Netzwerk Verbindungen zu einem lokalen Rechenzentrum herzustellen.

Diese Tabelle gibt nur einen ersten Hinweis auf eine geeignete Alternative. Vor einer konkreten Umsetzung sollte diese noch genauer betrachtet werden. In den weiteren Teilen dieser Blog-Serie sollen die einzelnen Alternativen deshalb genauer vorgestellt werden.

Weitere Informationen

Fun with the Interns: Shaurya Arora on Designing .NET for NuGet

MSDN Blogs - Wed, 08/20/2014 - 13:18

A few weeks ago when I was up in Redmond I had the pleasure of interviewing some interns on the .NET team to talk about their experience as an intern at Microsoft and to show off the projects they are working on.

In this interview I sit down with Shaurya (a.k.a Shaun) Arora, a Program Manager Intern on the .NET Ecosystem team, and we chat about his internship experience and summer project.

You’ve probably noticed that we're releasing more and more .NET framework functionality via NuGet. Moving forward, we intend to bring the two even closer together. Shaun spent a lot of time thinking about this problem space and helped us shape our thoughts and design some ideas. Shaun is also a very talented developer and designer and helped us to build a catalog of all the .NET features we shipped since .NET 4. Check it out!

Watch: Fun with the Interns: Shaurya Arora on Designing .NET for NuGet

And for all those students out there pursuing a career in computer science, you should consider an internship at Microsoft. You can help build real software that helps millions of people! Learn more about the Microsoft internship program here.

Enjoy!

Announcing the release of Visual F# Tools 3.1.2

MSDN Blogs - Wed, 08/20/2014 - 12:23

We are happy to announce the availability of Visual F# Tools 3.1.2, the latest update to the Visual F# compiler and F# IDE tooling for Visual Studio.  You can download the installer package here.

Building upon Visual F# 3.1, and the first out-of-band update Visual F# Tools 3.1.1, Visual F# Tools 3.1.2 is a standalone, F#-only installer that packages the latest updates to the F# compiler, interactive, runtime, and Visual Studio integration.  The IDE updates apply to Visual Studio 2013 Pro+, Desktop Express, and Web Express.

A release by and for the F# community

To begin with, it’s worth noting that this is the first Visual F# Tools release since we expanded our open source efforts and began taking contributions, and therefore the first release to include direct contributions from the F# community! We would like to thank all of the developers who worked with us by opening bugs, sending pull requests, and participating in discussions.

Commits from the following community F# developers are included in Visual F# Tools 3.1.2: antofik, Don Syme, Jon Harrop, Robert Jeppesen, Steffen Forkmann, Vladimir Matveev, Will Smith, Xiang Zhang.

What’s new? Expanded portable library support, including Windows Phone 8.1

We continue to expand .NET portable library support in Visual F#.  New in this release, developers will find F# project templates, along with compiler and runtime support, for two additional portable profiles:

  • Profile 78 (.NET Framework 4.5, Windows 8, Windows Phone Silverlight 8)
  • Profile 259 (.NET Framework 4.5, Silverlight 5, Windows 8, Windows Phone 8.1)

This is in addition to the two profiles previously supported – Profile 47 (.NET Framework 4.5, Silverlight 5, Windows 8) and Profile 7 (.NET Framework 4.5, Windows 8).

Issues with adding project references between C# and F# portable libraries have also been addressed in this release. Altogether, this means that for the first time you can add an F# portable library project directly to a Windows Phone 8.1 solution!

  Non-locking assembly references in FSI

F# developers love the quick-iteration development workflow enabled by F# Interactive – “edit-compile-test” is more or less distilled to “edit-test” – and tend to dislike anything that slows them down.

Oddly enough, one of the most common speed bumps in this loop is actually F# Interactive itself! Adding a #r assembly reference causes the referenced assembly to be locked on disk. If that assembly is part of your solution, and you want to rebuild it, make sure to restart FSI first!  If you don’t, your build will fail with the dreaded “The process cannot access the file 'bin\Debug\ClassLibrary1.dll' because it is being used by another process.”

Those errors should no longer be an issue. F# Interactive now supports non-locking #r references via shadow copy.

This is a configurable behavior.  Non-locking references are enabled by default in the hosted Visual Studio F# Interactive, and configurable via the F# Interactive options dialog. On the command line, the default behavior for fsi.exe has not been changed, but you can easily enable the new behavior via the switch --shadowcopyreferences+

Support for Publish in web and Azure projects

If you are using F# for web development, perhaps utilizing one of the excellent community project templates that are available, you have likely noticed that the Visual Studio “Publish” action has not worked for F# projects in the past.  This long-standing issue has finally been addressed; you can now publish F# web and Azure projects directly from Visual Studio!

Minor language changes Improved *nix compatibility with #! in F# scripts

The F# compiler now allows for the shebang (#!) directive to exist at the beginning of F# source files, and will treat such a line as a comment.  This allows F# scripts to be compatible with the Unix convention whereby a script can indicate to the OS what interpreter to use by providing the path to that interpreter on the first line, following the #! directive.

This change does not affect how F# file associations are configured on Windows.

Compiler support for high-dimensional slicing

F# supports slicing syntax for working with arrays and other multi-dimensional data types, and developers can define custom slicing behavior for their own types by implementing appropriate overloads of the GetSlice and SetSlice methods.

In previous releases, the compiler enforced a limit of 4 slicing dimensions.  This limit has been lifted; developers are now free to define arbitrary-dimensional slicing semantics in their code.

Spaces in active pattern case identifiers

There was previously a restriction preventing space characters from being used in active pattern case identifiers.  This restriction has been relaxed; space characters may now be used in ``  ``-escaped case identifiers.

And beyond

In addition to what’s mentioned here, Visual F# 3.1.2 also includes a number of bug fixes, a couple of performance improvements, and even some optimized code generation for struct processing. A full list of changes and bug fixes is in our Codeplex repo.

More Information

For more information about F# generally, please visit http://fsharp.org. If you are interested in contributing to the Visual F# Tools, please visit our open source home at https://visualfsharp.codeplex.com/

This item cannot be declared a record because it is checked out.

MSDN Blogs - Wed, 08/20/2014 - 12:05

A customer recently asked me to help with a problem in a record center in SharePoint 2010. They had one specific record that seemed like it was stuck in some state where it couldn't be modified. The UI showed either of the following two messages when we tried to delete or modify it.

This item cannot be declared a record because it is checked out.

The item cannot be deleted, moved, or renamed because it is either on hold or is a record which blocks deletion.

Digging into the ULS logs, we found the record was set to locked as read-only, even though the properties of the document showed it wasn't read only.

01/01/2014 11:11:11.11    w3wp.exe (SERVERNAME)    0x044C    SharePoint Foundation    General    8kh7    High    This item cannot be updated because it is locked as read-only.    bad285fd-e35c-4e8b-8e1f-a61589a4e689
01/01/2014 11:11:11.11    w3wp.exe (SERVERNAME)    0x044C    SharePoint Foundation    General    8kh7    High    Stack trace: onetutil.dll: (unresolved symbol, module offset=00000000000A22A1) at 0x000007FEEC2322A1 onetutil.dll: (unresolved symbol, module offset=00000000000A3461) at 0x000007FEEC233461 owssvr.dll: (unresolved symbol, module offset=0000000000009002) at 0x000007FEE56A9002 owssvr.dll: (unresolved symbol, module offset=0000000000037941) at 0x000007FEE56D7941 mscorwks.dll: (unresolved symbol, module offset=00000000002BB727) at 0x000007FEF8F1B727 Microsoft.SharePoint.Library.ni.dll: (unresolved symbol, module offset=00000000000DFA24) at 0x000007FEE3D6FA24 Microsoft.SharePoint.ni.dll: (unresolved symbol, module offset=0000000001AFA6DD) at 0x000007FEE8BCA6DD Microsoft.SharePoint.ni.dll: (unresolved symbol, module offset=0000000001C68563) at 0x000007FEE8D38563 Microsoft.SharePoint.ni.dll: (unresolved symbol, module offset=0000000001C686C3) at 0x000007FEE8D386C3    bad285fd-e35c-4e8b-8e1f-a61589a4e689
01/01/2014 11:11:11.11    w3wp.exe (SERVERNAME)    0x044C    SharePoint Foundation    General    2mx9    Verbose    Ignore exception 'Microsoft.SharePoint.SPException: This item cannot be updated because it is locked as read-only. ---> System.Runtime.InteropServices.COMException (0x81020089): This item cannot be updated because it is locked as read-only.    
at Microsoft.SharePoint.Library.SPRequestInternalClass.DeleteItem(String bstrUrl, String bstrListName, Int32 lID, UInt32 dwDeleteOp, Guid& pgDeleteTransactionId)    
at Microsoft.SharePoint.Library.SPRequest.DeleteItem(String bstrUrl, String bstrListName, Int32 lID, UInt32 dwDeleteOp, Guid& pgDeleteTransactionId)     --- End of inner exception stack trace ---    
at Microsoft.SharePoint.SPGlobal.HandleComException(COMException comEx)     at Microsoft.SharePoint.Library.SPRequest.DeleteItem(String bstrUrl, String bstrListName, Int32 lID, UInt32 dwDeleteOp, Guid& pgDeleteTransactionId)    
at Microsoft.SharePoint.SPListItem.DeleteCore(DeleteOp deleteOp)     at Microsoft.SharePoint.SPListItem.Recycle()    
at Microsoft.SharePoint.SPListItem_Proxy.InvokeMethod(Object obj, String methodName, XmlNodeList xmlargs, ProxyContext proxyContext, Boolean& isVoid)    
at Microsoft.SharePoint.Client.ClientMethodsProcessor.InvokeMethod(Object obj, String methodName, XmlNodeList xmlargs, Boolean& isVoid)    
at Microsoft.SharePoint.Client.ClientMethodsProcessor.ProcessMethod(XmlElement xe)    
at Microsoft.SharePoint.Client.ClientMethodsProcessor.ProcessOne(XmlElement xe)    
at Microsoft.SharePoint.Client.ClientMethodsProcessor.ProcessStatements(XmlNode xe)    
at Microsoft.SharePoint.Client.ClientMethodsProcessor.ProcessExceptionHandlingScope(XmlElement xe)' when executing '<ExceptionHandlingScopeSimple Id="0" xmlns="http://schemas.microsoft.com/sharepoint/clientquery/2009"><ObjectPath Id="3" ObjectPathId="2" /><ObjectPath Id="5" ObjectPathId="4" /><ObjectPath Id="7" ObjectPathId="6" /><ObjectPath Id="9" ObjectPathId="8" /><ObjectPath Id="11" ObjectPathId="10" /><Query Id="12" ObjectPathId="10"><Query SelectAllProperties="false"><Properties><Property Name="FileLeafRef" ScalarProperty="true" /></Properties></Query></Query><Method Name="Recycle" Id="13" ObjectPathId="10" /></ExceptionHandlingScopeSimple>'.    bad285fd-e35c-4e8b-8e1f-a61589a4e689

To fix this issue, I found some code that helped removed the lock. Take a look at the sample code, and hopefully it can fix the issue for you.

We leveraged the UndeclareItemAsRecord function.
http://technet.microsoft.com/en-us/subscriptions/microsoft.office.recordsmanagement.recordsrepository.records.undeclareitemasrecord(v=office.14).aspx 

private static void UndeclareDeclare()
{
string recordCenterRootWebURL = "http://sp2010:1123/sites/records";
using (SPSite site = new SPSite(recordCenterRootWebURL))
{
using (SPWeb web = site.OpenWeb())
{
for (int i = 0; i < 300; i++)
{
string listName = "Administration";
SPList list = web.Lists[listName];
int listItemId = 4; // ID of the list item declared as record
SPListItem item = list.GetItemById(listItemId);
// Undeclare item as record
Microsoft.Office.RecordsManagement.RecordsRepository.Records.UndeclareItemAsRecord(item);
item = list.GetItemById(listItemId);
// Declare item as record
Microsoft.Office.RecordsManagement.RecordsRepository.Records.DeclareItemAsRecord(item);
Console.WriteLine(i);
}
}
}
}



If you can't undeclared the item as a record, it might be possible to turn off the lock. There's a method in the records management code by called Records.BypassLocks that might do the trick.
http://technet.microsoft.com/en-us/subscriptions/microsoft.office.recordsmanagement.recordsrepository.records.bypasslocks(v=office.14).aspx

private static void TouchItem()
{
using (SPSite site = new SPSite(recordCenterRootWebURL))
{
using (SPWeb web = site.OpenWeb())
{
SPList list = web.Lists[listName];
SPListItem item = list.GetItemById(listItemId);
Records.BypassLocks(item, delegate(SPListItem item1)
{
item1.File.CheckOut();
item1.Update();
item1.File.CheckIn("hello");
});
//Console.WriteLine("Done update");
}
}
}

There are a bunch of reasons why locks can get stuck, and some have to do with configuration and the ways records management works. Please make sure you understand your scenario, before applying a fix like this.

Log reader agent may fail to start on SQL Server 2012 Service Pack 1 Update version 11.0.3460.0

MSDN Blogs - Wed, 08/20/2014 - 11:18
Yesterday we have confirmed a SQL transactional replication problem in SQL Server 2012 version 11.0.3460.0 where running a second instance of the log reader agent for a different publication will fail with error “Another logreader agent for the subscription or subscriptions is running, or the server is working on a previous request by the same agent.” We are working on releasing a SQL Server 2012 Service Pack 1 hotfix next week to fix this problem. For an immediate fix, customers can...(read more)

Using the Correct Version of Web Deploy

MSDN Blogs - Wed, 08/20/2014 - 10:27

 

If you have encountered the error Using a 64-bit source and a 32-bit destination with provider is not supported:

 

This is due to a package created on a 64-bit system (source) using a 64-bit version of Web Deploy and attempting to deploy the package on a 64-bit system (target) with the 32-bit version of Web Deploy.

Resolution:

Install the 64-bit version of Web Deploy on the target server to deploy the package.

Pages

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