Randomly WebJob will failed - azure

I used Web Jobs for running my function continuously in background, its working fine in local machine and azure. But randomly this web job will failed and gives the error looks like below.
Microsoft.Azure.WebJobs.Host.FunctionInvocationException: Exception while executing function: Functions.ImportVehicles ---> 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: Named Pipes Provider, error: 40 - Could not open a connection to SQL Server) ---> System.ComponentModel.Win32Exception: The system cannot find the file specified --- End of inner exception stack trace --- at System.Data.SqlClient.SqlInternalConnectionTds..ctor(DbConnectionPoolIdentity identity, SqlConnectionString connectionOptions, SqlCredential credential, Object providerInfo, String newPassword, SecureString newSecurePassword, Boolean redirectedUserInstance, SqlConnectionString userConnectionOptions, SessionData reconnectSessionData, DbConnectionPool pool, String accessToken, Boolean applyTransientFaultHandling) at System.Data.SqlClient.SqlConnectionFactory.CreateConnection(DbConnectionOptions options, DbConnectionPoolKey poolKey, Object poolGroupProviderInfo, DbConnectionPool pool, DbConnection owningConnection, DbConnectionOptions userOptions) at System.Data.ProviderBase.DbConnectionFactory.CreatePooledConnection(DbConnectionPool pool, DbConnection owningObject, DbConnectionOptions options, DbConnectionPoolKey poolKey, DbConnectionOptions userOptions) at
This above exception occurs randomly and not able to get/reproduce it every time.
I know that the error would seem to indicate that this is a transient connection issue between Azure and SQL. However, I have configured the data context to use the SqlAzureExecutionStrategy which should be handling dropped connections.

The SqlAzureExecutionStrategy will retry the operation on TimeoutException and SqlException if the Errors contains any of the following error numbers: 40613, 40501, 40197, 10929, 10928, 10060, 10054, 10053, 233, 64 and 20. (from documentation)
The errornumber you are getting is Error 40. This is probably since you're using Named Pipes instead of TCP/IP connections. I suggest you switch to using TCP/IP (by adding tcp: in front of your connectionstring) and try again.

From the stack trace (correct me if I'm wrong), it looks like you're using plain ol' ADO.NET to connect to and interact with your Azure SQL Database. If that is the case, then the SqlAzureExecutionStrategy does NOT come into play because with ADO.NET, there is no automatic retry due to transient failures.
Transient failures can (and will) occur. You need to use a retry policy to make sure that your app can handle them. There's a few options out there. My personal favorite is just to use Entity Framework. You'll have to check the version number to be sure, but I believe automatic retry was introduced in v6.

Related

ASP.NET Core 6 API deployed to Azure w/F1 free App Plan: returns 500

I have a ASP.NET Core 6 API deployed to Azure using the F1 free App Plan. Calling any endpoint returns a status code of 500.
I used the Log stream feature. Below my signature I will post the whole thing but the highlights are these:
IIS was not able to access the web.config file for the Web site
The authenticated user does not have permission to use this DLL.
Install the .NET Extensibility feature if the request is mapped to a managed handler
My ASP.NET Core 6 API does not have a web.config file at all. It has appsettings.json file but not web.config file. Should I add one?
Below my sig I will add the full log. I appreciate any help!
Thanks, Dan
2022-11-08T14:52:02 Welcome, you are now connected to log-streaming service. The default timeout is 2 hours. Change the timeout with the App Setting SCM_LOGSTREAM_TIMEOUT (in seconds).
IIS Detailed Error - 500.0 - Internal Server Error
HTTP Error 500.0 - Internal Server Error
The page cannot be displayed because an internal server error has occurred.
Most likely causes:
IIS received the request; however, an internal error occurred during the processing of the request. The root cause of this error depends on which module handles the request and what was happening in the worker process when this error occurred.
IIS was not able to access the web.config file for the Web site or application. This can occur if the NTFS permissions are set incorrectly.
IIS was not able to process configuration for the Web site or application.
The authenticated user does not have permission to use this DLL.
The request is mapped to a managed handler but the .NET Extensibility Feature is not installed.
Things you can try:
Ensure that the NTFS permissions for the web.config file are correct and allow access to the Web server's machine account.
Check the event logs to see if any additional information was logged.
Verify the permissions for the DLL.
Install the .NET Extensibility feature if the request is mapped to a managed handler.
Create a tracing rule to track failed requests for this HTTP status code. For more information about creating a tracing rule for failed requests, click here.
Detailed Error Information:
Module AspNetCoreModuleV2Notification ExecuteRequestHandlerHandler aspNetCoreError Code 0x00000000 Requested URL https://FlowCastApi20221108072930:80/api/cohortPhysical Path C:\home\site\wwwroot\api\cohortLogon Method AnonymousLogon User Anonymous
More Information:
This error means that there was a problem while processing the request. The request was received by the Web server, but during processing a fatal error occurred, causing the 500 error.
View more information ยป
Microsoft Knowledge Base Articles:
2022-11-08 14:52:09.840 +00:00 [Error] Microsoft.EntityFrameworkCore.Database.Connection: An error occurred using the connection to database 'flowcast-dev' on server 'tcp:greenshoes-dev.database.windows.net,1433'.
2022-11-08 14:52:09.853 +00:00 [Error] Microsoft.EntityFrameworkCore.Query: An exception occurred while iterating over the results of a query for context type 'FlowCastApi.Model.DataContext'.Microsoft.Data.SqlClient.SqlException (0x80131904): Cannot open server 'greenshoes-dev' requested by the login. Client with IP address '20.49.104.46' is not allowed to access the server. To enable access, use the Windows Azure Management Portal or run sp_set_firewall_rule on the master database to create a firewall rule for this IP address or address range. It may take up to five minutes for this change to take effect.at Microsoft.Data.ProviderBase.DbConnectionPool.CheckPoolBlockingPeriod(Exception e)at Microsoft.Data.ProviderBase.DbConnectionPool.CreateObject(DbConnection owningObject, DbConnectionOptions userOptions, DbConnectionInternal oldConnection)at Microsoft.Data.ProviderBase.DbConnectionPool.UserCreateRequest(DbConnection owningObject, DbConnectionOptions userOptions, DbConnectionInternal oldConnection)at Microsoft.Data.ProviderBase.DbConnectionPool.TryGetConnection(DbConnection owningObject, UInt32 waitForMultipleObjectsTimeout, Boolean allowCreate, Boolean onlyOneCheckConnection, DbConnectionOptions userOptions, DbConnectionInternal& connection)at Microsoft.Data.ProviderBase.DbConnectionPool.WaitForPendingOpen()--- End of stack trace from previous location ---at Microsoft.EntityFrameworkCore.Storage.RelationalConnection.OpenInternalAsync(Boolean errorsExpected, CancellationToken cancellationToken)at Microsoft.EntityFrameworkCore.Storage.RelationalConnection.OpenInternalAsync(Boolean errorsExpected, CancellationToken cancellationToken)at Microsoft.EntityFrameworkCore.Storage.RelationalConnection.OpenAsync(CancellationToken cancellationToken, Boolean errorsExpected)at Microsoft.EntityFrameworkCore.Storage.RelationalCommand.ExecuteReaderAsync(RelationalCommandParameterObject parameterObject, CancellationToken cancellationToken)at Microsoft.EntityFrameworkCore.Query.Internal.SingleQueryingEnumerable`1.AsyncEnumerator.InitializeReaderAsync(AsyncEnumerator enumerator, CancellationToken cancellationToken)at Microsoft.EntityFrameworkCore.SqlServer.Storage.Internal.SqlServerExecutionStrategy.ExecuteAsync[TState,TResult](TState state, Func`4 operation, Func`4 verifySucceeded, CancellationToken cancellationToken)at Microsoft.EntityFrameworkCore.Query.Internal.SingleQueryingEnumerable`1.AsyncEnumerator.MoveNextAsync()ClientConnectionId:ec461d75-6cc2-4508-9541-47d546a25d0dError Number:40615,State:1,Class:14ClientConnectionId before routing:f9b3f656-f418-4e09-ac95-a3ab8ace69a6Routing Destination:e194283991a1.tr29051.eastus1-a.worker.database.windows.net,11042Microsoft.Data.SqlClient.SqlException (0x80131904): Cannot open server 'greenshoes-dev' requested by the login. Client with IP address '20.49.104.46' is not allowed to access the server. To enable access, use the Windows Azure Management Portal or run sp_set_firewall_rule on the master database to create a firewall rule for this IP address or address range. It may take up to five minutes for this change to take effect.at Microsoft.Data.ProviderBase.DbConnectionPool.CheckPoolBlockingPeriod(Exception e)at Microsoft.Data.ProviderBase.DbConnectionPool.CreateObject(DbConnection owningObject, DbConnectionOptions userOptions, DbConnectionInternal oldConnection)at Microsoft.Data.ProviderBase.DbConnectionPool.UserCreateRequest(DbConnection owningObject, DbConnectionOptions userOptions, DbConnectionInternal oldConnection) at Microsoft.Data.ProviderBase.DbConnectionPool.TryGetConnection(DbConnection owningObject, UInt32 waitForMultipleObjectsTimeout, Boolean allowCreate, Boolean onlyOneCheckConnection, DbConnectionOptions userOptions, DbConnectionInternal& connection)at Microsoft.Data.ProviderBase.DbConnectionPool.WaitForPendingOpen()--- End of stack trace from previous location ---at Microsoft.EntityFrameworkCore.Storage.RelationalConnection.OpenInternalAsync(Boolean errorsExpected, CancellationToken cancellationToken)at Microsoft.EntityFrameworkCore.Storage.RelationalConnection.OpenInternalAsync(Boolean errorsExpected, CancellationToken cancellationToken)at Microsoft.EntityFrameworkCore.Storage.RelationalConnection.OpenAsync(CancellationToken cancellationToken, Boolean errorsExpected)at Microsoft.EntityFrameworkCore.Storage.RelationalCommand.ExecuteReaderAsync(RelationalCommandParameterObject parameterObject, CancellationToken cancellationToken)at Microsoft.EntityFrameworkCore.Query.Internal.SingleQueryingEnumerable`1.AsyncEnumerator.InitializeReaderAsync(AsyncEnumerator enumerator, CancellationToken cancellationToken)at Microsoft.EntityFrameworkCore.SqlServer.Storage.Internal.SqlServerExecutionStrategy.ExecuteAsync[TState,TResult](TState state, Func`4 operation, Func`4 verifySucceeded, CancellationToken cancellationToken)at Microsoft.EntityFrameworkCore.Query.Internal.SingleQueryingEnumerable`1.AsyncEnumerator.MoveNextAsync()ClientConnectionId:ec461d75-6cc2-4508-9541-47d546a25d0dError Number:40615,State:1,Class:14ClientConnectionId before routing:f9b3f656-f418-4e09-ac95-a3ab8ace69a6Routing Destination:e194283991a1.tr29051.eastus1-a.worker.database.windows.net,11042
2022-11-08 14:52:09.872 +00:00 [Error] Microsoft.AspNetCore.Server.IIS.Core.IISHttpServer: Connection ID "15204152343613408971", Request ID "800006cc-0000-d300-b63f-84710c7967bb": An unhandled exception was thrown by the application.Microsoft.Data.SqlClient.SqlException (0x80131904): Cannot open server 'greenshoes-dev' requested by the login. Client with IP address '20.49.104.46' is not allowed to access the server. To enable access, use the Windows Azure Management Portal or run sp_set_firewall_rule on the master database to create a firewall rule for this IP address or address range. It may take up to five minutes for this change to take effect.at Microsoft.Data.ProviderBase.DbConnectionPool.CheckPoolBlockingPeriod(Exception e)at Microsoft.Data.ProviderBase.DbConnectionPool.CreateObject(DbConnection owningObject, DbConnectionOptions userOptions, DbConnectionInternal oldConnection)at Microsoft.Data.ProviderBase.DbConnectionPool.UserCreateRequest(DbConnection owningObject, DbConnectionOptions userOptions, DbConnectionInternal oldConnection)at Microsoft.Data.ProviderBase.DbConnectionPool.TryGetConnection(DbConnection owningObject, UInt32 waitForMultipleObjectsTimeout, Boolean allowCreate, Boolean onlyOneCheckConnection, DbConnectionOptions userOptions, DbConnectionInternal& connection)at Microsoft.Data.ProviderBase.DbConnectionPool.WaitForPendingOpen()--- End of stack trace from previous location ---at Microsoft.EntityFrameworkCore.Storage.RelationalConnection.OpenInternalAsync(Boolean errorsExpected, CancellationToken cancellationToken)at Microsoft.EntityFrameworkCore.Storage.RelationalConnection.OpenInternalAsync(Boolean errorsExpected, CancellationToken cancellationToken)at Microsoft.EntityFrameworkCore.Storage.RelationalConnection.OpenAsync(CancellationToken cancellationToken, Boolean errorsExpected)at Microsoft.EntityFrameworkCore.Storage.RelationalCommand.ExecuteReaderAsync(RelationalCommandParameterObject parameterObject, CancellationToken cancellationToken)at Microsoft.EntityFrameworkCore.Query.Internal.SingleQueryingEnumerable`1.AsyncEnumerator.InitializeReaderAsync(AsyncEnumerator enumerator, CancellationToken cancellationToken)at Microsoft.EntityFrameworkCore.SqlServer.Storage.Internal.SqlServerExecutionStrategy.ExecuteAsync[TState,TResult](TState state, Func`4 operation, Func`4 verifySucceeded, CancellationToken cancellationToken)at Microsoft.EntityFrameworkCore.Query.Internal.SingleQueryingEnumerable`1.AsyncEnumerator.MoveNextAsync()at Microsoft.EntityFrameworkCore.EntityFrameworkQueryableExtensions.ToListAsync[TSource](IQueryable`1 source, CancellationToken cancellationToken)at Microsoft.EntityFrameworkCore.EntityFrameworkQueryableExtensions.ToListAsync[TSource](IQueryable`1 source, CancellationToken cancellationToken)at FlowCastApi.Controllers.BaseController`1.GetAllAsync(Int32 count, Int32 skip, String searchTerm, String sortBy) in C:\_source\Greenshoes\api_dotnet\FlowCastApi\Controllers\Base\BaseController.cs:line 41at lambda_method5(Closure , Object )at Microsoft.AspNetCore.Mvc.Infrastructure.ActionMethodExecutor.AwaitableObjectResultExecutor.Execute(IActionResultTypeMapper mapper, ObjectMethodExecutor executor, Object controller, Object[] arguments)at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.g__Awaited|12_0(ControllerActionInvoker invoker, ValueTask`1 actionResultValueTask)at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.g__Awaited|10_0(ControllerActionInvoker invoker, Task lastTask, State next, Scope scope, Object state, Boolean isCompleted)at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.Rethrow(ActionExecutedContextSealed context)at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.Next(State& next, Scope& scope, Object& state, Boolean& isCompleted)at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.g__Awaited|13_0(ControllerActionInvoker invoker, Task lastTask, State next, Scope scope, Object state, Boolean isCompleted)at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.g__Awaited|20_0(ResourceInvoker invoker, Task lastTask, State next, Scope scope, Object state, Boolean isCompleted)at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.g__Awaited|17_0(ResourceInvoker invoker, Task task, IDisposable scope)at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.g__Awaited|17_0(ResourceInvoker invoker, Task task, IDisposable scope)at Microsoft.AspNetCore.Routing.EndpointMiddleware.g__AwaitRequestTask|6_0(Endpoint endpoint, Task requestTask, ILogger logger)at Microsoft.AspNetCore.Authorization.AuthorizationMiddleware.Invoke(HttpContext context)at Microsoft.AspNetCore.Authentication.AuthenticationMiddleware.Invoke(HttpContext context)at Microsoft.AspNetCore.Server.IIS.Core.IISHttpContextOfT`1.ProcessRequestAsync()ClientConnectionId:ec461d75-6cc2-4508-9541-47d546a25d0dError Number:40615,State:1,Class:14ClientConnectionId before routing:f9b3f656-f418-4e09-ac95-a3ab8ace69a6Routing Destination:e194283991a1.tr29051.eastus1-a.worker.database.windows.net,11042
I have created ASP.Net CORE Web API and deployed to Azure App service. Able to access the endpoint without any issues.
Make sure you have checked the below options while creating the App.
My Program.cs
var builder = WebApplication.CreateBuilder(args);
builder.Services.AddControllers();
builder.Services.AddEndpointsApiExplorer();
builder.Services.AddSwaggerGen();
builder.Services.ConfigureSwaggerGen(setup =>
{
setup.SwaggerDoc("v1", new Microsoft.OpenApi.Models.OpenApiInfo
{
Title = "Weather Forecasts",
Version = "v1"
});
});
var app = builder.Build();
if (app.Environment.IsDevelopment())
{
app.UseSwagger();
app.UseSwaggerUI();
}
app.UseHttpsRedirection();
app.UseAuthorization();
app.MapControllers();
app.Run();
In Azure Portal => API Management service => API's, check whether you can see the created API.
My ASP.NET Core 6 API does not have a web.config file at all. It has appsettings.json file but not web.config file. Should I add one?
When we deploy .Net CORE Web App to Azure, web.config file will be generated by default. You can check it in KUDU DebugConsole.
Your Azure App Service=>Advanced Tools => Go => Debug Console
In web.config file , change modules="AspNetCoreModuleV2" to modules="AspNetCoreModule"
<add name="aspNetCore" path="*" verb="*" modules="AspNetCoreModule" resourceType="Unspecified" />
Your error indicates the issue while connecting to DB.
Make sure you have configured SQL Server Database.
Thanks Harsitha for the thorough response. My problem ended up being that I needed to mark my database server as allowing connections to Azure services.

SSMS connect to azure failure

I am connecting to azure database using ssms 17.9. i opened the firewall that allow remote connection for my office ip address. But there is a weird situation that my colleague pc ssms able to connect to azure database which mine cannot.
The error show in ssms is like below
Failed to retrieve data for this request. (Microsoft.SqlServer.Management.Sdk.Sfc)
For help, click: http://go.microsoft.com/fwlink?ProdName=Microsoft%20SQL%20Server&LinkId=20476
Program Location:
at Microsoft.SqlServer.Management.Sdk.Sfc.Enumerator.Process(Object connectionInfo, Request request)
at Microsoft.SqlServer.Management.UI.VSIntegration.ObjectExplorer.NavigableItemBuilder.NavigableItemBuilderDataReader.RunQuery()
at Microsoft.SqlServer.Management.UI.VSIntegration.ObjectExplorer.NavigableItemBuilder.NavigableItemBuilderDataReader.Process()
at Microsoft.SqlServer.Management.UI.VSIntegration.ObjectExplorer.NavigableItemBuilder.NavigableItemBuilderDataReader.get_PropertyNames()
at Microsoft.SqlServer.Management.UI.VSIntegration.ObjectExplorer.NavigableItemBuilder.BuildDynamicItemWithQuery(IList1 nodes, INodeInformation source, INavigableItem sourceItem, String urnQuery, Boolean registerBuilder, Boolean registerBuiltItems)
at Microsoft.SqlServer.Management.UI.VSIntegration.ObjectExplorer.NavigableItemBuilder.BuildDynamicItem(IList1 nodes, INodeInformation source, INavigableItem sourceItem, IFilterProvider filter)
at Microsoft.SqlServer.Management.UI.VSIntegration.ObjectExplorer.NavigableItemBuilder.Build(IList1 nodes, INodeInformation source, INavigableItem sourceItem, IFilterProvider filter)
at Microsoft.SqlServer.Management.UI.VSIntegration.ObjectExplorer.NavigableItemBuilder.Build(IList1 nodes, INodeInformation source, IFilterProvider filter)
at Microsoft.SqlServer.Management.UI.VSIntegration.ObjectExplorer.ObjectExplorerControl.BuildDataModel(SqlOlapConnectionInfoBase ci)
at Microsoft.SqlServer.Management.UI.VSIntegration.ObjectExplorer.ObjectExplorerControl.GetHierarchy(SqlOlapConnectionInfoBase ci, String displayName)
at Microsoft.SqlServer.Management.SqlStudio.Explorer.ObjectExplorerService.ConnectToServer(UIConnectionInfo connectionInfo, IDbConnection liveConnection, Boolean validateConnection)
===================================
An exception occurred while executing a Transact-SQL statement or batch. (Microsoft.SqlServer.ConnectionInfo)
Program Location:
at Microsoft.SqlServer.Management.Common.ServerConnection.GetExecuteReader(SqlCommand command)
at Microsoft.SqlServer.Management.Common.ServerConnection.ExecuteReader(String sqlCommand, SqlCommand& command)
at Microsoft.SqlServer.Management.Smo.ExecuteSql.GetDataReader(String query, SqlCommand& command)
at Microsoft.SqlServer.Management.Smo.DataProvider.SetConnectionAndQuery(ExecuteSql execSql, String query)
at Microsoft.SqlServer.Management.Smo.ExecuteSql.GetDataProvider(StringCollection query, Object con, StatementBuilder sb, RetriveMode rm)
at Microsoft.SqlServer.Management.Smo.SqlObjectBase.FillData(ResultType resultType, StringCollection sql, Object connectionInfo, StatementBuilder sb)
at Microsoft.SqlServer.Management.Smo.SqlObjectBase.FillDataWithUseFailure(SqlEnumResult sqlresult, ResultType resultType)
at Microsoft.SqlServer.Management.Smo.SqlObjectBase.BuildResult(EnumResult result)
at Microsoft.SqlServer.Management.Smo.SqlObjectBase.GetData(EnumResult erParent)
at Microsoft.SqlServer.Management.Sdk.Sfc.Environment.GetData()
at Microsoft.SqlServer.Management.Sdk.Sfc.Environment.GetData(Request req, Object ci)
at Microsoft.SqlServer.Management.Sdk.Sfc.Enumerator.GetData(Object connectionInfo, Request request)
at Microsoft.SqlServer.Management.Sdk.Sfc.Enumerator.Process(Object connectionInfo, Request request)
===================================
A transport-level error has occurred when receiving results from the server. (provider: TCP Provider, error: 0 - An existing connection was forcibly closed by the remote host.) (.Net SqlClient Data Provider)
For help, click: http://go.microsoft.com/fwlink?ProdName=Microsoft%20SQL%20Server&EvtSrc=MSSQLServer&EvtID=10054&LinkId=20476
Server Name: appletea.database.windows.net,1433
Error Number: 10054
Severity: 20
State: 0
Program Location:
at Microsoft.SqlServer.Management.Common.ConnectionManager.ExecuteTSql(ExecuteTSqlAction action, Object execObject, DataSet fillDataSet, Boolean catchException)
at Microsoft.SqlServer.Management.Common.ServerConnection.GetExecuteReader(SqlCommand command)
===================================
An existing connection was forcibly closed by the remote host
I've tried reinstall ssms,visual studio and even format my pc. but none of the solution that i found working. So i am here to looking someone for help. thanks and appreciate if someone can tell me how to solve this.
It's in the comments, but thought I would post here for future readers too. See my answer here for a solution that worked for me: https://dba.stackexchange.com/questions/224169/ssms-cant-connect-to-azure-database
Summary: Essentially, I had the same problem, I downloaded IISCrypto and enabled all of the Ciphers.
https://www.nartac.com/Products/IISCrypto/Download
After installing the "Docker Desktop on Windows", I get the same problem. Uninstalling the Docker Desktop on Windows, give me the relief.

Microsoft Azure Backup Server failing with error 182

I am tring to install Microsoft Azure Backup Server but it's failing with the following error
Report configuration failed.
Verify that SQL Server Reporting Services is installed properly and
that it is running.
ID: 812
This is what I find in the log
[2018-04-25 12:09:41 PM] * Exception : =>
System.Reflection.TargetInvocationException: Exception has been thrown
by the target of an invocation. ---> System.Net.WebException: The
request was aborted: Could not create SSL/TLS secure channel. at
System.Web.Services.Protocols.WebClientProtocol.GetWebResponse(WebRequest
request) at
System.Web.Services.Protocols.SoapHttpClientProtocol.Invoke(String
methodName, Object[] parameters) at
Microsoft.Internal.EnterpriseStorage.Dls.UI.Reporting.ReportingService2005.ListSecureMethods()
at
Microsoft.Internal.EnterpriseStorage.Dls.UI.Library.Reporting.Reporter.CheckSslInstallation()
at
Microsoft.Internal.EnterpriseStorage.Dls.UI.Library.Reporting.Reporter.ConnectToReportServerUrl(String
RSUrl, Boolean throwExcecption) at
Microsoft.Internal.EnterpriseStorage.Dls.UI.Library.Reporting.Reporter.ConstructReportServerUrl(String
sqlServerName, String sqlInstanceName) at
Microsoft.Internal.EnterpriseStorage.Dls.UI.Library.Reporting.Reporter.GetReportServerUrl(String
sqlServerName, String sqlInstanceName) at
Microsoft.Internal.EnterpriseStorage.Dls.UI.Library.Reporting.Reporter.CreateReportProxyObject(String
sqlServerName, String sqlInstanceName) at
Microsoft.Internal.EnterpriseStorage.Dls.UI.Library.Reporting.Reporter.CreateReportRootFolder(String
serverName, String instanceName, Boolean recreate) at
Microsoft.Internal.EnterpriseStorage.Dls.UI.Library.Reporting.Reporter.InstallReports(Boolean
calledFromSetup, String sourceFolderPath, String sqlServerName, String
sqlInstanceName, String dbConnectionString)
I have a configured certificate for the Reporting service and I tried deleting the encryption keys but still failed
Ensure that that the SQL Server Reporting Services is installed properly and that it is running and also make sure the appropriate ports (443) are open on the system. You may consider restarting the system and re-trying the operation.
Reference:https://support.microsoft.com/en-us/help/3041338/data-protection-manager-error-codes

Biztalk WCF-Custom Adapter gives time out error

I am running a stored procedure on SQL Azure Database using BizTalk WCF-Custom adapter. I have around 20k records to be processed as composite operation. We are using BizTalk 2013 R2 on Windows Server 2012.
I am getting following error after 40-50 minutes:
A message sent to adapter "WCF-Custom" on send port
"Swire.BizTalk.M3.Send.PushAssets.Local" with URI
"mssql://xngoo0zsw2.database.windows.net//overvuuat_20150720?" is
suspended. Error details:
Microsoft.ServiceModel.Channels.Common.InvalidUriException: Timeout
expired. The timeout period elapsed prior to obtaining a connection
from the pool. This may have occurred because all pooled connections
were in use and max pool size was reached. --->
System.InvalidOperationException: Timeout expired. The timeout period
elapsed prior to obtaining a connection from the pool. This may have
occurred because all pooled connections were in use and max pool size
was reached. at
System.Data.ProviderBase.DbConnectionFactory.TryGetConnection(DbConnection
owningConnection, TaskCompletionSource1 retry, DbConnectionOptions
userOptions, DbConnectionInternal oldConnection, DbConnectionInternal&
connection) at
System.Data.ProviderBase.DbConnectionInternal.TryOpenConnectionInternal(DbConnection
outerConnection, DbConnectionFactory connectionFactory,
TaskCompletionSource1 retry, DbConnectionOptions userOptions) at
System.Data.SqlClient.SqlConnection.TryOpenInner(TaskCompletionSource1
retry) at
System.Data.SqlClient.SqlConnection.TryOpen(TaskCompletionSource1
retry) at System.Data.SqlClient.SqlConnection.Open() at
Microsoft.Adapters.Sql.SqlAdapterConnection.OpenConnection() ---
End of inner exception stack trace ---
Server stack trace: at
System.Runtime.AsyncResult.End[TAsyncResult](IAsyncResult result)
at
System.ServiceModel.Channels.ServiceChannel.SendAsyncResult.End(SendAsyncResult
result) at
System.ServiceModel.Channels.ServiceChannel.EndCall(String action,
Object[] outs, IAsyncResult result) at
System.ServiceModel.Channels.ServiceChannel.EndRequest(IAsyncResult
result)
Exception rethrown at [0]: at
System.Runtime.Remoting.Proxies.RealProxy.HandleReturnMessage(IMessage
reqMsg, IMessage retMsg) at
System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke(MessageData&
msgData, Int32 type) at
System.ServiceModel.Channels.IRequestChannel.EndRequest(IAsyncResult
result) at
Microsoft.BizTalk.Adapter.Wcf.Runtime.WcfClient`2.RequestCallback(IAsyncResult
result) MessageId: {9034380A-E116-4694-BD70-F9933BF37BD3}
InstanceID: {91B6E1AA-32AD-48D9-A18A-F9BF20529764}
Following are configurations for that send port:
I increased the timeout from 00:50:00 to 05:00:00 but no change in result. still getting same error.
I run SP_WHO2 to get the list of connection those are running/queued. There were more than 100+ connection when the error raised. One of the query "Select Into" was in suspend mode and displayed as it was running from SSMS. but we have no such query and we never run any query from directly from SSMS.
Please suggest a way to resolve this.
Looks like you are hitting the maxConnectionPoolSize which is 100 and increasing the timeout wouldn't help in this case. You can use non-pooled connections but before going that see why there are 100+ connections to the database. This could be because of the performance issues on the database (may need to scale) / application issues (locks being held on the table and blocking other queries or connections aren't closed so none of them are returned back to pool).
For performance issues, query sys.resource_stats to see whether your database resource utilization is peaking. Also you can use sys.dm_Exec_Requests and sys.dm_tran_locks to see what other connections are doing. I believe you are closing the connections in your app when you are done using them (otherwise they won't return back to pool)

CRM 2011 Service Connection Issue With CallerID

I have an application that connects to the CRM 2011 service. When I attach to the service without a CallerID I can grab the data without error. The hitch comes when I add the caller ID to the connection. I receive this error message (might seem familiar):
The server was unable to process the request due to an internal error.
For more information about the error, either turn on
IncludeExceptionDetailInFaults (either from ServiceBehaviorAttribute
or from the configuration behavior) on the server in order to send the
exception information back to the client, or turn on tracing as per
the Microsoft .NET Framework 3.0 SDK documentation and inspect the
server trace logs. Server stack trace: at
System.ServiceModel.Channels.ServiceChannel.ThrowIfFaultUnderstood(Message
reply, MessageFault fault, String action, MessageVersion version,
FaultConverter faultConverter) at
System.ServiceModel.Channels.ServiceChannel.HandleReply(ProxyOperationRuntime
operation, ProxyRpc& rpc) at
System.ServiceModel.Channels.ServiceChannel.Call(String action,
Boolean oneway, ProxyOperationRuntime operation, Object[] ins,
Object[] outs, TimeSpan timeout) at
System.ServiceModel.Channels.ServiceChannelProxy.InvokeService(IMethodCallMessage
methodCall, ProxyOperationRuntime operation) at
System.ServiceModel.Channels.ServiceChannelProxy.Invoke(IMessage
message) Exception rethrown at [0]: at
System.Runtime.Remoting.Proxies.RealProxy.HandleReturnMessage(IMessage
reqMsg, IMessage retMsg) at
System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke(MessageData&
msgData, Int32 type) at
Microsoft.Xrm.Sdk.IOrganizationService.Retrieve(String entityName,
Guid id, ColumnSet columnSet) at
Microsoft.Xrm.Sdk.Client.OrganizationServiceProxy.RetrieveCore(String
entityName, Guid id, ColumnSet columnSet) at
Microsoft.Xrm.Sdk.Client.OrganizationServiceProxy.Retrieve(String
entityName, Guid id, ColumnSet columnSet) at
Hanlon.Data.CRM.DataObjectBase.Retrieve(Guid identity) at
Hanlon.Data.CRM.Advisor.Fill(Guid advisor_identity) at
HypotheticalReportCrmSite.HypotheticalReport.AcceptanceWorkFlow()
Does anyone have any ideas on why this is happening or how I can find out what the error is more specifically? The application works on both Test and User Acceptance servers but blows up on Production.
Clearly there are a number of reasons why this may work differently on different servers, some places to start looking would be the setup/installation/permissions on the different servers including CRM, SQL, Active Directory (although I might assume AD would be the same).
Is there any difference in the proxy used for the Prod server compared to that on the Test/UAT systems?
Are all the relevant versions of the .NET framework available on the Prod server?
Are the same assemblies installed in the GAC?
Is SQL more locked down for the Prod server?
Were the CRM installations on the Prod server completed according to the same specifications as the Test and UAT servers? Were they installed by the same party?
Again, these are all just ideas, but it would seem that the differences between the servers would be the place to look and the installations of the key products would be a good place to start, followed perhaps by looking at the .NET framework etc.
Apologies if the answer is quite generic, but as you have found the specific error doesn't appear to have revealed a smoking gun.
I'd be interested to know what you find.

Resources