In ASP.NET6 beta8, Helios (IIS native host) has been removed. Instead you can use Kestrel host and configure IIS server to talk to the host. This hosting model should be very familiar with people using ASP.NET 6 on Linux as they may have already been using this hosting model from previous betas. I won’t write much about the hosting model as Damian Edwards already has a detailed post on that here: https://github.com/aspnet/Announcements/issues/69
However, I will describe some change that everyone that are using Helios on Windows would have to make to their beta7 projects.
Read More
Author: nguyenquyhy
CompositeTransform3D in Windows 10
I believe this has been mentioned in several blog posts (such as this one), but I missed one important part, and it took me almost an hour to figure out why my CompositeTransform3D does not give a nice 3D effect but only a “scaling” effect.
Turn out I need to have to put a PerspectiveTransform3D in the container of the element with CompositeTransform3D.
1 2 3 4 5 6 7 8 9 10 11 |
<Grid> <Grid.Transform3D> <PerspectiveTransform3D /> </Grid.Transform3D> <Grid Width="100" Height="100"> <Grid.Transform3D> <CompositeTransform3D CenterX="50" CenterZ="-50" RotationY="45" /> </Grid.Transform3D> <Rectangle Fill="Red" /> </Grid> </Grid> |
How to prepare a HTML email for your web application
As many of my other posts in this blog, this will be a note-to-self, collecting all the tidbits that I have learned in preparing a HTML email that would show properly (or as expected) in major email clients during the development of my latest application.
Below is a short list of my suggestions.
- Use <table> and nested <table> instead of <div> for your layout
- Don’t create table cells with the height of 1px
- Don’t use <tr> to create top/bottom padding
- Don’t use <p>
- Use a <tr> for each paragraph
- Don’t rely on page level CSS
- Don’t try to put fancy styles in <a>
- Be careful when putting URLs in the email content
- Test as much as possible
There any many excellent articles on the same topic. I will try to collect them here in the future when I have more free time. In the mean time, if you know any good article, or have better solutions than what I have suggested, please feel free to comment below.
Read More
Posting raw JSON string with jQuery
If you are using jQuery’s ajax function to post raw JSON string to your APIs, you might get some problem when your API does not receive the correct content, or in the case of ASP.NET Web API and parameter binding, you may get null input parameters in your controller.
The JavaScript can be as simple as this.
1 2 3 4 5 6 |
$.ajax('/api/test', { type: 'post', data: 'inputparameter', dataType: 'json', success: function(data) { alert('Receive: ' + data); } }); |
And the post action of the Test API controller be something like below.
1 2 3 4 |
public string Post([FromBody]string input) { return input; } |
The post action will not get “inputparameter” as the value of variable input; instead we get a null value.
Read More
Kinect on Windows v2 keeps restarting
I have been playing with the Kinect for Windows v2 for a while, but I met a strange problem in the recent months: the Kinect kept restarting after 5 or 6 seconds. The RBG and depth channel looked fine in the Kinect Studio and Kinect Evolution, but the video stream kept running for 5-6 seconds then hung for 1-2 seconds (i.e. no new frame was received and the connection from the Kinect was actually lost). I have tried to reinstall the driver and SDK several times without much lucks. I though that it might be a problem with my Kinect, so I left it there until I can test with another Kinect.
Yesterday I tried to search for that problem on the Internet and found that several people also got the same issue. Someone on Microsoft’s forum suggested to disable Kinect audio and some other suggested to enable the audio device, so I decided to give it another try. It turned out that I have disabled Kinect Microphone Array. Re-enabling it fixed the strange problem.
It is a weird issue and does not seems to happen on older driver, and it is unfortunate that Kinect Studio could not give a better error message. I really hope that Microsoft would address that in a later version of driver and SDK, although I doubt that they will do that anytime soon.