Added RavenDB add-on to AppHarbor app.
It seems that creating databases is disabled in the RavenDB admin.
Why?
You should already have had one created for you, the connectionstring is injected into your configuration file with the name RavenDB. Details here: http://support.appharbor.com/kb/add-ons/using-ravendb-and-ravenhq
I believe they use the multi-tenant support to separate each customer, so you have a single database created for you when you add the addon.
Related
I created an ASP.NET Core MVC code first project.
All works fine on LocalHost
After publishing it to Azure, most tables created fine, in some tables all the columns were not created and one table was not created at all.
Could it be that I deleted some of the migration files while still developing on LocalHost? Or does the Publish to Azure process create a new complete Migration?
How do I now get the latest version of my database, as I have on LocalHost, migrated to Azure?
There is no way to publish your application to Azure and the process of doing so to change the migration files generated by entity framework. Note that you need to create the database in Azure first then publish your web app.
My Db, Migration files and ModelSnapShot somehow went out of sync. I think I edited some migration files at some point.
Got it fixed in dev by deleting all migration files, dropping the db and then adding the migration again.
Is it possible to run AspnetBoilerplate CompanyName?ProjectName.Migrator as per environment and how?
What I can see is that it can only read settings from appsettings.json but not from appsettings.{Environment}.json for example. This is totally not affordable for CI/CD scenario where I plan to run Migrator as a part of the process.
Any help or idea would be appreciated.
Migrator gets the host connection string from its own appsettings.json file. In the beginning, it will be the same in the appsettings.json in the .Web.Host project. Be sure that the connection string in the config file is the database you want. After getting the host connection string, it first creates the host database and applies migrations if they don't already exist. It then gets the connection strings of the tenant databases and runs migrations against those databases. It skips a tenant if it does not have a dedicated database or its database has already been migrated by another tenant (for shared databases between multiple tenants).
You can use this tool on the development or on the production environment to migrate databases on deployment instead of EntityFramework's own tooling (which requires some configuration and can only work for a single database/tenant in one run).
You can refer this document related to connection string.
I've got a problem to migrate A user from one server to another.
I tried to use the migration manager, but if I start the migration manager the migration will be started but after 2 seconds it has finished and no migration has be doen.
What can I do? Is there anything I can do?
or should I moove the data manually?
You can try to use Plesk Mass Transfer Script.
The Plesk Mass Transfer Script (formerly Mass Migration Script) is designed to allow providers transferring accounts from one Plesk farm to another one by an automated way.
The script will create migration sessions for each domain only if you run mmigration.php with '--per-domain' option. By default single migration session is created.
More details and scenarios you can find here http://kb.sp.parallels.com/en/113283
Okay I solved the problem. I had to increase the number of free domains!.
I've a very simple application built in MVC4. This application allow the users to upload a file, and the application generates an output.
This app works great locally, but when I publish to azure (by right click -> publish), I get a less descriptive error. I've figured out that the error was because in the code, we accessed to a server relative path, and that is not possible in azure. So I've found a way to solve that in this link, that says that I should use LocalResource, rather than Server.MapPath. That make sense for me, but so far, I'm struggling with the suggested line.
LocalResource localResource = RoleEnvironment.GetLocalResource("DownloadedTemplates");
I'm not able to get it working, and also can't get a proper error. BTW I'm not sure how to enable the error log in azure :(
So, after going deeper in MSDN, I've seen that I should configure the Local Storage Resources, but as I've created a local MVC4 project, I can't find where I should configure this.
I need to be able to store a temporary file in the application (hosted in azure).
Did someone faced with this problem?
Anybody knows how to enable the Local Storage Resource in a project like that?
TIA!
Milton RodrÃguez
Well, after struggling a while, I've ended up using Windows Azure Tools.
The steps:
Add a new project
Under Cloud category, select Windows Azure Cloud Service.Note that if you don't have this option, an option to install the needed SDK will be shown. Install it first.
Name it properly :)
New Windows Azure Cloud Service window will appear, select the role that fits your needs. In my case, I choose ASP.Net MVC4, and then removed it.Note that you can edit the name of the created role at the right.
In the Roles folder of your new project, select Add, and then Web Role Project in solution. Your project will be an option to add.
You can remove the other role in the folder, the web project created in step 4, and also the folder ending in Content (ie. WebRole1Content). Basically, you can remove the created assets, but the Azure Service, and link the service to your project.
You're almost done. Follow this link to configurate your local storage :)
Now you're done!
Can anyone say if there is a complete/accessible API for the latest Azure bits that will allow the complete creation (not just scale out like Scale Windows Azure roles programmatically) of a 'worker role' application? Not building a web site or needing any SQL or table storage. I would like to build an EXE that will create the full container and allow the upload of DLL/config artifacts so the app will exist and start up.
Thanks.
I'm not sure this completely solves your challenge, but... Take a look at these PowerShell cmdlets:
New-AzureServiceProject
Add-AzureWebRole
Add-AzureWorkerRole
They will spin the scaffold code for your web and worker role, respectively, and optionally allow you to specify a template folder.
The Operations on Hosted Services page should get you started. Specifically you'll want to Create a Hosted Service if you don't have it already, then Create a Deployment. You'll have to point to a deployment in blob storage that you've uploaded in order to create and then start the deployed instances.