23.01.2018 Views

MICROSOFT_PRESS_EBOOK_PROGRAMMING_WINDOWS_8_APPS_WITH_HTML_CSS_AND_JAVASCRIPT_PDF

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

• In Visual Studio Express 2012 for Web, right-click the project and select Copy Web Site. In the<br />

dialog that appears, click Connect along the top to open the Open Web Site dialog (below).<br />

Select FTP site on the left, enter the FTP hostname on the top, enter site/wwwroot in Directory,<br />

and then enter your credentials at the bottom. Make sure to prefix your username with the site<br />

name and a backslash (for example, ProgrammingWin8-JS-CH13-HelloTiles\JohnQUser) or you’ll<br />

be very confused by Azure’s refusal to let you through the door! Finish by clicking Open.<br />

• Once Visual Studio Express 2012 for Web is connected to the Azure site, you can upload your<br />

files.<br />

• Once that’s complete, you should be able to use the site URI plus Default.cshtml as the URI for<br />

the tile update service. For instance, try<br />

http://programmingwin8-js-ch13-hellotiles.azurewebsites.net/dayofmonthservice.php with the<br />

Push notifications sample, Scenario 5, and<br />

http://ProgrammingWin8-JS-CH13-HelloTiles.azurewebsites.net/Default.cshtml with Scenario 4<br />

and you’ll see the same results as when we used localhost. You can also just visit these URIs<br />

directly to see the XML they’re producing.<br />

With this, you now have the ability to scale up your Windows Azure hosting, with your app supplying<br />

the hosted URI to the periodic update API. This also puts you in a good position to use push<br />

notifications, as we’ll see later, but because those are also often used with toasts, let’s see how toasts<br />

work next.<br />

598

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!