Application Insights not working - socket exception - windows-store-apps

I have added Application Insights inside my windows store application and in output i have lot of lines that exception was rised.
I have ApplicationInsight message:
Application Insights Telemetry: {"ver":1,"name":"Microsoft.ApplicationInsights.PageView",.............}
Exceptions like:
A first chance exception of type 'System.Net.WebException' occurred in mscorlib.dll
A first chance exception of type 'System.Net.WebException' occurred in System.dll
A first chance exception of type 'System.Net.InternalException' occurred in System.dll
A first chance exception of type 'System.Net.InternalException' occurred in System.dll
A first chance exception of type 'System.Net.WebException' occurred in mscorlib.dll
A first chance exception of type 'System.Net.WebException' occurred in mscorlib.dll
A first chance exception of type 'System.TimeoutException' occurred in Microsoft.ApplicationInsights.winmd
A first chance exception of type 'System.TimeoutException' occurred in mscorlib.dll
A first chance exception of type 'System.Net.InternalException' occurred in System.dll
A first chance exception of type 'System.Net.InternalException' occurred in System.dll
Exception message is:
Message "An attempt was made to access a socket in a way forbidden by its access permissions 23.101.68.210:443"
I really do not know what causing this exception. I tried turn off firewall but with no success. I try develop application in VS 2013 with update 4 and machine is with Windows 2012 R2
Thanks for suggestions.

If this is on a windows store app, have you turned on the capabilities in the manifest that allow the application to make outbound network requests?
see related:
An attempt was made to access a socket in a way forbidden by its access permissions
I had the team that owns the instructions update their page here: http://azure.microsoft.com/en-us/documentation/articles/app-insights-windows-monitor-usage-crashes/, so that if you're following those instructions, it calls out specifically to check this setting. (They investigated, and it seems that windows phone silverlight is the only template that has this setting off by default now, all the current templates have network access on by default?)

Related

Biztalk - MSMQ messages are being lost intermittently while receiving from queue in remote server

I keep receiving below warning messages in event viewer . If there is any message being received from the queue at the time of warning then message is being lost . Surprisingly while sending message to the queue he message is not getting lost . Biztalk ports are configured to send and receive message from queue .
The description for Event ID 5740 from source BizTalk Server cannot be found. Either the component that raises this event is not installed on your local computer or the installation is corrupted. You can install or repair the component on the local computer.
If the event originated on another computer, the display information had to be saved with the event.
The following information was included with the event:
MSMQ The remote procedure call failed and did not execute.
The handle is invalid
this is happening in production Can not afford more message loss.
there are some known issues, look at this thread :
https://social.msdn.microsoft.com/Forums/en-US/519e915a-488e-48bf-bd6c-8e5892689e83/failed-to-connect-to-remote-private-queue?forum=biztalkgeneral

War depl Tomcat server JDBC& Mysql err--I copied my driver to Tomcat/lib and build war file by making my dependency as provided. Getting error still

-May-2019 18:29:47.938 WARNING [http-nio-8080-exec-24] org.apache.catalina.loader.WebappClassLoaderBase.clearReferencesJdbc
The web application [SampleTest] registered the JDBC driver [com.mysql.cj.jdbc.Driver] but failed to unregister it when the web application was stopped. To prevent a memory leak, the JDBC Driver has been forcibly unregistered.
16-May-2019 18:29:47.939 WARNING [http-nio-8080-exec-24]
org.apache.catalina.loader.WebappClassLoaderBase.clearReferencesThreads The web application [SampleTest] appears to have started a thread named [mysql-cj-abandoned-connection-cleanup] but has failed to stop it.
This is very likely to create a memory leak. Stack trace of thread:
I copied my driver to Tomcat/lib and build war file by making my dependency as provided. Getting error still
SEVERE [http-nio-8080-exec-6]
org.apache.catalina.loader.WebappClassLoaderBase.checkThreadLocalMapForLeaks
The web application [enimmPartner] created a ThreadLocal with key of
type
[org.springframework.boot.SpringBootExceptionHandler.LoggedExceptionHandlerThreadLocal] (value [org.springframework.boot.SpringBootExceptionHandler$LoggedExceptionHandlerThreadLocal#11550dfc]) and a value of type [org.springframework.boot.SpringBootExceptionHandler] (value
[org.springframework.boot.SpringBootExceptionHandler#8864e34]) but failed to remove it when the web application was stopped. Threads are going to be renewed over time to try and avoid a probable memory
leak.

JDBC exception while connecting to remote database

I have a spring project which connects to remote MySQL database and displays data from it. The app was tested in Eclipse on tomcat localhost server and there were no problems. later on, I extracted the project in .war format and uploaded it on openshift.com server, and it worked for more than 2 weeks. But suddenly, now I get this error when I open it on that server:
HTTP Status 500 - Request processing failed; nested exception is java.lang.RuntimeException: com.mysql.jdbc.exceptions.jdbc4.CommunicationsException: Communications link failure
type Exception report
message Request processing failed; nested exception is java.lang.RuntimeException: com.mysql.jdbc.exceptions.jdbc4.CommunicationsException: Communications link failure
description The server encountered an internal error that prevented it from fulfilling this request.
exception
org.springframework.web.util.NestedServletException: Request processing failed; nested exception is java.lang.RuntimeException: com.mysql.jdbc.exceptions.jdbc4.CommunicationsException: Communications link failure
The last packet sent successfully to the server was 0 milliseconds ago. The driver has not received any packets from the server.
org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:894)
org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:778)
javax.servlet.http.HttpServlet.service(HttpServlet.java:620)
javax.servlet.http.HttpServlet.service(HttpServlet.java:727)
org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
I immediately opened the same project in Eclipse (connected to that online database) and there was no error. I extracted the app in new .war file and deleted the old one on the server and replaced it with new one. And guess what, still the same exception occurs.
So basically, I have one application, which connects to remote database, and it works fine when I run it on localhost, but suddenly does not work when I put it on some hosting server (it was working on that server for some good time which is weird).
What could have gone wrong?

Socket Exception when Connecting from Phone

I try to do an example about client-server Windows Phone app
but when I debug code, there is a error
An unhandled exception of type 'System.Net.Sockets.SocketException'
occurred in System.dll
Additional information: No connection could be made because the target
machine actively refused it
If there is a handler for this exception, the program may be safely
continued.
What should I do?
Try changing the port , the firewall may be blocking some of the ports associated with another applications.
For internal use you can use IP 127.0.0.1 , Port 5738
Best Regards,
Yaniv Jacob Jacob

Catching FTP Receive Connection Exceptions in BizTalk

I have a BizTalk demo connecting to an FTP server.
However, there are various exceptions that can occur such as:
The server may be unavailable
The username/password may change
File deletion after downloading may not work due to permissions etc.
These generate exceptions in the Error Log.
However, I can't see any easy way for me to handle these exceptions beyond
Writing a custom WMI adapter to poll the Error Log and try and match exceptions based on adapter name.
Using the Log functionality of the FTP adapter and parsing the log file for FTP exceptions.
Solutions on the internet seem to revolve around enabling "Failed Message Routing" or using the ESB Exception Handler. However, I believe both of these require actual messages, which there won't be if the adapter encounters an exception and fails to connect.
One possibility I've considered, but don't think is possible, is dynamically doing a "receive" in an orchestration, and catching exceptions there - is this possible?
If not, is there any way to catch an exception thrown by a receive adapter before messages are collected?
Thanks!
BizTalk will "handle" these exception cases by eventing an error and shutting down the receive location. This is normal and I think very reasonable behavior.
In this instance BizTalk has not stopped working. Other methods of receiving messages into the receive port will continue to work.
I am not sure what kind of handling you have in mind? There are plenty of ways you can monitor an event log.
What do you want to happen as a result of the exceptions?
In answer to your other question, you can "dynamically do a receive" by calling a .net component from an orchestration. You could have an orchestration which looped around an expression shape which "polled" the FTP server. In this case you would certainly have access to regular exception handling mechanisms.
PS. You are correct that failed message routing relies on there being a message. For example if an inbound message failed during pipeline processing.