Windows Azure 2/8 - Recursos básicos do Windows Azure
Upcoming SlideShare
Loading in...5
×
 

Like this? Share it with your network

Share

Windows Azure 2/8 - Recursos básicos do Windows Azure

on

  • 870 views

 

Statistics

Views

Total Views
870
Views on SlideShare
870
Embed Views
0

Actions

Likes
0
Downloads
8
Comments
1

0 Embeds 0

No embeds

Accessibility

Upload Details

Uploaded via as Microsoft PowerPoint

Usage Rights

© All Rights Reserved

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Processing…
  • Link para todos os PPTs do treinamento de Windows Azure:
    http://www.slideshare.net/vitorc/00-treinamento-de-windows-azure
    http://www.slideshare.net/vitorc/01-viso-geral-do-windows-azure
    http://www.slideshare.net/vitorc/02-recursos-bsicos-do-windows-azure
    http://www.slideshare.net/vitorc/03-migrando-uma-aplicao-aspnet-para-windows-azure
    http://www.slideshare.net/vitorc/04-ativando-sua-conta-no-windows-azure
    http://www.slideshare.net/vitorc/windows-azure-58-recursos-adicionais-do-windows-azure
    http://www.slideshare.net/vitorc/06-hands-on-labs
    http://www.slideshare.net/vitorc/windows-azure-78-benefcios-da-parceria-microsoft
    http://www.slideshare.net/vitorc/windows-azure-88-como-continuar-aprendendo
    Are you sure you want to
    Your message goes here
    Processing…
Post Comment
Edit your comment

Windows Azure 2/8 - Recursos básicos do Windows Azure Presentation Transcript

  • 1. http://vic.msvitorcia@microsoft.com
  • 2. var stringDeConexao ="Server=tcp:u06ud2z4qy.database.windows.net;Database=meubancodedados; UserID=vitor@u06ud2z4qy;Password=Pa$$w0rd;Trusted_Connection=False;Encrypt=True;MultipleActiveResultSets=True;";using (var conexao = new SqlConnection(stringDeConexao)){ conexao.Open(); using (var comando = conexao.CreateCommand()) { comando.CommandText = "select count(*) from TabelaX"; var resultado = comando.ExecuteScalar(); }}
  • 3. http://<conta>.blob.core.windows.net/<container>/<nomeDoBlob> Pages/ Conta Container Blob Blocks img01.jpg imagens Block/Page img02.jpg conta Block/Page videos vid1.avi
  • 4. var stringDeConexao ="DefaultEndpointsProtocol=https;AccountName=techedvc;AccountKey=iqFj1tz09TWhIqfBls++q/cSUNTsklL0Yehxx525LQQb8Cy4IvvIpdsfg+/DMcm+3NHOkA1hS0InGy2A7iug==";var nomeDoContainer = "Arquivos";var nomeDoArquivo = "Pasta1/Pasta2/MeuArquivo.txt";var contaDeStorage = CloudStorageAccount.Parse(stringDeConexao);var clienteDoBlob = contaDeStorage.CreateCloudBlobClient();var container = new CloudBlobContainer(nomeDoContainer.ToLower(),clienteDoBlob);container.CreateIfNotExist();var blobTexto = container.GetBlobReference(nomeDoArquivo.ToLower());blobTexto.UploadText("Conteudo do arquivo");
  • 5. Memória Rede Disco
  • 6. <dataCacheClients> <dataCacheClient name="default" maxConnectionsToServer="1"> <hosts> <host name="techedvc.cache.windows.net" cachePort="22233" /> </hosts> <securityProperties mode="Message"> <messageSecurityauthorizationInfo="YWNzOmh0dHBzOi8vdGVjaGVkdmMtY2FjaGUuYWNjZXNzY29udHJvbC53aW5kb3dzLm5ldC9XUkFQdjAuOS8mb3duZXImbWc1ZDUrV1dUSEV1aGlOaUhHQ1VmTHU5a2pqMmxEbC9GMXNlT1lXMVpSND0maHRcDovL3RlY2hlZHZjLmNhY2hlLndpbmRvd3MubmV0"> </messageSecurity> </securityProperties> </dataCacheClient></dataCacheClients>
  • 7. <configuration> <system.web> <sessionState mode="Custom"customProvider="DistributedSessionProvider" compressionEnabled="false"> <providers> <add name="DistributedSessionProvider"type="Microsoft.Web.DistributedCache.DistributedCacheSessionStateStoreProvider,Microsoft.Web.DistributedCache"cacheName="default" applicationName="Contoso"useBlobMode="false"/> </providers> </sessionState> </system.web></configuration>
  • 8. var cacheFactory = new DataCacheFactory();var meuCache = cacheFactory.GetDefaultCache();var chave = "DataAtual";var objetoCacheado = meuCache.Get(chave);if (objetoCacheado != null){ var valor = (DateTime)objetoCacheado;}else{ var valor = DateTime.Now.Date; meuCache.Put(chave, valor, TimeSpan.FromSeconds(15));}