I have successfully created a ASP.NET MVC 4 Web application and now I want to deploy it on a test environment. The target server is not an Azure server, but it is a Windows Server 2008 R2 Server with IIS installed in it.
Now I have published my solution using Visual Studio 2013 Professional, everything works fine excepts the Database. It's a Mysql Database that works perfectly with Entity Framework 5 (I have added the Mysql provider, mysql.data.entity.dll , mysql.data.dll on my web project and all the configuration to make it run locally). Once I publish the project, it is deployed on IIS but it doesn't retrieve data from my Mysql Database. I want to notice also that in the Publish wizard, although I specified the connection string, it says that
there is no Database detected
It should display the name of my context instead of that. Would you please help me know why the publishing wizard doesn't recognize my Mysql Database? thank you for your help !
I was able to use Asp.net MVC with MySql using Entity Framework code first, like the one explained here http://www.asp.net/identity/overview/getting-started/aspnet-identity-using-mysql-storage-with-an-entityframework-mysql-provider ... Here a couple the things I notice:
The generated migration contains the schema dbo. that won't work on MySql so I went to the migration file and remove all schema references. (there are better solutions, like configuration/setup wise)
The unique key length problem, such as UserName (defined in the asp.net Identity) has a maximum length of 256 and that is over the limitations of mysql unique field, so I changed the length to 128. that solved this error
Specified key was too long; max key length is 767 bytes
I did have some troubles using the publishing wizard, since didn't show me any of my MySql Drivers to test my connection to my db, so I just change the Connection string in the config file and apply my migration changes to the new/testing DB from the Package Manager Console > Update-Database (this could be your temporary solution until you find a automatized solution)
Related
I have an ASP.NET 5 Web API application which I have deployed on docker. It connects to a MySql instance, also on docker. I am using Entity Framework 6 to connect to the MySql database. I have not referenced Entity Framework directly, but am using the MySql.Data.Entity package which internally uses Entity Framework 6.
When I invoke the API, I get this error:
Unable to determine the provider name for provider factory of type 'MySql.Data.MySqlClient.MySqlClientFactory'
Outside docker, i.e., on my windows machine, in Visual Studio 2015, I point my web API to the MySql instance on docker, and I can connect just fine. Inside docker, I get the error mentioned above.
What could be wrong?
The provider name is not being passed. Prior to ASP.NET 5 the provider value could be set alongside connectionString in in the web.config. This is no longer the case, as the connection string is just a string value in a json file with no extra properties.
You need to set it programatically. Here's an example, notably this part;
SetProviderServices("MySql.Data.MySqlClient", new MySqlProviderServices());
I'm not an expert on ASP.NET, but doesn't your question translate to:
If I run ASP.NET on Windows everything works fine, if I run it on
Linux I get an exception.
?
I don't think this is a Docker issue and would rather investigate about issues / driver needs the Entity Framework has on Mono.
I have been using MySQL for years and have decided that for a new project I'd like to use something newer liker Volt DB.
I have read all the documentation on the Volt DB website and although it mentions a web client for viewing the structure it doesn't say if there is a way of viewing data live in the database.
Hoping for a web based client like phpMyAdmin or maybe a desktop client like Navicat (Windows) / Sequal (OSX).
VoltDB includes a web interface called Web Studio on port 8080 by default, that provides a SQL interface with tabular result formatting. You could use this to select, insert, update, or delete records through SQL statements or by calling stored procedures.
You can also connect to VoltDB using desktop tools that can connect using the JDBC driver, such as SQuirreL. We are working on an ODBC driver in the next few months that will enable a wider choice of desktop tools to connect.
I am trying to design a database application for my small business. I've created a number of form driven MS Access databases for use before but would like to create a permanent solution in something more advanced & common.
I was thinking of using mySQL for the database and would then program a C# or VB application to be used in Windows. I do not want or need a web based version at this time but the migration to VB.net in the far future may be something I'll look into.
I know I can use a MS Access backend for my windows application without having to install MS Office on any or all the computers the program will be run for.
But here is my question. Is it necessary to install mySQL Server on the PC hosting the database, on all the PCs accessing the database or can I just use the database file as the backend and Visual Studio will have all the necessary tools I need to access it?
If I have to install the server I may just stick with the MS Access database as the needs for an excessive amount of database storage won't ever be an issue.
You'd need to install MySQL server on the Server hosting the database. The clients would then connect via the network. You will however need a driver to access the MySQL-Server with VB.NET on the client machines. A simple DLL-File might be enough, though.
If you are looking for a file-based database solution have a look at SQLite. But you will have to watch out for concurrency issues here.
I'm trying to install the SSRS data connector for my CRM4 implementation.
I'm using the Method 2: Modify the Install-config.xml file from this page. But keep getting the same error message:
Unable to validate SQL Server Reporting Services Report Server
installation. Please check that it is correctly installed on the local
machine.
I've added the following to my XML file.
<reportserverurl>http://SSRS-Server/Reportserver$MYORG_MSCRM</reportserverurl>
<instancename>MYORG_MSCRM</instancename>
Anyone know what is still wrong?
I tried several instance names but they all don't work either.
I can access my SSRS server by going to http://SSRS-Server/Reports and it will give a list of all services running there.
Any help would be much appreciated.
You may need to post more details regarding this issue:
1) The 2nd method described in this link : here is used when the Reporting Server database is installed using the SQL Server named instance. Are you installing the Reporting Server database in the default instance or named instance ?
2) If you are using default instance, you might not need to use custom XML, you can just run the installer without requiring the input XML file.
3) What is the architecture of your CRM implementation ? is the CRM Application, SQL server and Reporting Server resided in the same server ? or different server ?
Hope this helps.
I realise this is a really old article however I wanted to post the resolution I found to work as I have spent the past 3 days trying to resolve this issue! I created an account just to post this.
I was having the same problem as the original article. I had SSRS 2008 installed on a server, CRM (4.0!!!) on a different server and SQL 2008 on a different server again. When all permission issues were resolved and ports were opened from the SSRS server to the SQL server, I was still having problems getting the SetupSrsDataConnector.exe to see the locally installed instance of SSRS2008 (Not R2).
I found the resolution to the issue in this article:
https://community.dynamics.com/crm/b/pabloperalta/archive/2011/07/12/unable-to-validate-sql-server-reporting-services-report-server-installation-error-while-installing-srs-data-connector
Effectively the problem I was having is that my copy of the SRS Connector installation files were old and needed updating, however my server did not have internet connectivity. In the link above, it gives you a download location to get a .mps file which contains the updates for the SRS Connector.
You need to download this .mps file and then run the installation via command prompt with a customised install-config.xml file, which specifies the SSRS ReportServer URL and the SSRS Instance Name in a custom tag (what you named the SSRS instance when you installed it) and another custom tag for <Patch update="true">C:\Path to the .msp file< /Patch>
This was my installation command:
"D:\Stage\SRSDataConnector\SetupSrsDataConnector.exe" /CONFIG "D:\Stage\SRSDataConnectorUpdates\install-config.xml"
Does any one know how to connect to MySQL 5.1 with Visual Studio 2010?
I have already tried the MySQL Connector/ODBC route and it got me really nasty results. The table rows were all listed as a view in the views section and nothing at all was listed in the tables or procedures folder.
To get the Entity Frame working with VS2010, I had to do the following:
This only worked with Mysql .net Connector v6.3.1 (alpha). Previous versions ignored VS 2010 (click Development Releases)
I had to rename my Framework\v1.1.4322\CONFIG folder. Otherwise the install will fail. Rename it back when finished
(I've blogged about this here)
Update
6.3.2 is in beta and I can confirm this works. (I didn't need to rename the framework folder)
this seems to solve the issue
UPDATED LINK TO LATEST RELEASE THANKS #Christian Payne
Update: looks like there is already a non-beta!!!!
http://www.mysql.com/downloads/connector/net/
As someone else suggests..
http://dev.mysql.com/downloads/mirror.php?id=382641
..fixes the problem.
I had v6.2.3 installed after I had vs2010 installed and the MySQL driver was not shown in the list of the Database Connect dialog. I wrongly assumed I should use the .NET ODBC drivers instead and it caused all sorts of problems. Although I could easily connect to the DB using codebehind, the server explorer wouldn't connect to the DB.
Luckily after uninstalling 6.2.3 and installing 6.3.0 (from the link above) the MySQL driver was added to VS2010, and I was able to connect to the database and see it in my server explorer.
http://bugs.mysql.com/bug.php?id=45122
I was able to get this to work by doing the following:
My Environment:
Development Box -- Win7 64bit,
VS2010 Pro
Deployment Box -- Win2k8 svr with IIS7
running ASP.NET .Net 2.0/3.0/3.5 sp which is
hosted at DiscountAsp.Net (Note:
DiscountAsp.Net does not provide a
MySQL DB when running on a Win2k8
svr, I'm using a MySQL DB that I connect
to elsewhere on the InterWebs)
Steps I took:
Installed MySql.Data, Version=6.3.6.0, Culture=neutral, PublicKeyToken=c5687fc88969c44d
Ref'd the .Net 2.0 version of the MySQL assembly in my ASP.NET MVC2 Web project set to target .Net 3.5 (the path for the MySQL assemblies I used was C:\Program Files (x86)\MySQL\MySQL Connector Net 6.3.6\Assemblies\v2.0)
I ref'd all 3 of the MySQL assemblies (MySql.Data.dll, MySql.Data.Entity.dll & MySql.Web.dll)
I marked each of those assemblies as "Copy Local=True" in my project (a.k.a bin deployment)
Added a MySQL DB connection string to my Project (using the MySQL provider)
Added an ADO.NET Entity Data Model to my project in VS2010 using the connections string
VS2010 took about 30 secs to chew thru my MySQL DB schema but then provided me with a beautiful GUI interface to tweak my MVC Models
Used the DB Entities in my MVC controllers
Deployed the app to my hosted server at DiscountAsp.Net
It works like a charm :)
Erm... through code? Or do you mean the server explorer add-in? Have you tried the latest (albeit GPL-ed) connector version for .NET from Mysql themselves? Again, it's GPL-ed so be aware of the consequences of using that for your own software.
Microsoft Visual Studio 2010 Beta 2 is busted for DDEX providers. They are auto promoting a VS 2008 assembly from 9.0 to 10.0 and it fails. The failure has to do with the fact that a .NET 2 assembly cannot load a .NET 4 assembly.
This worked in beta 1, so it is something they broke.
I even went back and tried the reference DDEX provider from the SDK. It won't load in VS 2010 beta 2 either. That tells me they have something that needs to be fixed.
When is the next beta?