DZone
Thanks for visiting DZone today,
Edit Profile
  • Manage Email Subscriptions
  • How to Post to DZone
  • Article Submission Guidelines
Sign Out View Profile
  • Post an Article
  • Manage My Drafts
Over 2 million developers have joined DZone.
Log In / Join
Refcards Trend Reports Events Over 2 million developers have joined DZone. Join Today! Thanks for visiting DZone today,
Edit Profile Manage Email Subscriptions Moderation Admin Console How to Post to DZone Article Submission Guidelines
View Profile
Sign Out
Refcards
Trend Reports
Events
Zones
Culture and Methodologies Agile Career Development Methodologies Team Management
Data Engineering AI/ML Big Data Data Databases IoT
Software Design and Architecture Cloud Architecture Containers Integration Microservices Performance Security
Coding Frameworks Java JavaScript Languages Tools
Testing, Deployment, and Maintenance Deployment DevOps and CI/CD Maintenance Monitoring and Observability Testing, Tools, and Frameworks
Partner Zones AWS Cloud
by AWS Developer Relations
Culture and Methodologies
Agile Career Development Methodologies Team Management
Data Engineering
AI/ML Big Data Data Databases IoT
Software Design and Architecture
Cloud Architecture Containers Integration Microservices Performance Security
Coding
Frameworks Java JavaScript Languages Tools
Testing, Deployment, and Maintenance
Deployment DevOps and CI/CD Maintenance Monitoring and Observability Testing, Tools, and Frameworks
Partner Zones
AWS Cloud
by AWS Developer Relations
The Latest "Software Integration: The Intersection of APIs, Microservices, and Cloud-Based Systems" Trend Report
Get the report
  1. DZone
  2. Software Design and Architecture
  3. Cloud Architecture
  4. How to Troubleshoot Apps Using Windows Azure Toolkit

How to Troubleshoot Apps Using Windows Azure Toolkit

Zhiming Xue user avatar by
Zhiming Xue
·
Apr. 04, 12 · Interview
Like (0)
Save
Tweet
Share
4.11K Views

Join the DZone community and get the full member experience.

Join For Free

You can download Windows 8 Consumer Preview and Visual Studio 11 (beta) here.

clip_image002[1] clip_image004[1] clip_image006[1] clip_image008[1] clip_image010[1] clip_image012[1]

The new Windows Azure Toolkit for Windows 8 Consumer Preview makes it much easy for developers to use Windows Azure and the Windows Push Notification Services (WNS) for a Windows 8 Metro Style app. If you follow the instructions precisely, chances are you will be able to run the sample Margie's Travel app, and create your own Windows 8 apps using the WNS.

However, you may have run into issues in two areas: one related to Windows Firewall and the other related to use of WNS credentials in your apps. Before discussing how to troubleshoot the potential issues, let’s take a quick look at how the WNS works. More detail here. You can skip this section if you are familiar with the WNS.

 

IC554245

  1. Your app sends a request for a push notification channel to the Notification Client Platform.
  2. The Notification Client Platform asks WNS to create a notification channel. This channel is returned to the calling device in the form of a Uniform Resource Identifier (URI).
  3. The notification channel URI is returned by Windows to your app.
  4. Your app sends the URI to your own cloud service. This callback mechanism is an interface between your own app and your own service. It is your responsibility to implement this callback with safe and secure web standards.
  5. When your cloud service has an update to send, it notifies WNS using the channel URI. This is done by issuing an HTTP POST request, including the notification payload, over Secure Sockets Layer (SSL). This step requires authentication.
  6. WNS receives the request and routes the notification to the appropriate device.

 

Windows Firewall Rules

When you install the toolkit on Windows 8 Consumer Preview, the setup program checks dependencies and install all required programs such as Visual Web Developer 2010 Express and Windows Azure SDK in addition to Visual Studio 11 Express Beta For Windows 8.

image

 

During the setup, you will be asked to change Windows Firewall rules, install the 127.0.0.1 certificate, and add Loopback Exceptions for the WebAuthentication Broker.

image

You can check if the Windows Firewall rule for Windows Azure Toolkit for Windows 8 Local has been added. If not, try to re-run the setup or check if you have the permission to change the Windows Firewall rules. If your computer is domain joined, some firewall rules may be managed by Group Policy.  

image 

 

Remote Server 403 Error

if your applications are not registered with the WNS properly, you will likely experience this error, “The remote server returned an error: (403) Forbidden.” One possibility is that your Windows 8 Metro Style app uses an incorrect package name or one that is different from one for the registered cloud service app. 

image

 

Using the toolkit, you will create and work with two applications: a Windows Azure cloud service application, which runs either locally with the emulator or in Windows Azure, and a Windows 8 Metro Style app. The cloud service app has to be registered with the WNS, and authenticated by the WNS using Package security identifier and Client secret before sending requests to the WNS. On the other hand, the Windows 8 app has to use the Package name for the registered cloud service app. If you register the Windows 8 app, and uses the new Package name associated with the registration, you will receive the 403 error.

Ports 443 or 10080

Make sure that these ports are not used in your local IIS web sites. As you compile the Windows Azure app, you may seen some output that looks like below:

Windows Azure Tools: Warning: Remapping private port 443 to 446 in role 'zxdemoWin8CloudApp1.Web' to avoid conflict during emulation.
Windows Azure Tools: Warning: Remapping private port 10080 to 10082 in role 'zxdemoWin8CloudApp1.Web' to avoid conflict during emulation.

This is fine as long as your cloud service app is running at port 443, for example, https://127.0.0.1.

image

If you see something like https://127.0.0.1:444, or any port number that is not 443, then you should check. If you are using the local development environment, you should shut down the local emulators, both the storage emulator and the computer emulator and start them again. Doing so ensures that the emulators are running for the current cloud service app.

Application Management Site for Metro style apps

You can register your cloud service app or Windows 8 Metro Style app at ttps://manage.dev.live.com/build

image

You can find a list of registered apps at https://manage.dev.live.com/Applications/Index that is associated with your Windows Live ID account.

image 

Happy Coding! You can find my other Windows 8 Developer How To posts here.

app azure Uniform Resource Identifier Web Service Cloud

Published at DZone with permission of Zhiming Xue. See the original article here.

Opinions expressed by DZone contributors are their own.

Popular on DZone

  • Beyond Coding: The 5 Must-Have Skills to Have If You Want to Become a Senior Programmer
  • Key Elements of Site Reliability Engineering (SRE)
  • How Agile Architecture Spikes Are Used in Shift-Left BDD
  • How To Handle Secrets in Docker

Comments

Partner Resources

X

ABOUT US

  • About DZone
  • Send feedback
  • Careers
  • Sitemap

ADVERTISE

  • Advertise with DZone

CONTRIBUTE ON DZONE

  • Article Submission Guidelines
  • Become a Contributor
  • Visit the Writers' Zone

LEGAL

  • Terms of Service
  • Privacy Policy

CONTACT US

  • 600 Park Offices Drive
  • Suite 300
  • Durham, NC 27709
  • support@dzone.com
  • +1 (919) 678-0300

Let's be friends: