Entity Framework with My SQL inside asp.net mvc [duplicate] - asp.net

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.

Related

Finding running .NET version on IIS apps

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

ODP.NET driver does not show up in Data Source dialog (no Client)

I installed Oracle Data Provider for .NET via NuGet as explained in the tutorial. Now, the tutorial expressly states at stage 8 that:
Note: You will see that ODP.NET and Entity Framework configuration
information has been added to the project. Managed ODP.NET does not
require any Oracle Client installation.
Indeed, I did not install the Oracle Client. However, when I try to use the Entity Data Model Wizard in VS2013 or VS2015 the Managed Driver does not show up - see VS screenshot.
How do I get the Wizard to show the Managed Driver? Must I install ODTwithODAC or is there a way to avoid it?
Is it possible to use Entity Framework ("EF Designer from Database") without using the Wizard?

Unable to find the requested .Net Framework Data Provider. It may not be installed

We are getting this error when updating site on new server. We are using mysql with asp.net project in visual studio 2010.
Unable to find the requested .Net Framework Data Provider. It may not be installed
Thanks.
The MySql provider specified in your connection string is not installed on the server. Install it. It'll be whatever is installed on your development machine.
For a better answer, please post the part of your connection string that shows which provider/version to use.

When is ASP.Net 4 available on a server

i was building a new small website for an existing client, and thought about building it with ASP.Net 4.
But in the apppoolsettings, i could only choose framework 2.0, so i guessed that 4.0 is not available on the server.
Is it something i have to install on the server, or will it be installed via windows update somewhere in time?
it's a win2008 standard server.
You can certainly download and install it yourself, e.g. from here. You want the full .NET 4, not the .NET 4 client profile - that doesn't include ASP.NET.
According to this blog it will eventually become an optional update on Windows servers (if it isn't already).
you just need to install .net framework 4.0 on server.

Do a Windows application ifself contain the .NET framework?

I have a Windows application which contain a deployer.
Does the deployer itself contain a copy of the .NET framework?
Or do we have to explicitily install it?
When I check in the solution explorer, it shows the .NET framework under the deployer project under detected dependencies?
My Windows application connects to the Internet to validate for a registered user. Do I need to configure some port (or something like that) while I am installing it? Also how do I check which port my application uses to connect to the Internet?
Regarding #1, just as Xstahef said, you need to prerequisite the .NET framework.
You could put the .NET redistributable in your installer, and if you detect that the .NET runtime is not installed then prompt the user to run and install the .NET distributable contained in your installer (that's what we did some time ago, InstallShield provided this functionality for us). But this may not be recommendable: the .NET runtime has grown a lot in size (depending of the version you need to have in your client's machine), and many customers (at least the educated customers) won't trust installing the runtime from your installer. Besides, you may need to check with the legal department in your company before including a third-party component in your installation.
It depends on your deploy project (Visual Studio, InstallShield?). But commonly, you need to force the .NET installation (prerequisite option). By default, .NET is not contained in the deployment projects.
Here, it depends on the way you want to connect the Internet.
.NET runs in a VM, so you would need to require the framework be installed in order to actually run it. Much like you need to have Flash or Java for those respective mediums. Microsoft has redistributable packages for the .NET framework. So you could probably incorporate them into your installer. If you're targeting 1.1 or 2.0 most people probably won't need it.
So long as you are not trying to get in to the client machine then you shouldn't need anything special like UPnP to [attempt to] open a port if they are behind a NAT router.
Xenocode does allow to running such an application on an absolutely clean PC.

Resources