Click here to Skip to main content
15,902,032 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
I wrote the code to find which version of .net framework using in client machine but my problem is if they dont have approriate version my application install automatically current version of .Netframe work, which is held on my application.

What I have tried:

I wrote the code to find which version of .net framework using in client machine but my problem is if they dont have approriate version my application install automatically current version of .Netframe work, which is held on my application.
Posted
Updated 7-Jun-16 19:46pm

1 solution

In general case, this is not a problem: just execute .MSI using System.Diagnostics.Process.Start. Only it makes little to no sense; such installations, if required are done by the users, or by the installers of some products which require .NET Framework. There are some installations toolkit based on .NET code (I know just one product of this sort), but this is a different story, still in the framework of an installation toolkit.

But your question is marked as "ASP.NET". No for a Web application, installing anything on the client system is 1) impossible through any legitimate ways, 2) never needed, 3) makes no sense.

It is impossible, because the Web application or site has no access to the client systems, by quite obvious security reasons. It is even "more impossible" "through the C# coding", because, with ASP.NET, C# operates purely on the server side. And the server side doesn't even really "know" what is there on the client side. Some information on the OS can be reported by the browser, but it means next to nothing in practice.

It is never needed, because all client-side operation of a Web application/site is played inside browser. It a browser works, it works as it does; its operation cannot be changed by installation of .NET. (I mean pure ASP.NET application, without such things as Silverlight, which really requires installation, but this is a whole different story.)

And, finally, it makes no sense, because the client system can be the OS where the .NET cannot be installed at all. Even if on some the alternative CLR can be installed, such as Mono, the state of affairs remains the same: it makes no sense at all.

—SA
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900