I am currently working on a website being hosted on a server using IIS to manage the applications on it. I want to use a powershell script to find out what version of .NET each app is currently running. I have been trying to use the Web Admin module to find the .NET version but am struggling to find it.
Thanks
very simple
reg query "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\NET Framework Setup\NDP\v4\full" /v version
then you will get this
version REG_SZ 4.7.02556
Related
I'm porting some code to Asp.Net Core 3 and would like a way to tell which version of IIS the system is running under or even if it is running via IIS, say verses Nginx.
An identical replacement for HttpRuntime.IISVersion isn't necessary but it would be nice to get some diagnostic info about what web server the site is running on and what version of the webserver it is.
Is there any way to do this in Asp.Net Core 3?
Thank you for the help in advance.
I'm used to developing asp.net web projects in visual studio for windows. With the new asp.net open source, I'm trying to develop on my mac. I already set my development environment and run the boilerplate. My question now is, can I import a traditional project developed in vs and in some way adapt to run and continue developing in Vscode and dmx?
Yes... So long as it's based on .Net Core.
.Net Framework 4.5, 4.7 etc is most definitely not cross platform and requires Windows and, more often than not, IIS to run.
So I suppose the real answer is, it depends.
I am currently in process of identifying a mechanism to deploy ASP.NET websites to Linux server. I know this requires Apache to be installed on Linux, and can be achieved using Mono.
I found a lot many articles but they all are referring to ASP.NET version 5 (i believe, vNext). But couldn't find anything for a version prior to that.
Is it due to "System.Web" assembly that we can't deploy ASP.NET website on anything except IIS? I know, OWIN has replaced that in vNext.
Any help on deployment of previous versions of ASP.NET to Linux will be very appreciated.
The new version of ASP.NET, version 5, and more specifically the .NET Core, runs cross-platform. That's why there is a lot of information about running ASP.NET 5 (or vNext) on Linux with Kestrel, the new cross platform webserver for ASP.NET 5.
However, you can run older ASP.NET projects on Apache using, indeed, Mono. The official documentation can be found here: http://www.mono-project.com/docs/web/aspnet/#aspnet-hosting-with-apache and here: http://www.mono-project.com/docs/web/mod_mono/
This question already has answers here:
Using MySQL with Entity Framework [closed]
(10 answers)
Closed 8 years ago.
Iam developing an asp.net mvc web application, and I have a commercial system which i want to connect to its MySQL database. so i decide to use the entity framework inside an asp.net mvc web application.
but when i tired to create a new connection i can not find an option to connect to the MySQL server, as shown below:-
So is there an option to connect to MSQL server instead of SQL server?
Install MySQL Connector for .NET, restart your Visual Studio and try again.
UPDATE:
Sometimes installing the Connector is not enough for Visual Studio integration. see https://stackoverflow.com/a/4257203 for solution.
It better to user Nuget and install MySql.Data from there than install .NET connector. First of all use of connector will cause the situation that you need to install connector to your server environment. Also, if tomorrow you will install new version of connector locally you should reinstall it on server also (you cannot have 2 versions of connector to be installed on same machine, so web applications that user older version will stop working).
All you need to do it's use Nuget Packet manager, search for MySQL.Data and install it. Also (i dont remember its by default done) you should go to property of this reference in solution and set it to always copy locally. That's it, all should work.
[Update]
Also, to navigate in mysql is better to use native mysql tools, like MySQL Workbench. It has much more possebility
You may need to use the MySQL Installer for Windows:
http://dev.mysql.com/tech-resources/articles/mysql-installer-for-windows.html
I read somewhere that it's the only way to get VS support now.
I have a project that needs to be done using ASP.NET. Currently, I'm using a Linux box and don't have an access to Windows so I was wondering about doing the development in Mono.Net for the meanwhile. The final project needs to be completed on the Microsoft.NET.
How easy would it be to port a Mono.NET application to a Microsoft.NET? Or should I just wait till I get the windows machine? I don't mind an occasional challenge but not if it's going to be a big pain.
It should work fine just make sure you use the Microsoft .NET APIs only or keep track of any Mono or other opensource DLLs and include them when you run on Windows.
MonoDevelop could also help as it creates Visual Studio compatible project files which can help your migration if you want to later migrate to Visual Studio also.