Remote Debugging Azure App Service with API Management? - azure-api-management

Is there a setting necessary to be enabled for APIM to forward remote debugging calls to its associated app service? When I portqry, the port is reported as Filtered, not Listening.

There is a workaround to the problem. First, download the latest publishing profile for the app service and open it. With the project loaded, select Debug > Attach to Process. Use the destinationAppUrl in the profile for the Connection target. Append the url with ":4024" and tap "Enter". That will start the connecting to the cloud debugger for the app service. A login dialog should appear. Use the
first userName and userPWD values to fill the dialog. When entering the userName, prefix it with a backslash so your local domain is not applied. Select the Attach button.
From my experience to date, multiple attempts may be necessary. When that fails, try disabling Debugging in the app service and re-enabling with saves in between. Also restarting the app service might assist.

Related

Windows "Insert Smart Card" pop-up appears when connecting to Active Directory using ldap_connect

Whenever the ldap_connect is attempted some users receive a "Insert Smart Card" pop-up box.
They have not logged in with a smart card in this session, but it appears that Windows certificate manager has cached certs from a previously used card.
Canceling the card prompt is causing failure with ldap_connect/ldap_bind, often no card is available to be presented.
This TechNet discussion seemed related, but ended only in 2 options
manually clear out certs
insert the smartcard
As ldap_connect is supposed to be indicating if the service is accessible, and we have a valid windows login with a session key that should have access to not only connect but authenticate for ldap_bind, the puzzle we have is why is it trying to do anything with a certificate at all
Is there a configuration that can be made so that AD LDAP doesn't try to use the cached cert for whatever it's using it for
LDAP API options?
Active directory LDAP service configuration?
Domain policy?

How to view a dash app created on a Ubuntu server without GUI (a VM instance in gcp)

I have an R script that uses Plotly Dash to create a web page. I am running the script on a VM instance in GCP which is a Ubuntu server without GUI. When the script is executed, it says,
start 127.0.0.1:8050
My question is how to access this web page on a browser from anywhere. Since the VM doesnt have a gui/browser I cannot even test my web page..
Anyone could explain what I am missing here or any way to deploy my web page and access from anywhere?
I am unsure how your application works, but that ending line shows that the server is running on localhost and on which port is it serving. So you may want to access from an external browser with the instance's ip address: like http:// xx.xxx.xx.xx:8050 and let's see if it works. Otherwise you may need to set up a Remote Desktop Setup through Chrome to enable a GUI interface on the VM.
Also remember to make sure that traffic is allowed on that port 8050 checking /creating the firewall rules
I encountered the same problem. You need to change the IP address on which the dash server is running to the internal IP address of your gcp VM instance. It usually starts with 10.xxx.x.x. You can find this internal address in the 'IP address' tab in the VPC networks section on the google cloud console. So do this:
app.run_server(host='10.xxx.x.x', port='8050')
Open a browser and browse to http://externalip:8050. Make sure you have your firewall rules set up correctly.
You should now be able to see the dash app.

Selenium chrome windows authentication

I am automating a webapplication which uses windows authentication to sign-in.
I am using selenium specflow c# and running my tests on teamcity which uses grid in turn on the build agent.
However each of my row in Examples under scenario outline is testing with a different user.
We are using before scenario hook to create the Remote webdriver instance which is context injected to all the step bindings. However, at this point it is assuming that the user is the logged in user on the hub .
If I am using hub/grid, I am able to test with only one user login as the website takes the user credentials of the logged in user on the hub.
To work around this, we have used credentials embedded in the url. This happens in the Given step much after the hooks run.
While Chrome stopped the support for url credentials, how do I impersonate the users logging into the browser connected via remoteweb driver.
I have explored using process to create webdriver process and passing the credentials. I am not sure if this is the right way.
Or how do I make Chrome prompt for user credentials and stop auto logging as the hub user.
Because of this we are unable to upgrade the Chrome version.
I have explored so much but did not find a conclusive solution.
Regards,
Vijaya

How to revive HttpClient after network connection has been restored?

How to revive HttpClient and make it see that the network is available again without fully restarting the application?
In case when a Xamarin.Forms app was launched with no network connection available and then later network connection is enabled, HttpClient.SendAsync(request) throws NameResolutionFailure and it does not recover, no matter how many times the request is repeated.
It seems, HttpClient does not know how to recover when network connection appears.
To reproduce the issue in Android emulator:
ensure your app is completely closed
turn network off (set Data status to Roaming in emulator settings or use the status bar to toggle the data or LTE switch).
launch your app, run a web request to verify that it does not work (obviously, you will need try/catch around the web request to avoid crashing)
while the app is still open, enable the network
run a web request - will get NameResolutionFailure
only full application restart will revive HttpClient
The issue does not happen if I use domain names specified in etc/hosts file.
I tried to fully recreate HttpClient and resend a new request when the issue occurs, but that does not help. Only full restart of the app helps.
Obviously, I cannot ask user to fully kill my app and start it again every time when user has turned on his network connection after launching my app.
This is a known issue. See:
Mono: https://bugzilla.xamarin.com/show_bug.cgi?id=45761
iOS: https://bugzilla.xamarin.com/show_bug.cgi?id=45763
Android: https://bugzilla.xamarin.com/show_bug.cgi?id=45383
The workaround is to manually set the DNS refresh:
System.Net.ServicePointManager.DnsRefreshTimeout = 0;

How to authenticate the user in offline mode in Azure Active Directory?

Am developing a Windows Store 8.1 app using C# and xaml.
In the app, Initially user will log in into the app using Azure Active directory single sign on log in(With Internet connection)
But how to authenticate the user in Azure Active Directory when the user is not connected to the internet?
I want my app to work in offline mode too..
How can i achieve this?
When you 'log in', there should be an artifact produced. In the case of OpenIdConnect there is an id_token, OAuth produces an AccessToken. If those are captured and stored securely, then there will be evidence that the user did authenticate to AAD at one time. The artifacts of that 'log in' have expiration times.
Backing up, when a user logs in, how is that identity used? Do you managed protected resources yourself OR do you reach out for them?
you can use SQL lite and save the user's details in it by encrypting it..
The next time when he logs into the app you can simple validate his credentials against his details from the DB like you would do in any website/webapp.
Side note : We have a service which runs in the background every 4 hours to check if the user's credentials have changed, if its changed fetches the new credentials and updates it in the local sql lite db