Azure app insights are not working after the application is being deployed to Azure App Service - azureportal

Azure app insights are not working after the application is being deployed to Azure App Service but it's totally looking good on the local.
I have added the Instrumentation key on ApplicationInsights.config file that's being provided by the Azure App Service on the local app and saw the requests are logging on the portal.
In some articles, it suggests that we should not keep some DLLs like
Microsoft.ApplicationInsights.dll
Microsoft.AspNet.TelemetryCorrelation.dll
System.Diagnostics.DiagnosticSource.dll
But seems like it's essential for the App insights. I am not sure where I am missing. Could anyone of you guide me on this?

Here are few reasons and solutions that you can have a look why application insights aren't working after deployment.
SCENARIO - 1
Disabled Application insights on portal
Like #Vinez mentioned You can enable them from your appinsights overview page. Scroll down on the same page to see the left pane that shows an option of Application Insights and then “Turn On Application Insights”.
SCENARIO - 2
Missing AppInsights settings
You can navigate to Configuration -> Application settings and check if the appinsights settings (i.e.. APPINSIGHTS_INSTRUMENTATIONKEY, APPLICATIONINSIGHTS_CONNECTION_STRING, ApplicationInsightsAgent_EXTENSION_VERSION, XDT_MicrosoftApplicationInsights_Mode) have been added or not with appropriate values.
SCENARIO - 3
ApplicationInsights.Config not deployed with the application.
You can go to App Service Editor (preview) and check whether the AppInsights.config file is being deployed.
You can check this similar thread which deals with build and publish.
SCENARIO - 4
Due to restricted firewall.
Please try checking Enable Azure Application Insights on the VM-Series Firewall
Further you can log the traces and act accodingly using perfview.
REFERENCES :
App Insights for web application not working when deployed to Dev server
Troubleshooting no data - Application Insights for .NET.

Related

Deploy create-react-app on Azure App services

I am new to React and created a simple react app using create-react-app , it builds and runs fine on local. I created a Azure Build and release pipelines and tried deploying using App Services , refereed below Microsoft link to implement the same.
https://devblogs.microsoft.com/premier-developer/deploying-react-apps-to-azure-with-azure-devops/
Build and release pipeline runs successfully however when I click the Azure app services link to access the react app, I receive below message :-(
"This react-naturalone.azurewebsites.net page can’t be found
No web page was found for the web address: https://react-naturalone.azurewebsites.net/
HTTP ERROR 404"
Can someone please suggest what I am missing.
fyi, I am using react-router, hence added the web.config as mentioned in the link above.
Thanks
AOU
I'm thinking that there is a problem with your deployment pipeline. The first step for your here is to go to your Azure portal and open up your app service. From your app service, go to -->Development tools --> App service editor.
Do you see your code inside it? If you don't, you can confirm that the code didn't deploy correctly. If you do, then you have a misconfiguration somewhere in your app that is preventing anybody from seeing it.

Replacing the existing Project on Google Cloud Platform

I have deployed a Java Web application on Google Cloud platform and have purchased a domain and SSL Certificate from GoDaddy.com.
Its a simple application with a login page and a registration, where a specific(only one user) will have login credentials and post login will submit a form which will be saved in google DATASTORE in Google Cloud Platform(GCP).
I have two queries here :
1)
My application works perfectly,on my machine and even few machines around my home (as i have verified in few cyber centres around) but not at a client place located in different city(150 miles away). I'm not sure,as the client is not running any firewall or any browser plugin, as i have not visited the client place yet.
The call is as below.
Domain purchased from godaddy.com is : "ABC.in"
App engine project linked to this domain is : "web-abc"
If we hit "ABC.in" in browser it will in-turn call "web-abc.appspot.com".
in the background.Now though the login page loads,the client complains that the next subsequent pages does not load and page becomes blank.But for me in my system it works perfectly,as i can see the updated DATASTORE in GCP.
2)
Once i configure my DNS at GoDaddy.com, i'm unable to make any changes to the project hosted on GCP app engine.So i decided to create a new project and host it on the GCP. But GCP app engine page does not show any option to replace a project as it showed me during my first project setup.
I need to replace project "web-abc" linked to "ABC.in" with "web-pqr".
Please Please help...!
Thanks
To answer your second query you can just rest your CNAME record in the GODADDY DNS configuration and add the web-pqr reqq. That should work. Rest of the question< i really don't get it. Please share some error message or the screenshot when you try make change to your exiting project.

MVC File Download asking for Authentication

I encountered a weird scenario. I have created an MVC2 Application and deployed it to IIS7, to 2 web sites (Default Web Site and another manually created "Test Web Site" ... they are using different application pools targeting v2.0). I am using SQL 2008 R2 Filestream feature to store files.
The problem I have is that I have a feature where the user browsing the site can download a document. The document is created in the server and the server then streams that to the client. The problem is, Default Web Site asks for authentication when user tries to download.
This doesn't happen for Test Web Site and it downloads fine.
Now, I do not have a clue what setting I need to change? The only different things I recall is that I manually created Test Web Site compared to just reusing the Default Web Site and also that I allowed inbound connections to Test Web Site (it was on port 8080).
What are the configurations needed to change so that user can download files from Default Web Site without going through authentication?
Try changing authentication settings in IIS Site->Authentication->Anonymous Authentication set to Enable
Turns out it was conflicting with the SQL Server Reports Manager.
Found this out from here: source

Issue authorizing access with google analytics super proxy

I'm setting up google analytics super proxy to create some public queries on my google analytics data. I have followed the instructions given in the below link to setup a analytics super proxy in app engine:
https://developers.google.com/analytics/solutions/google-analytics-super-proxy
I have followed the steps specified, enabling access for analytics api and creating a client ID for the super proxy web application deployed in app engine. I updated the required properties in the app.yaml and config.py files in the super proxy and deployed it to app engine.
I'm able to open the admin page of the deployed super proxy, but when I try to authorize access, I get the an error saying 'invalid_client' (although the client id seems to match with the one I created in developer console):
I'm unable to figure out what has gone wrong, or if I've missed something? Can you please help?
Regards,
Anand
Go to the Dev Console -> Your Project -> APIs & auth -> Consent screen. Make sure all the non optional fields are filed in (specifically in your case PRODUCT NAME).

An API for creating and managing Google Cloud Console projects?

I believe there is an undocumented Google API available to create and manage Google Cloud Console (and App Engine) projects on behalf of third party users.
Does anyone know how to use it?
I think older versions of the Google Eclipse Plugin obtained an OAuth2 token in the (undocumented) scope https://www.googleapis.com/auth/appengine.admin, and this allowed it to generate a Cloud Console project on your behalf. The latest version doesn't seem to do this. App Engine's own appcfg.py also uses this scope, but doesn't seem to do much more than deploy the code - I'm looking to change core settings for the project, such as Name, Redirect URLs, and Web Origins.
Any information would be appreciated.
I maintain a WordPress plugin providing secure Google Apps Login for end users, and currently have to give detailed instructions to admins for creating a new Cloud Console project manually, and entering settings such as Redirect URL. Ideally, I would create a simple on-line service to do all of this for them.
Thank you!
It is possible to programmatically create a new Developer Console project on behalf of a Google Account (yes, you read that right). You do so in a very roundabout way:
Request the https://www.googleapis.com/auth/drive.scripts scope from the user (standard OAuth 2.0 flow).
Use the Drive API's drive.insert method to create a new file with a mimetype of application/vnd.google-apps.script.
Somehow try to get the project ID, maybe by uploading some Apps Script code? This is the part that I was never able to figure out.
A little known fact is that every Google Apps Script project has a hidden Developer Console project associated with it. This project is not shown in the list of projects, but it does exist. It is created automatically when the user starts a new Apps Script project, and the drive.insert method is enough to cause this to happen.
How do you get to the hidden project? Well, the only way I know of is to open the Apps Script project from the Drive website, open the "Resources > Advanced Google Services" dialog, and click the link to the Developer Console. You'll find the project ID in the URL.
Aside from not being shown in your list of projects and not being able to use App Engine, this is a normal Developer Console project. You can add additional OAuth client credentials, service accounts, Compute Engine instances, etc. And of course once you have a project ID, all of the various management APIs will work: creating new virtual machines, making use of a service account's impersonation ability, etc.

Resources