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.
Related
I setup a Sitecore infrastructure on azure (I created the same before and it worked) and when I connect to the web apps directly, they all work. I configured access to two of the apps via Application Gateway - while one works, the other one gives 502 on the health status.
I checked on the application and there it shows me that the error is "ERROR_INTERNET_CONNECTION_ABORTED".
When I completely deactivate Sitecore (rename default.aspx and web.config) and put an index.html page, the application gateway can access it.
As mentioned - I have a running deployment that I did with the same ARM template. I also deleted everything and redeployed - same issue.
As mentioned - direct access to the web app works perfectly.
I have NO network restrictions on the web app yet.
It might be the case for Sitecore initial startup to take ages (more than health probe from service gate).
Considering Service Gate does not receive response from WebApp, it assumes application to be unhealthy, and might cache the 502 code.
What does your web app diagnostics say?
I finally found the issue. It was not the startup time and not an issue with the Application Gateway:
<ipSecurity allowUnlisted="false" denyAction="AbortRequest">
<clear />
<add ipAddress="0.0.0.0" subnetMask="0.0.0.0" allowed="true" />
</ipSecurity>
this is in the web.config for newer Sitecore Versions. No idea why it worked for the other installation - but removing this solved the issue for me.
I have created a sample ASP.NET MVC app (the standard one you get in Visual Studio). I have deployed this to Azure and it works fine. I have SQL Server 2016 running locally (on premise) on my machine and the cloud app uses this database. I have created a hybrid connection and everything is connected as it should be. But when I run the app its not connecting to the database for some reason. The connection string works fine locally:
<add name="DefaultConnection" connectionString="Server=MyPC-QQ5, 1433;Initial Catalog=myDataBase;User Id=sa;Password=thePassword!;" providerName="System.Data.SqlClient" />
Is anyone else experiencing this problem.
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
I am facing a weird issue, I have a webapi in my web application "https://myapplicationurl/api/Login/" which worked fine before with local iis deployed website. And after deploying the website to cloud application recently, somehow I am unable to access the webapi "https://myapplicationurl/api/Login/" locally through IIS website.
Any idea with issue?
Solved the issue with following handler in web config Web config:
<add name="ExtensionlessUrl-Integrated-4.0" path="*." verb="*" type="System.Web.Handlers.TransferRequestHandler" preCondition="integratedMode,runtimeVersionv4.0" />
My web role is intended to run an ASP.NET application. I tried to publish the application to local IIS and it runs smoothly. But when I press F5 to run it in Azure development fabric, it gives me this:
Not sure how to troubleshoot this...
Actually, the page title shows up at first, and then it changed to 500 error.
You can turn CustomErrors off in your web.config to see the details behind your 500 error.
<customErrors mode="Off" />
Just be sure not to deploy to production with this setting.