Azure的COM对象 [英] Azure COM Objects

查看:125
本文介绍了Azure的COM对象的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我试图切换到一个Azure的网站,移动网站,我与IIS的服务器上托管。我使用的是COM对象,但我不知道我是否可以注册吗?我发现一些帖子谈论上传的DLL并注册它启动但文章似乎缺少。这可能吗?

I am trying to move a website I am hosting on a server with IIS over to an Azure web site. I'm using a COM object but I'm not sure if I can register this? I found some posts talking about uploading the dll and registering it on start up but the article seems to be missing. Is this possible?

推荐答案

我对Azure的遗留注册COM组件这个确切的问题。我这里记录我的方法:

I had this exact problem registering legacy COM Components on Azure. I documented my methodology here:

AspPDF和ASPJPEG在Windows Azure上

Igorek是正确的,你需要使用一个Web角色来实现这一目标。上述解决方案是基于与启动脚本单个Web角色来运行REGSVR32作为启动任务

Igorek is correct, you will need to use a Web Role to achieve this. The solution above is based on a single Web Role with a startup script to run regsvr32 as a startup task.

要总结,基本上有两个部分来实现这一目标。首先创建一个批处理文件来运行regsvr32命令:

To summarise, there are essentially two parts to achieving this. First create a batch file to run the regsvr32 command:

chcp 1252>NUL
regsvr32 /s .\library\my-com-class.dll
exit /b 0

然后在您的ServiceDefinition.csdef中文件中定义一个启动任务:

Then define a startup task in your ServiceDefinition.csdef file:

<Startup>
<Task commandLine="mybatchfile.cmd" executionContext="elevated" taskType="simple" />
</Startup>

这将触发命令文件在部署运行。

This will trigger the command file to run on deployment.

这篇关于Azure的COM对象的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆