I have two asp.net mvc projects (one for the back office and the other for the front office). I want to deploy them on the same virtual machine with different URLs : For example the first with the url "myProject" and the second with url "myProject/Front".
If i deploy them under the same folder wwwroot, i have conflicts.
With an Azure VM you have a full Windows Server at your disposal. Just RDP into your VM and manage the sites with IIS as you would more traditional websites. You can't technically deploy multiple applications to the same document root, but you can set one up as a virtual application for the other. However, bear in mind that the Web.config of the outermost application will apply to any virtual application residing within. Otherwise, just create two entirely distinct sites in IIS each with their own document root.
Related
I have three different projects, I have to deploy these projects under single web app with different sub domains. I already purchased the custom domain. To deploy these project I have created three directories.
I have also setup the virtual directories in the app settings.
The domains are also set
And I deploy the web part like this.
Now when I'm trying to access the web sub domain its showing me the default azure page
How can I access the projects on the basis of sub domains.
So I got an idea from Nancy comment. So you just have to update the virtual applications and the directories as follows.
Now I can access the web using https://web.example.com/ Thanks #Nancy.
I have been trying to get Umbraco working in a web role environment (web services) in Azure, but the site errors when you try and access it, saying that config/trees.config is not accessible.
These are the steps i carried out:
Create a new empty MVC4 project in Visual Studio 2013
Install Umbraco v7.1.8 from nuget
Run up and configure using a new azure SQL database.
Added in the umbraco folders to the solution.
Added an azure web services project to the solution.
Added the existing MVC umbraco project to the azure role profiles.
Published to Azure staging area.
The site starts up with the usual 'Looks like there is still work to do' screen in the full Azure emulator in visual studio with multiple role instances. However fails to run up when hosted in Azure.
I am currently assuming that the issue is that the site root does not have write access when hosted in Azure, so the IIS worker process cannot write to the trees.config file.
I found an article where you can add a 'startup.bat' file, with the following:
echo "starting startup task" >> log.txt
%windir%\system32\Icacls.exe .. \* /T /grant "Network Service":(F) > log.txt
But this stops the role instances for starting up at all in both the emulator and when hosting in azure.
Any suggestions would be gratefully appreciated
I would suggest using a VM instead of a web role for hosting Umbraco in Azure, particularly since Umbraco is needing local write access to persist.
Web roles expect your application to be stateless, meaning no writing or persisting anything to the actual file system. This guarantee allows Azure to make certain assumptions so that it can load balance and scale the application correctly (it basically saves a master copy and then re-deploys it fresh as it scales up or makes updates, etc. This works great for web apps that were created with this in mind, but if not, then a VMs allows you to scale UP without worrying about your app needing to work a certain way to properly scale OUT under a load balancer (which is what web roles are made to help you do).
So, basically I would suggest installing to a Virtual Machine. It's still in the cloud, and you get all the cloud benefits of on-demand scaling of the infrastructure. In addition, I would expect Virtual Machines to be a supported install of Umbraco, where a web role install would not. Hope that helps!
I have tried these steps but could not make it. When I browse my app it shows dll file.
Log onto the machine that is or will be hosting your application.
Use IIS Manager to create a new website for your application.
Create a new application in that site. I believe this also will automatically create an application pool with the same name for you and use it by default.
Specify the virtual directory for your application. This is going to tell IIS where to look for your mvc application. For this case lets assume it is C:\myApp
On your own machine Build the application however you build it with the correct solution configuration (i.e. Release mode). Lets say the result of your build is located at C:\MyProject\bin.
Copy C:\MyProject\bin from your machine onto your hosting machine at C:\myApp
I am a novice to this technology.
you shouldn't just drag the bin folder. it is everything else too like the images, css, jscript files as well as the cshtml files too (your views) to the c:\myapp folder.
or perhaps just do a publish within visual studio. maybe even take a look at this to see if this helps:
How to publish my MVC 3 web application onto IIS7
but generally speaking, I build the solution. I then create the vdir in my IIS. I copy the bin and view folder along with images/css/jscript/shared folders etc... to C:\my deployed site. I then convert to application for that vdir I just created in IIS.
You have to use publish action for ASP.Net web application(MVC, Forms and etc.)
I'm seeking some guidance for hosting websites on azure.
I have a Umbraco website, which work fine on azure website.
I also have an MVC application I want to host inside my umbraco site, but it has to be run as an application.
This work fine in IIS by converting the folder to a application, but there is no option to do this on azure.
Is there a easy way to convert the folder to a application inside my umbraco solution or do I have to create a virtual machine with web roles?
If you need more control than just creating an Azure Website - you need to create an Azure VM or use an Azure Web Role hosted service.
This is a general question regarding deploying an MVC asp.net app into a test server.
How do you do it?
I tried to publish and deploy an mvc app into test server (under tight control), and the VS.NET complained that it was not able to update the remote IIS server for creating the virtual directory etc there, although the remote machine is accessible via its IP address.
Check this MSDN Help Page and make sure you meet all the requirments to manage/setup/configure remote IIS sites.
http://msdn.microsoft.com/en-us/library/h17hytcs.aspx
fyi: there should not be any difference between regular asp.net and mvc sites.