0

I develop one webrole run in Azure, and the webrole needs to get the input from one device. The webrole can communicate with local device well when it run in local simulation. But when deployed in Azure, the webrole can not get the input from the local device.

btw, The driver of device is c++ 32bit dll, but i warp it into c# as the webrole is written in c#. again, the webrole and device communicate well in local computer, but seems fail the connection when the webrole is deployed on Azure.

Please advise. thanks.

peterluo
  • 1
  • 1

2 Answers2

1

From your description it looks like your device is attached to your local PC. When you run locally, the web role will be running on your local PC hence the device is available. When you deploy your webrole into the cloud, it cannot see the device anymore as it's no longer running on your local PC.

Also installing the driver in the cloud VM where your web role is running will not help as the device is still connected to your local PC.

Mehul Mistri
  • 15,037
  • 14
  • 70
  • 94
Jason Dean
  • 11
  • 3
0

If your device was plugged on your local PC and communicate with your application through, for example USB, then it's impossible to use it from azure. Since you cannot connect local USB from azure VM, nor ship your device to MS and plug into the azure VM that is running your app.

But it could be possible if you really want. First of all you need to create a web service interface in front of your device so that it can be consumed through the network. Then there will be three approaches you can try to use it from azure.

  1. Use the Service Bus Relay to expose your web service. Then your azure application can communicate to this service from the cloud, and then communicate to your device.
  2. Use Windows Azure Connect. I'm not sure if it's still available but you can use it to create an IP-sec connection between your PC and azure VM. Then you can communicate to your web service by using the local IP.
  3. Use the new Windows Azure Virtual Network. I've never tried this feature but it should work.

So essentially, you have to open your local device by introducing a web service layer.

Shaun Xu
  • 4,476
  • 2
  • 27
  • 41