What am I going to do?
- Change the listener address of the ASE. For me with obsessive-compulsive disorder, the ASE listens by default to 127.0.0.1:10000-10002, which makes me unacceptable, so I'm going to change it to a domain + 80 port;
- Put in the container, ASE only allow single instance to run, for this thing, I want to open three virtual machines in three environments?
- Connect to SQL Server, not SQL Server Express LocalDB. Dev/qa each has its own SQL Server Instance, of course, bridge to Bridge, Road return.
To change the listener address of the ASE, first verify that it has no HTTP Listener (that is,. sys), otherwise it cannot support port sharing. This simple, run up Ase,netstat-ano see Port 10000-10002 PID is 4, basic can determine, but we still need to confirm further.
Open C:\Program Files (x86) \microsoft Sdks\azure\storage Emulator\azurestorageemulator.exe.config, The listening address and account number in the Storageemulatorconfig is changed to look like this:
<Storageemulatorconfig> <Services> <Servicename= "Blob"URL= "http://dev.blob.contoso.com/"/> <Servicename= "Queue"URL= "http://dev.queue.contoso.com/"/> <Servicename= "Table"URL= "http://dev.tablecontoso.com/"/> </Services> <accounts> < Accountname= "Dev"AuthKey= "eby8vdm02xnocqflquwjpllmetlcdxj1ouzft50usrz6ifsufq2uvercz4i6tq/k1szfptotr/kbhbeksogmgw==" /> </accounts></Storageemulatorconfig>
Running the ASE as an administrator results in the following:
See here, you crossing may ask, why listen to the address before adding a "dev." Instead of just using an address like "blob.contoso.com"? Well, not yet for Azure Storage Explorer. Let's look at the connection page for Azure Storage Explorer:
In order to enable the Azure Storage Explore to connect. On the connection page of Azure Storage Explore, the first way is not to think, because you are the simulator, the second way is to use the connection string, the connection string format of Azure Storage Emulator must have/accountname suffix (see https://docs.microsoft.com/en-us/azure/storage/common/storage-use-emulator), try:
Although this is the way I want to connect most, it is clear that Azure Storage Explorer does not accept such a connection string. Then there is only a third:
Results:
Azure Storage Explorer changed our domain into a format like accountname.blob.contoso.com, hey, this is the Storage account of Azure, even though the front hangs "dev." and hangs behind "/ Dev ", but also reluctantly accepted. To build a container try:
okay! In the next chapter, we will try to use a custom SQL Server instance.
Run Azure Storage Emulator (one) in Windows Server Container: Can I listen to custom addresses?