Monday, May 13, 2013

How to change the account which SSRS Report Manager Web application runs under

After changing the selected account in both application pool and the rsreportserver.config file, you must force IIS to use NTLM as your authentication mechanism if you want to use Integrated Windows authentication only. To do this, follow these steps on the server that is running IIS:
  1. Start a command prompt. 
  2. Locate and then change to the directory that contains the Adsutil.vbs file. By default, this directory is C:\Inetpub\Adminscripts.
  3. Type the following command, and then press ENTER:
  4. cscript adsutil.vbs set w3svc/NTAuthenticationProviders "NTLM"
  5. To verify that the NtAuthenticationProviders metabase property is set to NTLM, type the following command, and then press ENTER:
  6. cscript adsutil.vbs get w3svc/NTAuthenticationProvider
The following text should be returned:
NTAuthenticationProviders       : (STRING) "NTLM"

DevExpress WPF Grid - NewRowItem is Evil!

If you need any kind of custom validation or special cross-column logic when you enter a new data (new row) in DevExpress.
I recommend to not use the out of the box DevExpress GridControl NewItemRow feature. It is evil!

  


My recommendation is to implement your own new row detail in a separate section.

Reason ? 

The row uses multiple mocked bound object through it's life time. Managing state changes is almost impossible.

If your data source is simple then it might work out. But once you need state inside your row, this feature fails.

For example, try adding custom columns with drop down boxes. Now add some custom logic to filter those drop down based on the object's state.
This is where the NewRowItem gets confused. Everytime you click on it, it will create a mock object at first, to bind the drop down boxes to it. Then when you select the first value -from any drop down- it'll recreate the object, and this time trigger the ColumnView.InitNewRow event.

Monday, May 6, 2013

How to diagnose a freezing Visual Studio plug-in

 What the hell are you doing Visual Studioooooooo!!!!!

Is a phrase I hear many times a week if not daily. If you are a .Net developer I am sure that you've been there.
As a developer, who write multithreaded apps, and made a blood pact to not create one that freezes, there is nothing worse than a continuous freezing -Visual Studio- development environment. 

Well, I have good news and some more good news. Whether you are using Visual Studio 2010 (VS2010) or Visual Studio 2012 (VS2012), there is a way to hunt the cause and disable it. You will need: 
  • NuGet: I am sure you already have it, if you don't. There is work around.
  • Component Diagnostics - another plug-in available through NuGet or at Visual Studio Gallery This plugin was developed by Paul Harrington. A great innovation, yet under exposed.

Diagnosing the problem 

If you just started facing the problem out of the blue, and you have a decent computer specs. It's possible that some plug-in updated itself, and like every software. It's possible to have bugs, especially with today's rapid agile releases. Performance testing is rarely ever implemented, again especially with free plugins. 

First, verify that its a plug-in. Use the DevEnv.exe /SafeMode argument

If your experience suddenly becomes better and no more freezing, then it's definitely a plug-in

Second, find the trouble making plug-in 

So what is making your VS environment freeze? using the above mentioned plug-in

go to the new Component Diagnostics tool window ==> Package Manager Tab
scrolling down the list, I search for the plug in that took the most time to load. One stands out VSCommandPackage with it's 10K microseconds AutoLoad time. 
10 seconds might not sound like a long time, but add to it to all the other packages Avg 0.5~2 second and it you start to feel it, everytime you open a solution. Possibly every time you open a file or even build.

How to fix it ?

Going back to NuGet, simply disable it and try the impact. Reopen VS. Open solutions, Menues and files, build.