WinHttpException: A connection with the server could not be established - asp.net-core

I have asp.net core application with identity server... when i try to run getting below error message.
WinHttpException: A connection with the server could not be established
System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
HttpRequestException: An error occurred while sending the request.
System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
IOException: IDX10804: Unable to retrieve document from: 'http://localhost:5000/.well-known/openid-configuration'.
Microsoft.IdentityModel.Protocols.HttpDocumentRetriever+d__8.MoveNext()
InvalidOperationException: IDX10803: Unable to obtain configuration from: 'http://localhost:5000/.well-known/openid-configuration'.
Microsoft.IdentityModel.Protocols.ConfigurationManager+d__24.MoveNext()

I have to run the Identity server application along with web application to connect with Identity server project.
As I'm not running IDP i got connection establish error :
"A connection with the server could not be established"

Related

.net application hosted on azure stopped working & exception occurred [Win32Exception (0x80004005): Access is denied] [SqlException (0x80131904):

My .NET site is hosted on azure and working fine but suddenly it get stopper and below error occurred.
Please confirm below:
1.Is the issue from azure side
2. or from SQL side
3. how I can resolve this.
Stack Trace:
[Win32Exception (0x80004005): Access is denied]
[SqlException (0x80131904): A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessible. Verify that the instance name is correct and that SQL Server is configured to allow remote connections. (provider: Named Pipes Provider, error: 40 - Could not open a connection to SQL Server)]
HomePage.btn_Search_Click(Object sender, EventArgs e) +1526
<Page_Load>d__2.MoveNext() +745
System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() +32
System.Web.Util.SynchronizationHelper.SafeWrapCallback(Action action) +114
System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() +32
System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) +62
System.Web.Util.WithinCancellableCallbackTaskAwaiter.GetResult() +33
System.Web.UI.<LoadRecursiveAsync>d__246.MoveNext() +492
System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() +32
System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) +62
System.Web.Util.WithinCancellableCallbackTaskAwaiter.GetResult() +33
System.Web.UI.<ProcessRequestMainAsync>d__523.MoveNext() +6951
The errors reported in the question are not related to Azure Web App itself. It could be or could not be related to the DB itself. The error is mainly for connectivity failure i.e., the application code is not able to establish connection with DB.
The first step here would be isolate the issue:
1. Is it related to DB itself? - Depending on where the DB is hosted and the type of DB (Microsoft SQL, mySql etc.), verify its status and try connecting to it using any of the tools available. For example, in the case of Microsoft Azure/SQL Server, you might use sqlcmd tool or SQL Server Management Studio can be used for this purpose.
2. Is the webApps trying to connect to the correct SQL DB? - Once you have verified that the DB is up and running, the next step would be to ensure that you web application is connecting to correct DB. The connection string used to specify this db in application will have to be checked to ensure that there are no errors in server/db/userId/Password etc.
3. Is it related to connectivity/permission - If everything is verified to be fine based on the points above, the next step would be to ensure that the web app is able to reach out to db (there are no network/permission issues). Looking at the logs on SQL Server itself could provide some insights. For example, for Microsoft SQL Server (hosted on Windows Server), in EventViewer\Application logs, you would see event 18456 if there is a login issue - which would mean that the connectivity is fine, but the authentication method used is failing. In this case, you will have to assign correct permission to the identity/userid which is being used by webApp for connecting to the SQL Server.
In case the issue is related to network itself, i.e., the requests are not even reaching out to DB, depending on where the SQL Server is hosted you can perform the following:
Verify that the server is configured to allow remote connections. For Azure SQL DB you can refer to this link, if you are always getting an error.
If this error occasionally, it could be a transient issue and this link should help you.
Check the SQL Server error log for more information about the error.

How do I fix an "ERROR_PROXY_GATEWAY" error while deploying with Azure App Service deployment in combination with -useCHECKSUM

I have setup a self hosted release agent for releasing my software to an Isolated App Service. If I deploy this using the Azure App Service deployment task (V4), this works just fine. I want to use the -useCHECKSUM option but this breaks the release. I get an error stating: "Error: The remote server returned an error: (502) Bad Gateway."
I have tried google-ing for the error but I could not find any relation between the parameter and the Error. I suspect the -useCHECKSUM is using a different route to deploy the Application but I cannot find out what it is using.
More Information: Could not connect to the remote computer ("xxxxxxx") using the specified process ("Web Management Service"). This can happen if a proxy server is interrupting communication with the destination server. Disable the proxy server and try again. Learn more at: http://go.microsoft.com/fwlink/?LinkId=221672#ERROR_PROXY_GATEWAY.
Error: The remote server returned an error: (502) Bad Gateway.
Error count: 1.
2019-07-31T08:38:16.5670711Z ##[debug]task result: Failed
2019-07-31T08:38:16.5680985Z ##[error]Error: Error Code: ERROR_PROXY_GATEWAY

IBM MobileFirst 6.3 :Failed to obtain JMX connection to access an MBean

When I tried to deploy my projects running on IBM MobileFirst 6.3 using JDK1.7 I am getting the following error in MobileFirst Server console in Eclipse kepler SR2:
[ERROR ] Failed to obtain JMX connection to access an MBean. There
might be a JMX configuration error: Connection refused: connect
[ATTENTION] No running mxbeans found
and also I get this error message shown in the MobileFirst console:
FWLSE3030E: The runtime "myproject" does not exist in the Worklight
administration database. The database may be corrupted.
Everything was just working fine till this error appears with all my projects .
I tried to create a new project but I get the same error each time.
I even tried to delete the MobileFirst development server and add it again but nothing is changed.
Full log:
Application Error SRVE0777E: Exception émise par la classe
d'application
'com.worklight.core.auth.impl.AuthenticationFilter.isWaitingForSynchronization:607'
javax.servlet.ServletException: java.lang.RuntimeException: Timeout
while waiting for the management service to start up.120 secs.
at
com.worklight.core.auth.impl.AuthenticationFilter.isWaitingForSynchronization(AuthenticationFilter.java:607)
at
com.worklight.core.auth.impl.AuthenticationFilter.doFilter(AuthenticationFilter.java:144)
at
com.ibm.ws.webcontainer.filter.FilterInstanceWrapper.doFilter(FilterInstanceWrapper.java:194)
at [internal classes]
Caused by: java.lang.RuntimeException: Timeout while waiting for the
management service to start up.120 secs.
at
com.worklight.core.init.WorklightServletInitializer$1.run(WorklightServletInitializer.java:121)
at java.lang.Thread.run(Thread.java:745)
these is another error that appears in the eclipse console when i tried to run it on the Mobilefirst developpement server
[ERROR ] FWLSE3000E: A server error was detected.
FWLSE3012E: JMX connection error. Reason: "FWLSE3012E: JMX connection
error. Reason: "Connection refused: connect". Check the application
server logs for details.". Check the application server logs for
details.
[ERROR ] FWLSE0242E: Failed to synchronize application runtime
information. The servlet initialization failed and the servlet will
deny service due to a failure to communicate with the worklightadmin
service.
Common reasons are that the worklightadmin service is not started
correctly or that the ibm.worklight.admin.environmentid property has
not the same value for the worklightadmin service and the runtime.
[project myproject] Timeout while waiting for the management service
to start up.120 secs.
here is a the error log :
Application Error
SRVE0777E: Exception émise par la classe d'application 'com.worklight.core.auth.impl.AuthenticationFilter.isWaitingForSynchronization:607'
javax.servlet.ServletException: java.lang.RuntimeException: Timeout while waiting for the management service to start up.120 secs.
at com.worklight.core.auth.impl.AuthenticationFilter.isWaitingForSynchronization(AuthenticationFilter.java:607)
at com.worklight.core.auth.impl.AuthenticationFilter.doFilter(AuthenticationFilter.java:144)
at com.ibm.ws.webcontainer.filter.FilterInstanceWrapper.doFilter(FilterInstanceWrapper.java:194)
at [internal classes]
Caused by: java.lang.RuntimeException: Timeout while waiting for the management service to start up.120 secs.
at com.worklight.core.init.WorklightServletInitializer$1.run(WorklightServletInitializer.java:121)
at java.lang.Thread.run(Thread.java:745)
these is another error that appears in the eclipse console when i tried to run it on the Mobilefirst developpement server
[ERROR ] FWLSE3000E: A server error was detected.
FWLSE3012E: JMX connection error. Reason: "FWLSE3012E: JMX connection error. Reason: "Connection refused: connect". Check the application server logs for details.". Check the application server logs for details.
[ERROR ] FWLSE0242E: Failed to synchronize application runtime information. The servlet initialization failed and the servlet will deny service due to a failure to communicate with the worklightadmin service.
Common reasons are that the worklightadmin service is not started correctly or that the ibm.worklight.admin.environmentid property has not the same value for the worklightadmin service and the runtime. [project myproject]
Timeout while waiting for the management service to start up.120 secs.
See this tech note: The Worklight Development Server times out.
Steps:
Open the Servers view.
Double-click the Worklight Development Server to open the Overview pane.
Expand the Timeouts section.
Increase the value in the Start (in seconds) field. The value that can be appropriate for your case depends on your startup environment. Consider starting with a value of 180 seconds (3 minutes).

Cannot connect to SQL Server 2012 database remotely

Was able to connect to my SQL Server 2012 database using localhost with no problem storing it in the App_Data folder. My connection string was...
Data Source=(LocalDB)\v11.0;AttachDbFilename=|DataDirectory|\bookingsandpreorders.mdf;Integrated Security=True
However when I hosted my site on another/remote server I got the following error:
Server Error in '/' Application.
The system cannot find the file specified
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: System.ComponentModel.Win32Exception: The system cannot find the file specified
I thought it may be the connection string after looking at connection strings.com so I tried...
Server=.\SQLExpress;AttachDbFilename=|DataDirectory|\bookingsandpreorders.mdf;Database=bookingsandpreorders.mdf;
However now I just get another error...
Server Error in '/' Application.
A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessible. Verify that the instance name is correct and that SQL Server is configured to allow remote connections. (provider: SQL Network Interfaces, error: 26 - Error Locating Server/Instance Specified)
I've watched and read a seemingly endless amount about this error mainly involving configuring firewall, tcp port... all of which have made no difference.
I think I've made a rookie error as I've not got much experience with SQL Server Express. any suggestions?

SQL Network Interfaces, error: 26 - Error Locating Server

I hope someone can help me with this. I have differente projects (websites) in Visual Studio 2010. Today when I try to expand one of the databases in the data connections of the server explorer, I get a window with this error:
A network-related or instance-specific error occurred while
establishing a connection to SQL Server. The server was not found or
was not accessible. Verify that the instance name is correct and that
SQL Server is configured to allow remote connections. (provider: SQL
Network Interfaces, error: 26 - Error Locating Server/Instance
Specified) Description: An unhandled exception occurred during the
execution of the current web request. Please review the stack trace
for more information about the error and where it originated in the
code.
Exception Details: System.Data.SqlClient.SqlException: A
network-related or instance-specific error occurred while establishing
a connection to SQL Server. The server was not found or was not
accessible. Verify that the instance name is correct and that SQL
Server is configured to allow remote connections. (provider: SQL
Network Interfaces, error: 26 - Error Locating Server/Instance
Specified)
Source Error:
An unhandled exception was generated during the execution of the
current web request. Information regarding the origin and location of
the exception can be identified using the exception stack trace below.
The situation occurs in ALL my projects. I suppose this happens because I installed Kaspersky 2012 yesterday. Please I need help.
May be installing Kaspersky stopped SQL Server service.
Type services.msc in run dialog box to open services panel .
Make sure SQL Server service has status as Started .
If not , right click on SQL Server and select start.
Of course this is if you are using Windows .
I think the problem is with your firewall. Here is something you can do to remove this error:
http://blog.sqlauthority.com/2009/05/21/sql-server-fix-error-provider-named-pipes-provider-error-40-could-not-open-a-connection-to-sql-server-microsoft-sql-server-error/