How to solve Web Deploy - IISWMSVC_AUTHORIZATION_FAILED - iis

Using Web Deploy, I encountered this problem as recorded in the server event log:
IISWMSVC_AUTHORIZATION_FAILED
The user '[my user]' is not authorized for the path '/[my site]'.
Process:WMSvc User=NT AUTHORITY\LOCAL SERVICE

When setting up the site, I had misspelled the site name in IIS.
Confusingly, the error reported contained the correct spelling! (must be obtained from the url passed to web deploy)
Hence the web deploy command didn't match the site name in IIS.

Related

.NET 5 based API deployed on Azure App Service replies with 404 Not Found

I have .NET Core based backend application (Swagger API) deployed in Azure App Services at https://myapi.azurewebsites.net
It works fine except of one method where I invoke a redirection to another website via GET request in browser as following:
https://myapi.azurewebsites.net/api/Method/Ext&RedirectUrl=https://externalsite.com
The link above shows Error 404 Not Found in a browser and I see that one "/" is missing from the RedirectUrl in IIS logs so this must be the reason:
GET /api/Method/Ext&RedirectUrl=https:/externalsite.com
The IIS error code is the same - 404.
There is no Application Gateway or anything else that can modify the URL.
I checked my App Services instance configuration and did not find any settings that could modify the URL.
Did anyone experience the same issue?

How do I host a public static site as a web app?

I want the url www.example.com to display default.html
From this question I understand that the easiest way is still to create a web app.
[How not to do it]
I tried creating a solution in VS2017
File->New ->Project -> .Net Core -> Asp.Net Core Web Application-> Empty
Then I moved my static files into wwwroot and deployed
What do I need to change so that default.html will load when someone goes to the site?
At the moment if I remove the Program class I get a message
Severity Code Description Project File Line Suppression State
Error CS5001 Program does not contain a static 'Main' method suitable for an entry point
which is understandable since it is a web application , how do I change it to be a static web site?
[A better way, create the app in Azure.]
Instead of the above method I created a new web app and followed the advise at this question to paste in index.html.
I can now go to the Azure url for the site and the correct content displays.
Next I need to get example.com to work.
I added the CName record for www in my DNS with the url for the site, and I also went to Custom Domains in Azure to add my domain name.
However I get the following error when I go to my site.
Error 404 - Web app not found.
The web app you have attempted to reach is not available in this Microsoft Azure App Service region. This could be due to one of several reasons:
1. The web app owner has registered a custom domain to point to the Microsoft Azure App Service, but has not yet configured Azure to recognize it. Click here to read more.
When an app owner wants to use a custom domain with a Microsoft Azure Web Apps web app, Azure needs to be configured to recognize the custom domain name, so that it can route the request to the appropriate server in the region. After registering the domain with a domain provider and configuring a DNS CNAME record to point to the app's Azurewebsites.net address (for example, contoso.azurewebsites.net), the web app owner also needs to go to the Azure Portal and configure the app for the new domain. Click here to learn more about configuring the custom domains for a web app.
I got it working in the end. I must have missed a step in the documentation

Unable to reach web site locally on Azure web role

I am deploying multiple web sites on Windows Azure cloud service on Single web role. I have added required binding and host file entries. when I run ping command I am getting the response as well.
However when RDP to VM and browse the site locally on VM as localhost
it is not reachable and showing 404 not found.
Error from IIS events
The application '/' belonging to site '1' has an invalid AppPoolId 'DefaultAppPool' set. Therefore, the application will be ignored.
when RDP to VM and browse the site locally on VM as localhost it is not reachable and showing 404 not found.
I access the desktop of your web role running in Azure and add a new Web site to your Web server, I can browse the site locally. If possible, you can try to create a new web site to server static html files and check if it works fine, or you can share us the detailed information of bindings and your application.
Add a website:
Settings:
Application pool:
Browse site locally:
The application '/' belonging to site '1' has an invalid AppPoolId 'DefaultAppPool' set. Therefore, the application will be ignored.
Some community members encounter and post similar issue in this so thread, you can check if any .dll files are missing or 32-bit libraries are used.

SharePoint 2k13 http Error 503 service unavailable in SharePoint Web Services web app

I am trying to install and configure SiteMailBox on SharePoint and when i execute the .\Set-SiteMailboxConfig.ps1 i get the error :
Get-SPAppPrincipal : The HTTP service located at
http://app:32843/87f2cfd3c96f4130b4f269d7cae8d99b/AppMng.svc is unavailable.
This could be because the service is too busy or because no endpoint was found
listening at the specified address. Please ensure that the address is correct
and try accessing the service again later.
I went to IIS Manager and i wanted to verify my SharePoint Web services status, so i wanted to browse to the http://localhost:32843/Topology/topology.svc and i got the http 503 error service unavailable... According to this thread
Can anyone suggest me how can i solve this probelm please ?or even some suggestions?
My appManagement is set up and here is my IIS site with its bindings :
Changed your Admin Password??
Need to fix all login references
See Application Pool -> Advanced Settings
-> Identity

ERROR_USER_UNAUTHORIZED when deploy to IIS 7.5 when using IIS manager user

I'm trying to deploy from a teamcity server to my iis server but I get unauthorized when I use an IIS Manager user set up in IIS. If I use a Windows account it works just fine. Am I missing something?
I thought it was enough to create an IIS Manager User in ISS, or do I have to add that user to the domain or server I'm trying to deploy to?
In the Management Service Delegation I have added two rules, it could probably be combined into one. The first rule is for contentPath and iisApp and the second is for createApp. Both rules are run as an administrator user. I have added that all users (*) are allowed to execute the rule.
Is it something else I need to enable on the target server for it to work with IIS Manager Users?
I get the following message in my event viewer:
IISWMSVC_AUTHORIZATION_SERVER_NOT_ALLOWED
Only Windows Administrators are allowed to connect using a server connection.
Other users should use the 'Connect To Site or Application' task to be able to connect.
Process:WMSvc
Ok, I've been looking for an answer for some time and couldn't find it... but of course I figure it out myself as soon as I post the question here. The answer to my problem was that I have to add the IIS Manager User to the site which I want to deploy to. So if I selected the sites and then opened up the "IIS Manager Permissions" and added my user it all started working just as expected.

Resources