Perfil de PaulioIT BytesBlogListasScraps Ferramentas Ajuda

Blog


24 de novembro

Missing SQL 2005 performance counters

My .net code kept complaining about uninitialized counters whenever it tried to access SQL Server, 'The requested Performance Counter is not a custom counter, it has to be initialized as ReadOnly'. I opened Performance Monitor and sure enough the SQL counters had vanished. Now I'm not sure why that is, I did have some trouble with a recent service pack to Analysis Services so I'm guessing that's what struck. With a bit of fishing around I managed to discover how to recover the counters;
 
Program Files\Microsoft SQL Server\MSSQL.1\MSSQL\Binn>lodctr perf-SQL2005sqlctr.ini
 
22 de novembro

Changing the source of an Image

Sometimes the things you think should be simple can cause you problems in Silverlight. I had a simple Image control on my page and I wanted to change its source depending upon a user selection. So I started with the obvious, myImage.Source = "newImage.jpg" only to be faced with "Cannot implicitly convert type 'string' to 'System.Windows.Media.ImageSource'. Ok fine I'll create a Uri. myImage.Source = new Uri("newImage", UriKind.Relative) Same problem. Hmm, ok so I'll go via a Bitmap Image; myImage.Source = new BitmapImage(new Uri("newImage.jpg", UriKind.Relative)) but now I got an error on the page (in the JavaScript error panel). Grr. Well this time it was where the image was that was causing the problem. I'd put the images in a folder on the hosting site that was a peer to ClientBin and used a relative path, so rather than "newImage.jpg" I was actually using "../Images/newImage.jpg". Turns out it doesn't like that one little bit. Assuming this was a security thing I put the Images folder under the ClientBin folder and that did the trick.
 
21 de novembro

Installing SQL 2005 on Vista

When you install SQL Server on Vista none of your accounts are added to sys admin role, so you may find it difficult to connect the database server! To get around this problem you should run the SQL Provisioning tool;
 
"%ProgramFiles%\Microsoft SQL Server\90\Shared\sqlprov.exe"
 
 
 
16 de novembro

Easy way to redirect ASP.NET trace to Visual Studio Output Window

The ASP.NET trace information can be very useful, however there are cases when you don't want (or can't - partial rendering) have the trace information rendered on the page. However, all is not lost, you can redirect the information to VS' output window by changing (or adding) the web.config trace element with writeToDiagnosticsTrace, e.g...
<trace writeToDiagnosticsTrace="true" enabled="true" pageOutput="false" requestLimit="20" />
 
08 de novembro

Goodies from Remix UK

Finally managed to get the download subscription from Remix working, only about a month late! However, getting the correct subscription information was only the first hurdle. Once armed with the information to subscribe to the american site (where the downloads live) I hurried to the download only to discover that although the keys were now ready the download was greyed out. Turns out that it doesn't like Firefox on the Mac (MS sites can really be bad examples of how to write web sites, especially ironic given this is the Expression site). So fired up Vista and tried again. Hurray the download was ready so clicked it....
---------------------------
VBScript: Microsoft File Transfer Manager
---------------------------
There was an error launching File Transfer Manager.
 
If you are running Windows XP with Service Pack 2 or Windows Server 2003 with Service Pack 1,
this installation may have been blocked.  If the gold IE Information Bar is present above, please
click the bar and select the option to 'Install ActiveX'.
 
For additional assistance, please visit the web site https://transfers.ds.microsoft.com,
or contact your help provider.
---------------------------
OK  
---------------------------
Erm ok, played around with the IE settings and no joy. Went the link in the message, 'bad page'. Oh wonderful, I can see this is a really great example of a web site. To be fair there is some info about this in the FAQ page, although I found the easiest solution was to go and download the msi for File Transfer Manager. Once installed things started to work. So I've now finally managed to download a disk full of iso images and a Vista iso mounting driver from http://www.slysoft.com/en/download.html
 
Begin Rant
It appears that Microsoft are trying to learn from Apple, that really was a very painful dowload experience similar to the farce of downloading DRM material from iTunes. But don't worry because we're soon going to be putting all our life into the cloud...<gulp>
End Rant