简体   繁体   中英

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

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?

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/ ).

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM