HealthClinic.biz | The samples contained in this repo are used to present an end-to-end demo scenario based on a fictit | Azure library
kandi X-RAY | HealthClinic.biz Summary
kandi X-RAY | HealthClinic.biz Summary
During Connect(); //2015 we showcased many technologies available to you as a developer across Azure, Office, Windows, Visual Studio and Visual Studio Team Services. We’ve also heard from you that you love to have real-world applications through which you can directly experience what’s possible using those technologies. This year, then, we built out a full health and technology scenario for our Connect(); //2015 demos and are delighted to share all the source code with you. HealthClinic.biz is a fictitious regular doctor practice specialized in offering healthcare preventive care. This clinic is using different Microsoft and multi-channel apps built with Visual Studio 2015 to grow their business and modernize their customer experience. They also innovate and offer multiple apps and services—including websites, mobile apps, and wearable apps—to empower their patient’s well-being with easy access to manage their healthcare data and stay healthy.
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of HealthClinic.biz
HealthClinic.biz Key Features
HealthClinic.biz Examples and Code Snippets
Community Discussions
Trending Discussions on HealthClinic.biz
QUESTION
I'm trying to build a webservice/backend for a new mobile app I'm building usuing Xamarin Forms and Azure Services. I've been following this tutorial.
Everything is fine until I get to the section for "Deploy the project to Azure App Service", where I have 2 related issues. I get this same issue with my own DataObjects AND with the standard "ToDoList" application that is given as an example.
- When I go to publish the first time, I select "Update database" on the "Settings" tab in the Publish Wizard in order to push my new DataObjects/Schema through to my new database. Then, I hit publish, and I get an error back saying
System.Data.SqlClient.SqlException (0x80131904): Cannot attach the file '{LocalFilePath}\App_Data\{databaseName}.mdf' as database '{databaseName}'.
I notice that there is NOTHING in the specified "App_Data" folder, is it possible that I need to do something to build the .mdf prior to publishing to the app service? - After this error occurs, and I try to re-publish the database, and the Publish Wizard has 2 differences. First, I no longer have the "Update Database" option, I only have the "Execute Code First Migrations" option on the Settings Tab, and it is grayed out. Second, the Preview tab says "No databases are selected to publish"
I've tried to publish the database through the App Service three different ways, and each of them is giving me the exact same scenario described above, so I think I'm just missing something obvious since I'm new to Azure and Mobile App development.
- Create Mobile App Backend + Service + Database through the Azure Portal, and then deploying the "QuickStart" project from the Azure Portal.
- Following a tutorial similar to the one above, but that was specifically for publishing the ToDoList database schema that is inserted by default. This was the tutorial I followed
- Following the tutorial above but utilizing my own custom DataObjects rather than the ones described in the tutorial.
I've read up on ways to get the "Execute Code First Migrations" to be available, but I haven't found anything that actually allows me to deploy the database yet, as it keeps on saying "No databases are selected to publish", and I can't get the "Update Database" option to show up after that initial failure. Is there anything obvious that I'm missing?
...ANSWER
Answered 2017-Feb-09 at 10:30When I go to publish the first time, I select "Update database" on the "Settings" tab in the Publish Wizard in order to push my new DataObjects/Schema through to my new database. Then, I hit publish, and I get an error back saying System.Data.SqlClient.SqlException (0x80131904): Cannot attach the file '{LocalFilePath}\App_Data{databaseName}.mdf' as database '{databaseName}'. I notice that there is NOTHING in the specified "App_Data" folder, is it possible that I need to do something to build the .mdf prior to publishing to the app service?
As official document mentioned about Update database in the Publish Web wizard as follows:
you select the check box labeled Update database in the Publish Web wizard. This check box is shown for SQL Server databases that the application accesses without using an Entity Framework Code First context class.
If your source local db is not created before you deploying your app, you would get the error as follows:
For more details, you could refer to the dbDacFx Web Deploy Provider section in this document.
After this error occurs, and I try to re-publish the database, and the Publish Wizard has 2 differences. First, I no longer have the "Update Database" option, I only have the "Execute Code First Migrations" option on the Settings Tab, and it is grayed out. Second, the Preview tab says "No databases are selected to publish"
Execute Code First Migrations (runs on application start) is shown for databases that the application accesses by using an Entity Framework Code First context class.
When you select this option, the deployment process automatically configures the application Web.config file on the destination server so that Code First uses the
MigrateDatabaseToLatestVersion
initializer class.
If you run the Enable-Migrations command in Package Manager Console, you could select this check box. For more details, you could refer to the Entity Framework Code First Migrations section in this document.
For a simple way, you could leverage the "QuickStart" project from the Azure Portal to migrate your db via EF code first. When deploying your project, update your local connectionstring with your target db (e.g. Azure db) connectionstring under "Settings > Databases" in the VS publish web wizard as follows:
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install HealthClinic.biz
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page