Can we write independent of machine(i.e. independent of OS) code in asp.net?
As i have read MSIL manages the code to make it independent of machine;but i have also read that DOT NET just provide window开发者_如何学JAVAs independence not Plateform. Please Explain if
Theoretically and technically .NET provides platform independence. Practically there are no implementations from Microsoft of .NET outside Windows for obvious reasons. There is Mono for other platforms that is mostly compatible but you need to check if the part of the framework you are using is supported on Mono. Most of ASP.NET is supported.
You can use Mono on Linux and Macintosh
For Mono compatibility, look here: http://www.mono-project.com/Compatibility
Answer is 50:50. IL code is equivalent to Java byte code. Byte code is understood by JVM whereas IL code is understood by CLR. At present there are JVM versions available for almost every OS, almost every processor architecture and what not. However this is not the case for CLR. Microsoft version of CLR is exclusively available for Windows only. Hence you are "virtually" tied up to platform.
Flip side of story is that Mono is another version of CLR which is being backed by Novell and it is capable of running Windows Forms application as well as ASP.Net application. But their version is usually 1 version behind MS version. HTH
精彩评论