WCF na Prática

No próximo sábado estarei no 3o União.NET para ministrar a palestra "WCF na Prática".

Apesar do nome da palestra, a idéia é dar uma direção para a escolha das diversas opções suportadas pelo WCF como:

  • Quando usar self-hosting vs. IIS ou WAS
  • Quando usar os bindings NamedPipes vs. TCP/IP vs. WS HTTP
  • Quando usar segurança no transporte vs. quando usar segurança na mensagem
  • Quando configurar no código vs. em arquivos de configuração

e por aí vai…

Se você já está familiarizado com a nova terminologia das certificações da Microsoft, vai ser uma palestra mais para MCPD (decisões técnicas) do que para MCTS (detalhes técnicos).

Inscreva-se em http://www.dotnetraptors.com.br/eventos/uniaodotnet3/default.aspx

Getting up to speed with Velocity

From the summary:

"Summary: “Velocity” is a distributed in-memory application cache platform for developing scalable, available, and high-performance applications…"

White paper: http://msdn.microsoft.com/en-us/library/cc645013.aspx

Blog: http://blogs.msdn.com/velocity/default.aspx

Download: http://www.microsoft.com/downloads/details.aspx?FamilyId=B24C3708-EEFF-4055-A867-19B5851E7CD2&displaylang=en

Run!

PS.: It sounds like the kind of thing that could be used by some big systems I know. I’ve heard they have implemented the cache themselves… If only they knew Microsoft was coming with this.

Studying for MCSA/MSCE

I’m a strong believer that the only way to build really good software is knowing your platform.

That’s why since from my early days of software development, I’ve made myself read at least a part of every recommended book about any topic I was interested in.

The the Internet came along and suddenly I was stroke by a tsunami of good and bad information sources.

Searching the Internet after information can be time consuming even with the aid of search engines. There’s so much information that it’s hard to know the best place to start and keep a track on your progress.

For that matter, I prefer learning through books. Since I started learning .NET, I bought more than 30 books and read at least a part of each of them. Books give you a path to follow and whenever it doesn’t give as much as detail as you’d like, you can always resort back to the Internet to gain deeper knowledge on a specific topic this time knowing what to look for.

Recently I noticed a trend in my learning patterns. Whatever problem I had that was development related, I could find something helpful in a couple of minutes because most of the time I knew what to look for.

The same has not been happening with infrastructure related stuff, though. Since I’ve been working a lot with distributed systems such as web services and web site infra-structure software, I’ve been spending more time than I would like to troubleshoot things like network connectivity and authentication issues.

For that reason, I decided sometime ago that I would start studying for the MCSA/MCSE certifications. I’m not sure I’ll pursue the whole path, but at least I’ll try to learn as much as I can about Active Directory, Network topologies, authentication and other stuff that I believe will help me do a better job developing distributed systems.

Late last month I bought MCSE Self-Paced Training Kit (Exams 70-290, 70-291, 70-293, 70-294): Microsoft® Windows Server(TM) 2003 Core Requirements, Second Edition. It hasn’t arrived yet, but after I bought it I gained access to MS Press books on Books 24 x 7 from the MVP program. The books I paid almost 150 bucks for are all there! Well at least the printed books are much more portable and I can read them while commuting to and from work.

There’s a lot of interesting books on 24 x 7. In the coming months I’ll eventually post my findings.

Good reading!

Acessando Excel Services a partir do SharePoint

Hoje eu tava revisando o código de uma Web Part usada no SharePoint que fazia alguns cálculos usando Excel Services.
Para quem ainda não sabe, o Excel Services expõe a funcionalidade de cálculo do Excel como um Web Service.
 
O projeto tinha uma Web Reference (um proxy) apontando para o Web Service do Excel.
 
O grande lance é que quando você está acessando o Excel Services a partir do SharePoint, não é preciso fazê-lo através do proxy. É possível e recomendável referenciar diretamente o assembly Microsoft.Office.Excel.Server.WebServices.dll.
Alguns dos métodos das classes do assembly têm assinatura direrente do proxy. Nos métodos com os quais tive contato, a diferença consistia do método local ter um parâmetro a mais: out Status[].
 
Como principal benefício, eu destaco o deployment mais simples, já que não é preciso lidar com a configuração do Web Service
 
Maiores informações:
 

Como obter a senha de IUSR_*

Enquanto eu tentava diagnosticar um bug de autorização no SharePoint, eu acabei modificando a conta usada pelo IIS para representar o usuário anônimo.
Quando eu fui tentar colocar a conta de volta, eu descobri que eu não tinha a senha.
Por sorte, a senha fica armazenada no metabase do IIS 6.0 e com um script simplezinho é possível obtê-lo:
 
Dim IIsObject, SiteObject
Set IIsObject = GetObject ("IIS://localhost/w3svc")

Wscript.Echo Get_IUSR_Password(IIsObject)
Wscript.Echo Get_IWAM_Password(IIsObject)

Function Get_IUSR_Password(IIsObject)
  on error resume Next
  Dim Out
  Out = Out & vbCrLf & "<br>AnonymousUserName = " & IIsObject.Get("AnonymousUserName")
  Out = Out & vbCrLf & "<br>AnonymousUserPass = " & IIsObject.Get("AnonymousUserPass")
  If err=0 Then Out =  vbCrLf & "<br>Path:" & IIsObject.AdsPath & Out 
  Get_IUSR_Password = Out
End Function

Function Get_IWAM_Password(IIsObject)
  on error resume Next
  Dim Out
  Out = Out & vbCrLf & "<br>WAMUserName = " & IIsObject.Get("WAMUserName")
  Out = Out & vbCrLf & "<br>WAMUserPass = " & IIsObject.Get("WAMUserPass")
  If err=0 Then Out =  vbCrLf & "<br>Path:" & IIsObject.AdsPath & Out 
 
  Get_IWAM_Password = Out
End Function

 
Eu soube que tem scripts por aí que setam a bagaça, mas como este aqui resolveu o meu problema, eu nem procurei mais.
 

SharePoint’s disposing problems

After returning from the MVP Summit I joined Microsoft Consulting Services as part of the Green Badge program (vendor).
On my first "real" project here, I had my first experience with Windows SharePoint Services 3.0.
I’m in charge of reviewing part of the code written by a customer’s developers for best practices in general and performance in particular.
 
One thing that you should be carefull with is disposing the objects which implement IDisposable.
That is specially important with a couple of SharePoint’s classes since they reference unmanaged COM components.
The problem is that (in my opinion) the SharePoint developers didn’t do a very good job of implementing the Disposable pattern.
 
There are tons of links out there pointing to problems and workarounds for them. Here’s a sample:
 
What makes the case even worse is the fact that:
  • Depending on how you got a reference to an object you should dispose it or not. SPSite should be disposed if you constructed it (new SPSite()). But you should NOT dispose it if you got it from SPControl.GetContextSite().
  • Several classes don’t dispose of there containing Disposable objects. SPSite.RootWeb for instance.
I’ll eventually blog more about these issues if I get allocated in more SharePoint projects.

Dança do Sirí na terra do King’s Crab

O MVP Summit é a chance de MVPs de todo o mundo interagirem entre si mesmos e os times de produto lá em Redmond.

Mas nem só de conteúdo técnico vivem os MVPs. Na terra do King’s Crab, é claro que tinha que ter algum prezepeiro para dançar a dança do sirí – ou como se diz por lá "Crab’s Dance" 🙂

MVP Summit

Na semana passada eu participei do meu primeiro MVP Summit que acontece de tempos em tempos em Seattle e Redmond, WA, USA.

Foi uma boa oportunidade de provar o King’s Crab (pata de carangueijo/siri gigante)…

 

… reunir a galera …

 

… fazer novos amigos …

 

Tinha até umas gatinhas lá…

 

Como não poderia deixar de ser, até rolou a dança do Crew!

 

 

Estas e mais um monte de fotos em http://alfredmyers.spaces.live.com/photos/cns!19D601BD22E34F6E!697/

 

PS.: O The Spoke está fora do ar novamente. Acho que vou voltar a postar algumas coisas em português aqui.