I have an azure web app and an azure sql instance that I need both to be talking to each other. At run time with the connection string it works great. the only issue is when doing auto "EF Migrations". I used the "context.Database.Migrate()" on startup to do this automatically and on my local computer it worked fine however when deploying the azure web app it would throw an IIS error.
I finally found the solution and I wanted to share with the community in case anyone is having the same issue with their deployments. Make sure to enable "Allow Azure Services and resources to access this server".
Related
I have a docker image of an aspnetcore application which i deploy to an instance of an azure appservice for containers on a linux app plan.
The moment i enable MSI - even though i am not using it - the website stops serving.
I am going to write sample apps to figure out further but wondered if anyone has any insight on what the problem could be ?
(I know there are lots of reasons it could be. I suppose what im asking is - unless the application is accessing another azure resource MSI should not be a factor, right?). And why would MSI stop the app from working when it works without it enabled?
The logs seem to show an attempt to contact appsvc/msitokenservice before failing
It appears a question of a similar nature has already been answered:
Azure App Service stops working after enabling Managed Identity
I'm new to Azure and I have a requirement to deploy Windows Desktop Application that runs on IIS server and also has a SQL DB that needs to be deployed to Azure Cloud to prove that Elasticity is possible, as we are having our own DataCenters and we wanted to move to cloud.
I figured we need to create Docker Image for App Server and DB and this app will run only in Windows IIS server.
We have Azure SQL DB service, but what should be my approach for Windows App.
Does Azure provide any service that can help me achieve my requirement?
Any guidance is appreciated. I wanted to get started in right direction.
Not easy to guess what you need exactly when you say "Desktop App on IIS" :( but first things who come in my mind as an Azure user :
"App who run on IIS" -> Asp.Net on Azure WebApp for example
"Azure SQL DB service, what should be my approach for Windows App" -> connect your WebApp to your Azure SQL DB which you can reach technically following this link for example, but I would recommend you to first get a better understanding of WebApp if it's a WebApp that you need and how use the connection string that you set on the Azure Portal in the app that you deploy on Azure.
A quick look on this Azure resources should tell you if it can match your goal.
I am new to Azure & have searched everywhere but here for help. I have a local MVC 5 app w/ simple database. I am using VS 2015 Community w/ all updates.
Problem: Using visual studio, my web app works perfectly in Azure, BUT my local database will not deploy. The db works perfect locally, but when I deploy, only the web app shows up...the database is not there in Azure. I get a generic message saying "There was an error processing your request". I have tried creating the db in Azure and connecting w/ no luck. Everything but the database deploys. Any suggestions are appreciated. Thanks, everybody.
Jeff
You do not deploy the database in Azure. Instead, you create a database in Azure, and then, under deployment, you point your app's connectionstring to that instead.
I have several web and worker roles in my solution, but I also have a non-Azure application running on a Azure hosted VM. That application connects to Azure storage for various things like reading and writing blobs and queues, and that works fine.
I'd like to use Azure diagnostics from within that same application (a .NET app running on a VM hosted in Azure). However, if I try to initialize diagnostics I get an exception that:
System.InvalidOperationException: Not running in a hosted service or the Development Fabric.
This makes sense, but I'm wondering if it's possible to use the diagnostics in some way without being a hosted service. In particular, I'm using azure diagnostics to gather logging information, written out by System.Diagnostics.Trace, and that's all hidden away from the application code, so if there were some other APIs I have a place I can probably slot that in.
Any ideas?
Thanks,
JC
Unfortunately, no. At least not today. The agent has some hard-coded checks for the RoleEnvironment stuff and when it is not there, it fails. This is also the reason you cannot use the agent in the IaaS stuff today either.
I've just completed an automation script that:
downloads a project build to local storage (worker role)
installs ruby, apache, and other dependencies
configures apache and the RoR application to serve requests via port 81
This is all working locally. I'm working with visual studio; running the application successfully pulls the local machine from "blank slate" to "serving requests".
I'm now trying to push this up to Azure - no longer using the local machine, but an actual worker role.
I've packaged the project and uploaded it to a production environment via my Azure subscription portal, but navigating to the site URL doesn't give me anything (site not found).
I'm a bit new to Azure. What steps do I need to take to ensure that this application will work up in the cloud? I feel like I've forgotten to configure something, like the endpoint port (81). Any advice or recommended reading would be super helpful; thank you so much for your time!
If you need some real assistance to troubleshoot the problem, tt would be best to see the following 3 things:
Your automation script (Startup Task)
Your worker role OnStart() function
Your ServiceDefinition and ServieConfiguration
Are you using ProgramEntryPoint to luanch your RoR app or you are doing all of this in Startup task? Based on above info, it is easy to understand the application architecture and some suggestions can be made.
However, the best way to troubleshoot this problem is to enabled RDP access to your Azure Worker Role VM and then Log into your Azure VM to understand what is going on. RDP access to Azure VM will validate that your install script ran correctly and all the modules were started.
As your are new to Windows Azure there could be several things could be missing and if you provide more info you will get accurate help instead of some guess work.