Category: "Announcements [B]"
Error 255 after I installed Visual Studio 2015
This week, I installed Visual Studio 2015 in my laptop. Then all of websites I build which is running .Net Framework 4.5 or 4.5.x are not working. They got .net framework error Error 255 and it cannot execute vbc.exe. I did a lot of research. There are a lot of people wrote about this error is about App Pool Identity. They are right in the past, I found out if you have .net framework 4.5 an 4.6, this error is caused by some security patched, 3098779 and 3097997. If you uninstall these two patches, then you will be fine again.
Code Visual Studio (Preview)
Last night, I went to the .Net User Group in Brisbane. The speaker introduced the new product from Microsoft, Code. That is a visual studio style code editor. Well, that is not very impressive at all.
You are not right, that is an very interesting product. It can run in OSX,Linux and WIndows. It provides a tool to work on interface codes outside from Windows. It made my life easier, I can do all js and shtml in OSX and leave only a bit little c# code which I can do in visual studio in windows VM.
Although it is a code editor, it still has some debugging features, it can debug node and mono application.
Lastly, even you only require to use Windows, that is still good to try this. This is without all heavy weighted features from Visual Studio. It load up so quick and less chances to break! That is very cool to use!
Preview Visual Studio 2015
Yesterday, I fired a Virtual Machine with Visual Studio 2015 RC. This is the best way to try out this. Unless you need to download the installation files and install them. I think it requires about an hour, firing a VM is only about 3 minutes.
I tried it for a little while, that is not bad at all. The major improvements are in mobile app development, it has a better integration with xamarin. However, you still need to download xamarin.
Refresh Datagrid in WPF
There is no such things for DataGrid.DataBinding() in Datagrid, WPF, the data grid should update itself if any items in the collection is changed. However, I found if the data source is edited by other windows, it won't refresh the data grid.
Well, you can use DataGrid.Items.Refresh(), but sometime, I got an exception about not allow editItem, something like that.
I found the best way is setting the item source to null and set item source to be bounded the collection again, like this:
Code
public void DisplayList(IList< ISchedule> lst) | |
{ | |
lstItems.ItemsSource = null; | |
lstItems.ItemsSource = lst; | |
//lstItems.Items.Refresh(); | |
} |
Error: Specified key is not a valid size for this algorithm. (TripleDES)
I built a Cryptography application by using TripleDES. But I got an error:
System.Security.Cryptography.CryptographicException: Specified key is not a valid size for this algorithm.
The key I used was in an incorrect length, it should 16 bytes length.
For example:
Code
PasswordDeriveBytes pwd = new PasswordDeriveBytes("password", salt); | |
TripleDES alg = TripleDES.Create(); | |
| |
alg.Key = pwd.GetBytes(16); | |
alg.IV = new byte[alg.BlockSize / 8];; |