Azure VSTS deployment related issue (Deploying a laravel app) - laravel

I'm using azure to deploy my web application, Laravel application
laravel uses site\wwwroot\public as entry point
For that reason I'm using "site\wwwroot\public" in Virtual applications and directories under application settings
Where can I find the setting of the location where the code will deploy that will arrive from VSTS (deployment source)
Application settings on Azure
Right now this is the link where whenever my project arrives from VSTS is deployed
I don't want that, I want it to be deployed in "site\wwwroot\" yet keep entry point of application same as above in bullet

Related

HTTP Error 500.32 - Failed to load ASP.NET Core Hosting how can I solve this?

I'm trying to deploy an ASP.NET Core Web API into an IIS site in windows 2012 server, I've installed IIS from 0 and when I deploy the app and test a petition with Postman I get the 500.32 error.
I've already installed the .NET Core hosting bundle v 6.0.14 also I've configured the application pool to no managed code and I restarted all the services including the IIS.
Restarted the server isn't an option because I can't get physical access to the server, I'm working from a remote location
This is my dotnet --info
I'm trying to deploy an ASP.NET Core 6 Web API.
I've already done:
Compile and publish the API
Installed the is
Create a site and application to deploy the API
Paste the files from the publish folder to the site folder
Installed the netcore hosting bundle
The problem was in the compilation and publish process.
i had to add the check for Ready to run in the publish configurations, i put that and solved the issue

Unable to publish Web API from Visual Studio

I have created a simple web api in ASP.NET Core and wanted to publish to Azure Web App.
I'm using free trial subscription and have only one web app resource created in Azure.
The app service plan is using free tier 'D1' SKU and is the only one present in my subscription.
However, while trying to publish the web api by choosing this web app in Visual Studio publish profile, it says 'there are no existing instances available'.
The web app resource does appear here:
Clicking next while the resource is selected, results in the issue:
I have created a .Net Core Web App in the Azure free trial Subscription with free tier plan
Initially it contains only hoststart.html
KUDU Console of Initial App Service
Created a sample .Net Core Web API Application in Visual Studio and tried to Publish to the App Service which I have created in Azure portal
Make sure you have login to the same subscription in Visual Studio where you have created the web app in Portal
Initially it was prompted to re-enter the credentials after changing the Azure Subscription,I have refreshed the Visual Studio , after few seconds Iam able to see the correct Subscription details.
Iam able to see the App Service which I have created in Portal
Able to successfully deploy the WebAPI to the App service in Portal
KUDU Console of App Service after Publishing the WebAPI from Visual Studio
Deployed WebAPI Output
Update
You are in the correct path, after selecting the web app it asks to create the api.Click on the + symbol and add the API Management
Seems like you created a Web API resource and no API Management resources. Those two are independent Azure services. Former is needed to host your API application. The other one provides additional features to your APIs and is completely optional - you can look it up in the official documentation.
The step to select/configure API Management resource was introduced in deployment wizard at some point. It is confusing and probably could be handled differently.
Unless you need API Management resource, just skip the step and you'll have deployment profile ready.

Azure DevOps IIS Web App Manage task Virtual Directory create/update giving Access is denied error

I have tried creating/updating a Virtual Directory under a website --> web application in Windows IIS server from Azure DevOps Release pipelines using the IIS web app Manage task in a Deployment Group Job. When we trigger the release, the process is trying to add a virtual directory if not exist and then fails with ##[error]Access is denied on adding the credentials and then it is setting the value to default which is the application pool identity on the server. If the virtual directory exists, even then we are seeing the same error on the release ##[error]Access is denied without making any changes to the existing configurations.
PS: we are adding g an AWS FSX share to the IIS Web app on the AWS EC2 windows machine.
Steps performed:
• Created a website.
• Created a web application under a website.
• Trying to create a virtual directory under a Web application using the below configs.
task: IISWebAppManagementOnMachineGroup#0
displayName: 'Create virtual directory'
inputs:
IISDeploymentType: IISVirtualDirectory
ParentWebsiteNameForVD: '$(DEV_SiteName)'
VirtualPathForVD: '/$(sitename)/webapplicationname'
PhysicalPathForVD: '$(AWSFSXPath)'
VDPhysicalPathAuth: VDWindowsAuth
VDAuthUserName: '$(DEVIISUserFSX)'
VDAuthUserPassword: '$(DEVIISPwd)'
Is there something that I need to additionally configure on the server(target) to get this working?
TIA

Azure: Will I be able to use source control integration?

Currently, my visual studio solution has 3 projects:
MVC project - to be deployed at say www.something.com
Web Api - to be deployed at api.something.com
SPA application - to be deployed at app.something.com
Will I be able to host all of these just through VSO source control? I am not sure if azure would be able to host the applications at respective sub-domains without explicitly defining them?
Can anybody please clarify? And what would be the best approach?
if you host your application on Azure App service, there is continues deployment service. You can have your code next to your site (Local Git https://azure.microsoft.com/en-us/documentation/articles/web-sites-publish-source-control/) or you can have your code in supported repository e.g github/bitbucket etc ..
And Azure App Service supports virtual directly, you can have multiple apps in the same site. see detail answer from here Publish Multiple Projects to Different Locations on Azure Website

WebApi Deployed to Azure - Controllers Don't Work (500 Error)

I have a WebApi project that wraps the Dynamics CRM Online web service and provides a REST api. I have a simple controller that gets some contacts from CRM and returns them to the caller.
Everything works fine when I run it in the local emulator. However, when I deploy the project to Azure, I can reach the home page, but the controllers all return http 500 errors. Why would this happen? And how can I troubleshoot to get more details?
UPDATE
The issue is with the absence of Microsoft.IdentityModel.dll on the Server 2012 instance running the web role in Azure. I found this by opening web role instance in RDP, installing Fiddler, and making the request from Fiddler to the local IIS server. It responded with the detailed error.
Now my issue is figuring out how to enable IdentityModel on a Windows Azure Web Role. You're supposed to be able to add it via the Server 2012 Add Roles and Features wizard, but it's totally locked down on the Web Role. You can't check any boxes that aren't already checked. Is this even possible?
The issue is giving the Web Role access to Windows Identity Foundation when it's inherently not there. Marc Schweigert provides clear steps to do this here:
http://blogs.msdn.com/b/devkeydet/archive/2013/01/27/crm-online-amp-windows-azure-configuring-single-sign-on-sso.aspx
Go to the 23:00 mark of the video and you'll see the 4 necessary steps:
Reference Microsoft.IdentityModel.dll (need WIF SDK installed)
a. Set copy local = true
Create RegisterWIFGAC.cmd in your web role project
Create Startup Task in ServiceDefinition.csdef that invokes RegisterWIFGAC.cmd
Add GacUtil to the project (used in the startup task) to put Microsoft.IdentityModel.dll in the GAC every time the web role starts).

Resources