{"id":3385,"date":"2014-03-23T13:50:46","date_gmt":"2014-03-23T13:50:46","guid":{"rendered":"https:\/\/unknownerror.org\/index.php\/2014\/03\/23\/windows-store-apps-forumsbuilding-windows-store-apps-with-c-or-vb-related-issues-collection-of-common-programming-errors-2\/"},"modified":"2014-03-23T13:50:46","modified_gmt":"2014-03-23T13:50:46","slug":"windows-store-apps-forumsbuilding-windows-store-apps-with-c-or-vb-related-issues-collection-of-common-programming-errors-2","status":"publish","type":"post","link":"https:\/\/unknownerror.org\/index.php\/2014\/03\/23\/windows-store-apps-forumsbuilding-windows-store-apps-with-c-or-vb-related-issues-collection-of-common-programming-errors-2\/","title":{"rendered":"windows-store-apps-forums,building-windows-store-apps-with-c-or-vb-Related issues-Collection of common programming errors"},"content":{"rendered":"<ul>\n<li><img decoding=\"async\" src=\"http:\/\/i.msdn.microsoft.com\/dn186180.LOGO_Win1211(id-id,MSDN.10).png\" \/><br \/>\nmsdn<br \/>\nwindows-store-apps-forums building-windows-store-apps-with-c-or-vb-<br \/>\nI&#8217;m trying to request AutoDiscover information from an Exchange server, and running into the weirdest error message when I use HttpClient to submit the request. The exception I&#8217;m seeing is:A first chance exception of type &#8216;System.Net.Http.HttpRequestException&#8217; occurred in mscorlib.dllSystem.Net.Http.HttpRequestException: An error occurred while sending the request. &#8212;&gt; System.Net.WebException: The underlying connection was closed: An unexpected error occurred on a send. &#8212; &gt; System.Inval<\/li>\n<li><img decoding=\"async\" src=\"http:\/\/i.msdn.microsoft.com\/dn186180.LOGO_Win1211(id-id,MSDN.10).png\" \/><br \/>\nmsdn<br \/>\nwindows-store-apps-forums tools-for-windows-store-apps-<br \/>\nIt use to work but now even with a newly created metro app from template I got those 2 errors when I hit deploy:Error\u00a01\u00a0Error : DEP0700 : Registration of the app in the layout folder &#8220;C:\\Users\\Public\\Documents\\GridAppPub\\GridAppPub\\bin\\Debug\\AppX&#8221; failed.\u00a0GridAppPubError\u00a02\u00a0error 0x80041316: windows.licensing failed to update critical data for 84caf524-2d21-4c83-aaea-378e9650fd83_1.0.0.0_neutral__31ae3h49aptqa.\u00a0 Try again and contact the package publisher i<\/li>\n<li><img decoding=\"async\" src=\"http:\/\/i.msdn.microsoft.com\/dn186180.LOGO_Win1211(id-id,MSDN.10).png\" \/><br \/>\nmsdn<br \/>\nwindows-store-apps-forums building-windows-store-apps-with-c-or-vb-<br \/>\nHi,\u00a0 \u00a0 My App Got rejected two times because of the same reason. I corrected from the first failure itself.\u00a0The following is the reason they got rejected:\u00a0The App displays unexpected behaviours when the reviewers \u00a0snap and unsnaps the app.The App uses a button, gesture or other user interface elements to close the appThe App closes programmatically.The app doesn&#8217;t suspend and \u00a0resume to a \u00a0reasonable state.The app has an app bar, but the bar doesn&#8217;t show up wit<\/li>\n<li><img decoding=\"async\" src=\"http:\/\/i.msdn.microsoft.com\/dn186180.LOGO_Win1211(id-id,MSDN.10).png\" \/><br \/>\nmsdn<br \/>\nwindows-store-apps-forums tools-for-windows-store-apps-<br \/>\nI have 2 Win 8 machines both installing the same copy of Developer Preview Build 8102. One of the machine is the Samsung tablet that obtained from the BUILD conference. I set it as the &#8216;remote machine&#8217; in another system&#8217;s VS11 Debug tab. Both of the machinescan see each other.I launch the Remote debugger on the Samsung tablet. Then Press F5 from another system&#8217;s VS11 project. I can the project shows &#8220;Deployment succeeded&#8221; at the lower left corner of VS11. And after I enter the SamSung<\/li>\n<li><img decoding=\"async\" src=\"http:\/\/i.msdn.microsoft.com\/dn186180.LOGO_Win1211(id-id,MSDN.10).png\" \/><br \/>\nmsdn<br \/>\nwindows-store-apps-forums building-windows-store-apps-with-c-<br \/>\nI&#8217;ve got a Metro app which uses Xaml, and one of the files it auto-generates is xamltypeinfo.impl.g.cpp.\u00a0 I have specified in the project properties -&gt; C\/C -&gt; Precompiled Headers -&gt; Precompiled Header File = &#8220;StdAfx.h&#8221;, however xamltypeinfo.impl.g.cppis trying to use &#8220;pch.h&#8221; for its precompiled header.\u00a0 How do I fix this conflict?What is the process which goes into generating this file? Since it seems to be ignoring the project property, is there a template<\/li>\n<li><img decoding=\"async\" src=\"http:\/\/i.msdn.microsoft.com\/dn186180.LOGO_Win1211(id-id,MSDN.10).png\" \/><br \/>\nmsdn<br \/>\nwindows-store-apps-forums tailoring-your-windows-store-app-for-hardware-and-devices-<br \/>\nHello,We are currently investigating how to port our application across to a Metro style app using the WinRT API so that we can target ARM tablets once they are released.Our application needs to be able to connect to an interface dongle over Bluetooth using the serial port profile, this interface is then used to access a common communications bus used in industrial automation. We are then able to the Bluetooth link to monitorthe communication bus as well as send configuration commands etcTo be a<\/li>\n<li><img decoding=\"async\" src=\"http:\/\/i.msdn.microsoft.com\/dn186180.LOGO_Win1211(id-id,MSDN.10).png\" \/><br \/>\nmsdn<br \/>\nwindows-store-apps-forums building-windows-store-apps-with-html5javascript<br \/>\nI really have to wonder&#8230; the provided change notifications in WinRT are crap. They do not offer any way to find out what has been actually changed. This is so\u00a0annoying\u00a0since\u00a0ReadDirectoryChangesW, which is most likely internally used towatch for file\/folder changes, offers plenty of information about a change. Why did the\u00a0implementers\u00a0of the FileQuery.onchange notifier decided to\u00a0omit\u00a0almost all vital informations in the change event they give to us WinRT use<\/li>\n<li><img decoding=\"async\" src=\"http:\/\/i.msdn.microsoft.com\/dn186180.LOGO_Win1211(id-id,MSDN.10).png\" \/><br \/>\nmsdn<br \/>\nwindows-store-apps-forums building-windows-store-apps-with-c-or-vb-<br \/>\nHello Team,I am receiving below error while opening a Channel Uri for Push Notifications.A method was called at an unexpected time. (Exception from HRESULT: 0x8000000E)A wait operation as timed out. Exception from HRESULT: 0x880403ED\u00a0Also,\u00a0I &#8216;m trying to show a local toast notification on a button click. The toast appears\u00a0on local machine, but fails to show up on Tablet emulator.Appreciate your help.Thanks,Naresh\u00a0\u00a0Naresh<\/li>\n<li><img decoding=\"async\" src=\"http:\/\/i.msdn.microsoft.com\/dn186180.LOGO_Win1211(id-id,MSDN.10).png\" \/><br \/>\nmsdn<br \/>\nwindows-store-apps-forums building-windows-store-apps-with-c-<br \/>\nHi,Most of the time, I create task chains\u00a0from MTA context and I get the expected behavior working well.But, in a specific case, I have to create a task chain from the STA (in my case, when the spend event is raise).The pseudocode :task&lt;TRes&gt; firstTask;if(anyCondition){\u00a0\u00a0\u00a0\u00a0 IASyncOperation&lt;TRes&gt;^ asyncOp = &#8230;.;\u00a0\u00a0 \u00a0 firstTask = task&lt;TRes&gt;(asyncOp);}else{\u00a0\u00a0\u00a0 \u00a0IASyncOperation&lt;TRes&gt;^ anotherAsyncOp = &#8230;.;\u00a0&amp;nbs<\/li>\n<li><img decoding=\"async\" src=\"http:\/\/i.msdn.microsoft.com\/dn186180.LOGO_Win1211(id-id,MSDN.10).png\" \/><br \/>\nmsdn<br \/>\nwindows-store-apps-forums building-windows-store-apps-with-c-or-vb-<br \/>\nI have create a Template Control with these following things:New project -&gt; Class Library (Windows Store Apps)Names it: ProjectButtonTemplateDelete Class1.cs which create automaticallyAdd-&gt;New Item -&gt; TemplateControl -&gt; Names it: ProjectButtonAfter build this Template Control Project, i came back to my main App Project, Add References -&gt; ProjectButtonTemplate\/ProjectButtonTemplate\/Bin\/debug\/ProjectButtonTemplate.dllI add xmns like this:\u00a0xmlns:control=&#8221;using:ProjectButton<\/li>\n<li><img decoding=\"async\" src=\"http:\/\/i.msdn.microsoft.com\/dn186180.LOGO_Win1211(id-id,MSDN.10).png\" \/><br \/>\nmsdn<br \/>\nwindows-store-apps-forums building-windows-store-apps-with-c-or-vb-<br \/>\nI&#8217;m trying to request AutoDiscover information from an Exchange server, and running into the weirdest error message when I use HttpClient to submit the request. The exception I&#8217;m seeing is:A first chance exception of type &#8216;System.Net.Http.HttpRequestException&#8217; occurred in mscorlib.dllSystem.Net.Http.HttpRequestException: An error occurred while sending the request. &#8212;&gt; System.Net.WebException: The underlying connection was closed: An unexpected error occurred on a send. &#8212; &gt; System.Inval<\/li>\n<li><img decoding=\"async\" src=\"http:\/\/i.msdn.microsoft.com\/dn186180.LOGO_Win1211(id-id,MSDN.10).png\" \/><br \/>\nmsdn<br \/>\nwindows-store-apps-forums building-windows-store-apps-with-c-or-vb-<br \/>\nHi,\u00a0 \u00a0 My App Got rejected two times because of the same reason. I corrected from the first failure itself.\u00a0The following is the reason they got rejected:\u00a0The App displays unexpected behaviours when the reviewers \u00a0snap and unsnaps the app.The App uses a button, gesture or other user interface elements to close the appThe App closes programmatically.The app doesn&#8217;t suspend and \u00a0resume to a \u00a0reasonable state.The app has an app bar, but the bar doesn&#8217;t show up wit<\/li>\n<li><img decoding=\"async\" src=\"http:\/\/i.msdn.microsoft.com\/dn186180.LOGO_Win1211(id-id,MSDN.10).png\" \/><br \/>\nmsdn<br \/>\nwindows-store-apps-forums building-windows-store-apps-with-c-or-vb-<br \/>\nHello Team,I am receiving below error while opening a Channel Uri for Push Notifications.A method was called at an unexpected time. (Exception from HRESULT: 0x8000000E)A wait operation as timed out. Exception from HRESULT: 0x880403ED\u00a0Also,\u00a0I &#8216;m trying to show a local toast notification on a button click. The toast appears\u00a0on local machine, but fails to show up on Tablet emulator.Appreciate your help.Thanks,Naresh\u00a0\u00a0Naresh<\/li>\n<li><img decoding=\"async\" src=\"http:\/\/i.msdn.microsoft.com\/dn186180.LOGO_Win1211(id-id,MSDN.10).png\" \/><br \/>\nmsdn<br \/>\nwindows-store-apps-forums building-windows-store-apps-with-c-or-vb-<br \/>\nI have create a Template Control with these following things:New project -&gt; Class Library (Windows Store Apps)Names it: ProjectButtonTemplateDelete Class1.cs which create automaticallyAdd-&gt;New Item -&gt; TemplateControl -&gt; Names it: ProjectButtonAfter build this Template Control Project, i came back to my main App Project, Add References -&gt; ProjectButtonTemplate\/ProjectButtonTemplate\/Bin\/debug\/ProjectButtonTemplate.dllI add xmns like this:\u00a0xmlns:control=&#8221;using:ProjectButton<\/li>\n<li><img decoding=\"async\" src=\"http:\/\/i.msdn.microsoft.com\/dn186180.LOGO_Win1211(id-id,MSDN.10).png\" \/><br \/>\nmsdn<br \/>\nwindows-store-apps-forums building-windows-store-apps-with-c-or-vb-<br \/>\nI am observing a rather unexpected behaviour of images inserted into RichTextBlocks.I am converting a WP7 eBook reader to metro. In WP7 the handling of images is done completely by the App,\u00a0inserting sequences of TextBlocks and Images in a\u00a0StackPanel representing the phone page. This is rather a slow process, and in the MetroApp I replaced it by using RichTextBlocks and inserting in the RTBs sequences of Paragraphs with their relative Inlines, and making full use of the RichTextOverflo<\/li>\n<li><img decoding=\"async\" src=\"http:\/\/i.msdn.microsoft.com\/dn186180.LOGO_Win1211(id-id,MSDN.10).png\" \/><br \/>\nmsdn<br \/>\nwindows-store-apps-forums building-windows-store-apps-with-c-or-vb-<br \/>\nIf you happen to be sharing a ViewModel between two Pages, and both pages have XAML ComboBoxes that bind their ItemsSource and SelectedItem to the ViewModel, it&#8217;s possible that code on a non-visible page will run. Here&#8217;s a snippet:&lt;!&#8211; First Page &#8211;&gt; &lt;ComboBoxItemsSource=&#8221;{Binding Titles}&#8221;SelectedItem=&#8221;{Binding Title, Mode=TwoWay}&#8221;SelectionChanged=&#8221;ComboBox_SelectionChanged&#8221;\/&gt;&lt;Button Click=&#8221;Button_Click&#8221;\/&gt;&#8230;&lt;!&#8211; Second Page &#8211;&gt; &lt;<\/li>\n<li><img decoding=\"async\" src=\"http:\/\/i.msdn.microsoft.com\/dn186180.LOGO_Win1211(id-id,MSDN.10).png\" \/><br \/>\nmsdn<br \/>\nwindows-store-apps-forums building-windows-store-apps-with-c-or-vb-<br \/>\nIn this thread, I asked if it was possible not to make the ComboBox loop around its items. \u00a0In addition, select an item in the middle of the list and expand the ComboBox, and items appear above and below the ComboBox &#8211; not just below like a standard dropdown.I&#8217;m not sure why Microsoft decided to change the way the ComboBox works; the referenced thread ended with a request for a blog entry or clarification on this, but I have seen nothing that explains these non-standard behaviors.Our busine<\/li>\n<li><img decoding=\"async\" src=\"http:\/\/i.msdn.microsoft.com\/dn186180.LOGO_Win1211(id-id,MSDN.10).png\" \/><br \/>\nmsdn<br \/>\nwindows-store-apps-forums building-windows-store-apps-with-c-or-vb-<br \/>\nSince shipping my windows 8.1 application there are SO many more exceptions than there were in windows 8. There seem to be so many new bugs in Windows.One new issue is &#8220;The application identifier provided is invalid.&#8221;I&#8217;m getting this exception in at least two scenarios:&#8221;System.Exception: The application identifier provided is invalid.\u00a0\u00a0 at Windows.UI.Notifications.ToastNotificationManager.CreateToastNotifier()&#8221;and &#8220;System.Exception: The application identifier p<\/li>\n<li><img decoding=\"async\" src=\"http:\/\/i.msdn.microsoft.com\/dn186180.LOGO_Win1211(id-id,MSDN.10).png\" \/><br \/>\nmsdn<br \/>\nwindows-store-apps-forums building-windows-store-apps-with-c-or-vb-<br \/>\nHi,I am using HttpClient for sending requests to the server.HttpClientHandler handler = new HttpClientHandler();handler.UseDefaultCredentials = true;handler.ClientCertificateOptions = ClientCertificateOption.Automatic;handler.AutomaticDecompression = DecompressionMethods.GZip;HttpClient httpClient = new HttpClient(handler);httpClient.Timeout = TimeSpan.FromSeconds(30);httpClient.DefaultRequestHeaders.ExpectContinue = false;HttpRequestMessage request = new HttpRequestMessage(HttpMethod.Post, URL)<\/li>\n<li><img decoding=\"async\" src=\"http:\/\/i.msdn.microsoft.com\/dn186180.LOGO_Win1211(id-id,MSDN.10).png\" \/><br \/>\nmsdn<br \/>\nwindows-store-apps-forums building-windows-store-apps-with-c-or-vb-<br \/>\nHave a bunch of ListViews on our Windows 8 app main panorama. Right-click select works:..but using Tap in the emulator, I cannot tap and swipe down to select\/deselect. It just animates in as a tap.The entire page is a horizontal StackPanel and multiple ListViews\u00a0is in one big horizontal ScrollViewer&#8230;wondering if this is a bug of sorts.<\/li>\n<\/ul>\n<p>Web site is in building<\/p>\n","protected":false},"excerpt":{"rendered":"<p>msdn windows-store-apps-forums building-windows-store-apps-with-c-or-vb- I&#8217;m trying to request AutoDiscover information from an Exchange server, and running into the weirdest error message when I use HttpClient to submit the request. The exception I&#8217;m seeing is:A first chance exception of type &#8216;System.Net.Http.HttpRequestException&#8217; occurred in mscorlib.dllSystem.Net.Http.HttpRequestException: An error occurred while sending the request. &#8212;&gt; System.Net.WebException: The underlying connection was [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-3385","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"_links":{"self":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts\/3385","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/comments?post=3385"}],"version-history":[{"count":0,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts\/3385\/revisions"}],"wp:attachment":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/media?parent=3385"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/categories?post=3385"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/tags?post=3385"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}