Monthly Archives: April 2009

The never shrinking transaction log

I keep forgetting how to force the transaction log in SQL Server to shrink, so I’m posting here primarily so I know where to find the how to :). Often the log does not shrink when you try to shrink from SQL Managent Studio. The solution, before you shrink the database do:


Thanks to Pinal Dave for this one (see his post SQL SERVER – Shrinking Truncate Log File – Log Full)

SQL Server error with ASP.NET Membership pointing to the local server

We have an ASP.NET application that we normally run under Forms Authentication using the ASP.NET Membership API. For a particular client we changed this to using Windows Authentication instead. On the production environment, we were running into the following exception:

A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessible. Verify that the instance name is correct and that SQL Server is configured to allow remote connections. (provider: SQL Network Interfaces, error: 26 – Error Locating Server/Instance Specified)

We checked all the connection strings the app uses… all good. Finally, we figured out what was wrong. We had removed the Membership section from web.config so it was going back to the default in machine.config. That setting uses the LocalSqlServer connection string, which we don’t use. However, in the default machine.config, this points to the App_Data folder using SQL Server Express. In most environments, this wouldn’t be an issue immediately, because SQL Server Express would just create the  aspnet database and use that. However, in a hardened environment SQL Server Express is either not there (our case) or has no rights to create the App_Data folder and/or place create a new database. ASP.NET doesn’t know this… it just can’t access the SQL Server instance it is looking for, hence the above exception.

Speaking at VSLive, Las Vegas, June 8

I’m delighted to be speaking again at VSLive in June. This time at the Venetian hotel in Las Vegas. I’ll being doing two sessions on Monday, June 8:

  • Understanding Transactions in WCF, which deals with why, how, and when to use transactions in WCF.

  • Advanced Access Control with WCF, which deals with claims based authorization and the Geneva Framework.

Over lunch I will be available for 1-on-1 Q&A, but if you run into me at other times outside my sessions I’m open for questions too.

Checkout the full conference agenda for all the great sessions and speakers at VSLive, Las Vegas. I can really recommend going there, because the sessions are great and the speakers very accessible. I also think the Venetian will be a great venue (I have never stayed at the Venetian, but I have been inside and it is definitly something to see).

7x MVP

Thanks to Microsoft for my new MVP Award. It is nice to get the recognition. A thank you is in order to the people that enable me to do the work that got me the award, starting with my wife Annette and my children Jarod and B’Elanna. They have a workaholic for a husband/dad, but don’t complain about it (much). Others that receive a thank you are my partners at BataviaLabs who give me the freedom to write and speak at conferences, our team at BataviaLabs that help me code all my wild ideas, and the people that publish my articles and invite me to speak at their conference.

SDE Slides & Samples – Geavanceerde UI Technieken voor SharePoint

Iedereen die mijn sessie bezocht heeft tijdens de SDE van 30 maart bedankt voor het luisteren. Hieronder vind je links naar de slides en voorbeeldcode.

Geavanceerde UI Technieken voor SharePoint Slides (126.2 KB) | Samples (447.66 KB)

De voorbeeldcode bevat ook een installer om de WebParts uit te rollen. Je moet wel even uploadskinfeature.bat aanpassen om naar de juiste server te wijzen.