Today I tried to to RDC(Remote Desktop Connection) to a remote computer (of course) and I got a nasty error basically saying that I need to restart the machine in order to connect to it :) So I searched the web for a bit, connected to another computer in same LAN, shot the command and waited for about 5 minutes and… voila. I was able to connect.
So what is the command?! shutdown, of course :)
shutdown -m //computername -r -f
-s shutdown
-r restart
-f force close any applications
//computername or ip
A friend of mine send me link to article in Wikipedia describing Cross-site request forgery attack.
Cross-site request forgery, also known as one-click attack or session riding and abbreviated as CSRF ("sea-surf"[1]) or XSRF, is a type of malicious exploit of a website whereby unauthorized commands are transmitted from a user that the website trusts.[2] Unlike cross-site scripting (XSS), which exploits the trust a user has for a particular site, CSRF exploits the trust that a site has in a user's browser.
(source Wikipedia)
This is how the attack is performed:
<img src="http://bank.example/withdraw?account=bob&amount=1000000&for=mallory">
Note how simple this would be?! And end user won’t see anything – not even image :).
This illustrates why is so important when implementing REST in your services to do only read on GET requests.
This is how close will become C# and VB in next release:
C# 4.0 | Visual Basic "10" |
Named/Optional Parameters | Named/Optional Parameters |
Dynamic Scoping | Dynamic Scoping |
Statement Lambdas | Statement Lambdas |
Multiline Lambdas | Multiline Lambdas |
Auto-Implemented Properties | Auto-Implemented Properties |
Collection Initializers | Collection Initializers |
Generic Variance | Generic Variance |
Extension Properties | Extension Properties |
The items in white-bold are new features…
(Source: PPTX from VS2010 and .NET Framework 4.0 Training Kit)
This is what we currently have in .NET 3.5 SP1
And this is what will be included in .NET 4.0
(Source: PPTX from VS2010 and .NET Framework 4.0 Training Kit)
MSBuild is very powerful language for automating build process but as every computer thing it could be confusing.
So for a start this should work as Visual Studio solution files (*.sln/*.proj) files are valid MSBuild files:
MSBuild MySolution.sln
So for more script-like example this can show how complex solution with Web Application project can be build and files (result of publish operation) copied to drop location.
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" xmlns=http://schemas.microsoft.com/developer/msbuild/2003
ToolsVersion="3.5">
<PropertyGroup>
<OutputFiles>.\OutputFiles\</OutputFiles>
<ReleseFolder>D:\WcfFileTransfer\Release\</ReleseFolder>
<PrecompiledWeb>$(OutputFiles)_PublishedWebsites\WebHostApp\</PrecompiledWeb>
</PropertyGroup>
<Target Name="Clean">
<Exec Command="MSBuild.exe WcfFileTransfer.sln /t:Clean" />
</Target>
<Target Name="Build">
<Exec Command="MSBuild.exe WcfFileTransfer.sln /t:Rebuild /p:Configuration=Release
/p:OutDir=..\$(OutputFiles)" ContinueOnError="False" />
<ItemGroup>
<!--include needed files-->
<WebFiles Include="$(PrecompiledWeb)**\*.*"
Exclude="$(PrecompiledWeb)**\developer.config;$(PrecompiledWeb)**\HOWTO*.*"/>
</ItemGroup>
<!--show message-->
<Message Text="Copying to Deployment Dir:@(WebFiles) to $(ReleseFolder) :" />
<!--perform recursive copy-->
<Copy
SourceFiles="@(WebFiles)"
DestinationFiles="@(WebFiles->'$(ReleseFolder)\%(RecursiveDir)\%(Filename)%(Extension)')" />
</Target>
</Project>
This script is executed from Visual Studio Command Prompt like this
MSBuild build.proj
For more information about MSBuild you can take a look at MSDN reference page or Channel9 Wiki:
Or the MSBuild: By Example tutorial:
- Introducing Well-Known Metadata
- Formatting Your Output
- Editing MSBuild Files with IntelliSense
- Integrating MSBuild into Visual Studio
- Introducing Custom Metadata
- Understanding the Difference Between @ and %
- Using Environment Variables in Your Project
- Reusing MSBuild Project Elements
- Dealing with MSBuild Errors
I hope this is good as a start.
After being quite busy for last 4 months it is a time to ramp up with new cool technologies that are on the product line.
So while installing VS 2010 it is a good reading to find out what to do once it is done:
And of course get some free time – a night or two should be enough :) should be enough for starting…
What is it if not the future :)
This could solve the biggest two issues for cell phones and mobile computers – keyboard and screen size