Where is Azure Service Definition Schema (.csdef File) located in Windows

久未见 提交于 2019-12-11 23:38:39

问题


I have a web app running in a Virtual Machine hosted in an Azure Cloud Service. I use Windows. I'm trying to secure the application by installing a SSL certificate.

Here it says that to do so:

"In your development environment, open the service definition file (CSDEF)"

Development environment? what's that? Eclipse? (I don't use Visual Studio)

This is how this file typically looks like:

<?xml version="1.0" encoding="utf-8"?>
<ServiceDefinition name="CloudService1" xmlns="http://schemas.microsoft.com/ServiceHosting/2008/10/ServiceDefinition">
  <WebRole name="WCFServiceWebRole2">
    <Endpoints>
      <InputEndpoint name="HttpIn" protocol="http" port="80" />
      <InputEndpoint name="Https" protocol="https" port="443" certificate="SSL" />
    </Endpoints>
    <Imports>
      <Import moduleName="Diagnostics" />
    </Imports>
    <Certificates>
      <Certificate name="SSL" storeLocation="LocalMachine" storeName="My" />
      <Certificate name="MSSecAuth" storeLocation="LocalMachine" storeName="CA" />
      <Certificate name="MSInternetAuth" storeLocation="LocalMachine" storeName="CA" />
    </Certificates>
    <LocalResources>
      <LocalStorage name="Logs" cleanOnRoleRecycle="false" sizeInMB="100"/>
    </LocalResources>
  </WebRole>
</ServiceDefinition>

The question is: Where is the service definition file (CSDEF) located?


回答1:


If you're running in a Virtual Machine the cloud service definition doesn't apply to you. This is used for deployments to Web or Worker Roles and is normally created when you add an 'Azure Cloud Service' project to a Visual Studio solution.

If you want to protect your VM-based service using SSL you would do this as you would on-premise and ensure that you open port 443 as an endpoint to the VM (http://azure.microsoft.com/en-us/documentation/articles/virtual-machines-set-up-endpoints/).



来源:https://stackoverflow.com/questions/26260505/where-is-azure-service-definition-schema-csdef-file-located-in-windows

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!