I'm trying to figure out how to have more than one solution for a website, where each solution maps to a subdomain on my Azure site?
For example, I have a site called www.example.com, which a solution for that. I'd like to have another solution which deploys to www.sub1.example.com. And yet another for www.sub2.example.com.
I'd like to keep one site, to reduce the cost - is this achievable?
Edit: This question is along the same lines, however the answer isn't really specific and didn't seem to actually solve the question: How to use subdomain in Windows Azure?
If my thinking is right, you are wanting to host (potentially) completely separate (solutions/projects) websites through one hosting package with azure.
We have a system where we use the deployment slots. These are currently in preview with Azure, and easiest managed via the new portal (also in preview), not the main portal.
Go to Azure,
Click into your website instance,
On the website instance dashboard, under the graph, there is a "quick glance" menu - The bottom item is deployment slots. (You may need to be on the standard compute mode for the Deployment Slots ability.)
Deployment slots are supposed to be used for staging/alternative versions of the main site, and can be assigned a custom sub-domain.
Within visual studio, projects can be uploaded to these environments using the standard azure publish method.
Hopefully this can be of some help...
Related
I have deployed my ASP.Net web app application in the Azure web app through the CICD pipeline. Deployment gets succeeded. But, on opening mywebapp.azurewebsites.net, it is showing
Hey, App Service developers!
Your app service is up and running. Time to take the next step and
deploy your code.
What mistake I am doing?
I would recommend a way to troubleshoot any app service deployments as follows.
Go to the Advanced tools left menu item on Azure app service as shown below
You will be taken to a website like the below. Follow the highlighted menu item as shown below to see the file system where you deployed your application.
3. Make sure your application files are there in the expected directory structure within wwwroot folder. If not, then you have not setup your CICD pipeline correctly. Make adjustments to your build and release pipeline accordingly. Follow the latest resource on here . Let me know you need further guidance.
If you use one of these:
WebApp on Windows
Function App on Windows
API App
Mobile App
you may try marking flag removeAdditionalFilesFlag
More details you can find in the codumentation here.
If you don't use one of above mentioned types you can consider this task - Azure WebApp Virtual File System Tasks.
I recommend you to try it out as it looks that original index file is still in place. This is why yoy may not see your page.
I maintain a website written in ASP.NET MVC 5, and hosted in Azure. It's a legacy app that is a real nightmare to maintain, and so I've been asked to start migrating to a new codebase and the ASP.NET Core framework.
Our goals are:
Migrate one page at a time
Don't lose the "F5 debugging" experience in Visual Studio
My initial thought was to use a virtual application/directory, which is supported both in Azure and in IIS Express. The idea is to point, for example, the /Shop page to the new website by using a virtual path. Then when we're ready, move the /Team page and so on. I would add a virtual path for each migrated endpoint until the migration is complete.
To accomplish this I created a new ASP.NET Core project, and I've been trying to edit my applicationhost.config file and trying to start multiple projects from Visual Studio, without luck.
I tried configuring two sites with the same port binding, two apps within a <site> tag and also two virtual directories within an <application>, but I always end up with errors. Either I can't start debugging (Can't connect to IIS Express or The object invoked has disconnected from its clients messages) or I get a 502 error.
I don't even know if this is going to work in Azure, but I know we can't go down this path without proper development experience.
Am I missing some other, better solution? If this is a good solution, is there any way to make this work in Visual Studio?
I would consider creating multiple new websites in Azure, one for each section. Then, as I start working with Shop, for example, I'd leave an almost-empty controller in the original solution, redirecting to your new Sales web site. Using this approach, you can efficiently work with one smaller code base at a time and in the future scale the individual pieces of your site as needed. Please note, that you can host multiple sites within the same app service environment (thus not incurring a lot of extra cost by separating into multiple processes).
Best of luck :-)
Currenty I'm in the process of creating c#.net websites (mvc) with VS 2015.
Im setting up my home development environment.
I use VisualSVN for my versionmanagement.
I use VisualSVN Server for the hosting of the versionmanagement.
I want to be able to host my repository as an asp.net mvc website, so that I can see the working running version of my project/mvc website. The repository is inside a directory called trunk (only visible from SVN Server). However I dont know how this can be done.
Can anyone provide me any insights? Can it be done with IIS straight from the repository or do I need to publish from repository to IIS explicitly?
You would need to publish your source/assemblies to a server location with IIS that has a front-facing IP Address (www.mysite.com). There are some free hosting options for Asp.Net if you do a little searching or check the Microsoft spot: https://hosting.asp.net/hosting
You can setup a trigger process to update the website every time you check-in/commit code if you truly need a matching version of the website in real-time with your code commits. Although this is rarely a good idea in single-developer scenarios it might be a good workflow. Don't do this if the public/customers are accessing your site :)
Possible solution to actually hosting within VisualSVN as well: How do I browse an old revision of a Subversion repository through the web view?
So my application is composed of a handful of separate .NET components that all run in Azure. To give you an idea of what's involved:
A main ASP.NET MVC5/Web API 2 REST service that runs as an Azure website (I think they renamed these to web apps?).
A SQL database that the main REST service uses.
Another internal Web API REST service that the main REST service talks to that runs as an Azure website.
An Azure storage table that the the internal Web API REST service uses.
3 scheduled jobs (just .NET exe's) that do work in the background and also talk to the main SQL database.
All that's running great in Azure right now. My problem is automating the deployment and configuration.
Right now it's all manual. I right-click and publish both web apps from Visual Studio. I build and FTP up the web jobs. The database and Azure storage already exist so I don't have to re-set them up.
But say something bad happens - a datacenter goes down or something. I'd like to be able spin up a new version of my app (with all those components) that is ready to go with minimal effort.
I'm pretty new to the world of Azure so I'm not sure where to start. What are my options?
You are looking to automating deployments in Azure. I recommend to use ElasticBox to solve it.
To achieve the automation you will need to create a box for every different service or component you need to deploy (a box is the abstraction unit that uses to define the installation and configuration of the deployment of a service or application in any cloud).
It's possible also to create boxes based on VM Instances, VM Roles, or Worker Roles and also automate the deploy of Microsoft SQL Servers. Let's say near every option offered by Azure.
Then with those boxes completed (that can be customized and reuse your legacy code from your previous manual installation), you can deploy the multiple vms with near no manual intervention, just one click or a command with some parameters.
A box includes the variables necessary for your deployment (you can set default values for those variables) and your legacy scripts (In this case probably PowerShell, but they could be bash, python, perl, java, or any other language)
When you deploy your boxes:
Creates a Cloud Service or VM in the location that you choose and with the Azure configuration that you preconfigured. It takes care of provision the vm in your Azure provider, or near any other cloud provider in the market.
Installs, configure files with your specified variables and execute your SQL or Web services that you have defined.
Other ways to interact with the service:
Jenkins' Plugin could be used to build a CI environment connecting your code updated or a Pull Request with automated deployments in Azure or any other public cloud.
Command line tool that enables to do VM deployments of your boxes and also you can manage your deployed vm instances with it.
Azure Resource Manager (ARM) is intended to solve exactly the issues you described.
The basic idea is that you use a JSON template to describe all your services. You can then give that template to ARM and it will create the services as defined in the template. If you want to make a change, instead of doing it imperatively (via powershell or manually in the portal) just update your template, pass it to ARM and it will make whatever changes are necessary to make the services match your template.
Some resources:
ARM talk at MS Ignite 2015
ARM template language reference
Quickstart templates on GitHub
Azure Resource Explorer - view ARM templates of existing resources
Resource Group Deployment Projects in Visual Studio
I think your looking for something to help you handel deploys to your windows Azure servers. If that is the case I recommend looking into Jenkins CI. There are many resources available online you can look into in terms of having Jenkins and Azure work together.
I have a web app that I need to deploy on different websites.
Conditions:
The application code is identical across all websites;
The application is database driven;
Different websites have to connect to different databases;
Connection strings for databases are defined in web.config.
How can I make different websites use the same deployment of the application with different web.config to pull data from different databases?
Here is what my control panel looks like now:
These websites are all applications that I publish separately out of Visual Studio.
The end goal is this:
I found this article: http://www.wadewegner.com/2011/02/running-multiple-websites-in-a-windows-azure-web-role/
It talks briefly about this in “Run the Same Project in Two Sites in the Web Role”
But it seems like this is supposed to be for a local setup and does not discuss how I can get this on the remote Azure instance.
This seems pretty straight forward. Not sure what exactly your issue is.
You can easily map (Deploy from source control) multiple Azure Web Sites to same source code repository. Then, if you are using VSO (Visual Studio Online), the linking will create a new CI build definition for each site. Then you only have to edit the Build Configuration to include the appropriate configuration settings for each environment.
If you are using other source control, you can still customize how the continuous deployment works. All the settings are configurable via a special .dpeloyment file. You can read more about these configurable settings here. Most important part:
SCM_BUILD_ARGS=-p:Configuration=Debug;PublishProfile=MyChainedTransform
You can change build configuration to match that of the target site.
Now, how to make this independently of the source control. Nice Kudu Gurus have thought about that, too. You can tweak these settings via Application Setting for the web site itself (check section Using App Settings instead of .deployment file:
Instead, you can use App Settings to set the same values that are supported
in the .deployment file. The steps are:
Go to the Configure tab for you site in the Azure portal
Add an App Setting called Project, and set its value to something like
WebProject/WebProject.csproj
Then in your other web site you can set Project to point to a different .csproj file.
So you add a new entry with key SCM_BUILD_ARGS and value -p:Configuration=<your_desired_configuration> in the Site Application Settings and you should be ready to go.
Disclaimer: have not check the solutions, but there is no reason why either should not work.