调试使用 Microsoft Azure 服务的 Windows CE 应用程序

发布于 2024-10-15 07:56:39 字数 453 浏览 4 评论 0原文

这个问题可能与实际编程关系不大,而与环境设置关系更大。

我正在为 Windows CE 设备开发一个应用程序,它将使用 Microsoft Azure 中托管的服务。显然,这一切都在开发中,服务本身还没有上传到Azure。所以我使用MS提供的模拟器在本地部署服务。另外,我认为仅仅为了调试而将服务上传到 Azure 并不是一个好主意,因为这可能会给我们带来一笔我们还不想支付的 Azure 账单。

另外,请注意,我在 Windows CE 项目中使用 VS2008,在 Azure 项目中使用 VS2010(感谢 MS 放弃对移动设备的支持 -_-)。

问题是,该服务似乎只能通过 127.0.0.1 或 localhost 访问,如果我物理连接 Windows CE 设备或使用模拟设备,它就会成为网络上的一个新实体,并且无法再访问该服务。

如何调试我的 Window CE 应用程序并让它看到服务,同时仍然能够调试服务本身?

This question has probably less to do with actual programming and more to do with environment setup.

I'm developing an application for a Windows CE device, which will use a service hosted in Microsoft Azure. Obviously, this is all under development, and the service itself has not yet been uploaded to Azure. So I'm using the emulators provided by MS to deploy the service locally. Also, I don't think uploading the service to Azure just to debug it is a good idea, as that could net us a bill for Azure we don't yet want to pay.

Also, please note, I'm using VS2008 for the Windows CE project and VS2010 for the Azure project (thank you MS for dropping support for mobile devices -_-).

The problem is, the service seems to be accessible only via 127.0.0.1 or localhost, and if I physically connect a Windows CE device or use an emulated one, it becomes a new entity on the network, and cannot access that service any more.

How can I debug my Window CE application and have it see the service, whilst still being able to debug the service itself?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

花开柳相依 2024-10-22 07:56:39

您是对的,开发结构(允许您构建天蓝色应用程序并在本地调试它的计算模拟器)仅适用于本地开发。有一些技巧可以让你解决这个问题,但我不推荐它。

我的建议是在更传统的托管环境中启动该服务,至少在早期阶段是这样。您可以像往常一样将其定义为网络应用程序,并使其正常运行。然后,当您知道它已基本完成时,创建一个云服务项目并添加现有项目以将您的 Web 应用程序引入云服务解决方案。进入后,将 Web 应用程序添加为 Web 角色就很简单了。

从那里,您可以根据需要在本地和托管 Azure 环境中完成服务测试。这使您可以最大限度地降低开发成本,同时仍然利用云的强大功能。有利的一面是,您还完成了大部分基本工作,以确保您的服务与多种部署场景兼容,从而为您的最终生产状态提供更大程度的选择。

You are correct, the development fabric (the compute emulator that allows you to build an azure application and debug it locally) is only meant for local development. There are some hacks that allow you to get around that, but I wouldn't recommend it.

My recommendation would be to spin up the service in a more traditional hosting environment, at least in these early stages. You can define it as a web app just as you always would have, and get it functioning. Then, when you know its mostly complete, create a cloud service project and do an add existing to bring your web app into the cloud service solution. Once in, its a simple matter to add the web app as a web role.

From there, you can complete testing of the service in both the local and hosted azure environments as needed. This allows you to minimize your development costs while still leveraging the power of the cloud. As an upside, you also have done most of the basic work to ensure your service is compatible with multiple deployment scenarios giving you a greater degree of choice for its final production state.

人心善变 2024-10-22 07:56:39

好的,我不知道这是故意的,还是我发现了上述黑客攻击之一,但我看到 IIS 托管我在端口 5100 上创建的 Azure 站点,并且该站点的绑定是 *,因此它接受所有连接。

使用它,我可以从模拟器访问该服务,并且仍然可以调试所有与 Azure 相关的内容。

OK, I don't know if this was intentional, or if I found one of the mentioned hacks, but I saw that IIS hosts the Azure site I created on port 5100, and the binding for this site is *, so it accepts all connections.

Using this I could access the service from my emulator, and I could still debug all Azure related stuff.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文