We are creating an azure angularjs application. This application is created as a web role in an azure project. After a deploy we get a 403 error:
403 - Forbidden: Access is denied.
You do not have permission to view this directory or page using the credentials that you supplied.
All files are copied automatically from the source project via Gulp. They are not included in the project file.
In the project properties we specified in the publish settings that it should "copy all files in this project folder". The main page is an index.html page that should load up the whole angular application. To get the index.html as default page we added this to the web.config:
<system.webServer>
<modules runAllManagedModulesForAllRequests="true"/>
<defaultDocument>
<files>
<clear/>
<add value="index.html"/>
</files>
</defaultDocument>
Are there other settings we need to adjust?
I may not be able to point out what's wrong with your application but could you please check as following.
Just visit your website with index.html specified. I mean http://your-app.cloudapp.net/index.html. If it works then this could because your web.config setting doesn't work.
If your got a 404 error, please check the website folder via Remote Desktop. This might because your deployment script (or project setting) was incorrect which caused some files were missing.
If it works but got 403 when you clicked some links or buttons to navigated to another angular view, this should because your IIS doesn't support Angular Router. To fix this problem please refer How do I configure IIS for URL Rewriting an AngularJS application in HTML5 mode?
Hope this helps
Related
I Have an Angular application which is hosted in azure web app. I want to access video file by requesting url like https://something.azurewebsites.net/htmldelivery/assets/videos/test.mp4 But I was not able to served requested video file from web app. It simply return "The resource you are looking for has been removed, had its name changed, or is temporarily unavailable."
App Service Plan :S1 & Location : UK West
This is how it look like my current directory structure in the web app.
When I request the video file directly from browser https://something.azurewebsites.net/htmldelivery/assets/videos/test.mp4 it returns me 404 file not found error.
Does anyone have any idea about this issue ? I was trying to configure Virtual applications and directories in web app configuration but still did not worked for me. I was changing the physical path up to site\wwwroot\htmldelivery\assets\videos\test.mp4 but still no success.
After further investigation I came to the point that Azure web apps need some configuration to configure the mimeType in your web.config to work with video files in Azure Web App. So I have just simply created a web.config file into the root directory and it works well.
<configuration>
<system.webServer>
<staticContent>
<mimeMap fileExtension=".mp4" mimeType="video/mp4"/>
<mimeMap fileExtension=".ogv" mimeType="video/ogg"/>
<mimeMap fileExtension=".webm" mimeType="video/webm"/>
</staticContent>
</system.webServer>
I have developed a new website using a CMS named Kentico.
After being published on my web server named web3, it consists of 2 folders: a folder for the live site (named live) and one server for the admin site (named admin).
My folder structure looks like:
For the time being, my IIS installation looks like:
So i have created an application for the live site pointing to the live folder and an application for the admin site pointing to the admin folder in the Default Web Site of IIS.
Therefore, the URLs to access the websites are http://web3.domain.org/Live and http://web3.domain.org/Admin.
It works fine but I want to access the live site at http://web3.domain.org/ and the admin site as it is now: http://web3.domain.org/Admin.
One solution I found was to create a new website in IIS pointing to the live folder and add a new application inside it pointing to the admin folder:
It works fine, the live site is accessible at http://web3.domain.org/ and the admin site at http://web3.domain.org/Admin.
However, I am not sure if it is the best option as the admin site is now dependent of the live site. If the live site is down, I won't have access to the admin site while they are technically independent (2 distinct folders).
I also tried to keep using the Default web site with some rewrite rules in a web.config under wwwrooot like :
<rules>
<rule name="Root_URL_Rewrite" stopProcessing="true">
<match url="^(.*)" />
<action type="Rewrite" url="/Live/{R:0}" />
</rule>
</rules>
but it didn't work.
Your help would be welcome.
I would recommend creating two separate IIS sites. One for the admin app (e.g. admin.something.com) and second IIS site for the live app (something.com). Or, if you want to have both apps on the same domain name and the admin app in a subfolder, then you need to use one IIS site - this will be set to the live app and then create a virtual application subfolder and point it to the admin app. So, you will have basically nested admin app - this is not recommended as in some cases IIS can detect two web.config files as nested and it could cause issues. Or, IIS will take the live site's config file as master and ignore the nested one, etc. I would vote for two separate IIS sites.
This name.azurewebsites.net page can’t be found
No webpage was found for the web address: https://name.azurewebsites.net/
HTTP ERROR 404
i followed this tutorial, everything went smoothly from the build to deployment, i'm using nodejs 10.15.0 and when i hit
node -v in the VM it gives
0.10.14
edit
Kindly check to see if adding IIS to pass errors in web.config helps.
<httpErrors existingResponse="PassThrough" />
In case the above does not help, add the following in the web.config and see if that works.
<staticContent><mimeMap fileExtension=".json" mimeType="application/json" /></staticContent>
In this similar discussion thread, another user was able to fix the issue by adding directive to "location /" block:
proxy_set_header Host rpsexpressnodetest.azurewebsites.net;
You could leverage App Service diagnostics to fetch more pointers on the issue.
To access App Service diagnostics, navigate to your App Service app in the Azure portal. In the left navigation, click on Diagnose and solve problems.
Thanks for sharing the screenshot, please do ensure that the site deployment files are available D:\home\site\wwwroot\ directory.
Please check to see if the above works or share more details about your WebApp for further investigation.
I am deploying an Web app to Azure using Visual Studio 2017.
The web app is using windows authentication & gets deployed without any error but gets redirected to https://localhost:44334/
As I am using Windows authentication it correctly uses my azure credentials to log me in and redirects to the localhost.
In the web config I changed the key for ida:PostLogoutRedirectUri to the Azure app service url.
It works fine on localhost but when I changed the webconfig url it still redirects the page to https:/localhost:4434 and gives an error Error Code: INET_E_RESOURCE_NOT_FOUND
<appSettings>
<add key="ida:ClientId" value="265751ce-5142-4d79-ba57-86ab32293f9e" />
<add key="ida:AADInstance" value="https://login.microsoftonline.com/" />
<add key="ida:Domain" value="myaccount.onmicrosoft.com" />
<add key="ida:TenantId" value="09bacfbd-47ef-4465-9265-3546f2eaf6bc" />
<add key="ida:PostLogoutRedirectUri" value="https://myportal.azurewebsites.net/" />
I followed this link https://learn.microsoft.com/en-us/aspnet/core/tutorials/publish-to-azure-webapp-using-vs?view=aspnetcore-2.2
Is there a web config or setting that I am missing.
1.If you want to publish you web app to azure and use azure credentials to login in , you should not choose Windows authentication, this authentication verify you local windows's account. I suggest you using Work or School Accounts. Then create App registration and set the web.config.
2.As for the problem you occurred ,it didn't occur to me. Because if you publish the web app with Windows authentication, even you set the web.config the app won't open the authentication window. And if you run it on local and it redirects to localhost, this is completely OK.
I suggest you using Work or School Accounts and deploying it, if you still have questions, please let me know.
I am setting up a classic ASP site on my computer. I have installed all the necessary DLL's, configured the IIS and enabled ASP on my IIS. All the files of the website are in a folder named ClassicASP.This Folder is in wwwroot Folder of IIS.
Now my problem is that I am able to access the Login Page of my site. But when I enter credentials It doesnot redirects to the next page. Its gives
"
HTTP Error 404.0 - Not Found
The resource you are looking for has been removed, had its name changed, or is temporarily unavailable.
"
However the file is in the same folder. I can only access Login Page no other page is working it says Resource not Found.
Can some one help. I am new to ClassicASP.