I was trying to run ASP.NET Core Application
this is global.json
{
"projects": [ "src", "test" ],
"sdk": {
"version": "1.0.0-rc1-update2"
}
}
I encountered error restore packages failed
this is output
PATH=.\node_modules\.bin;C:\Program Files (x86)\Microsoft Visual Studio 14.0\Web\External;%PATH%;C:\Program Files (x86)\Microsoft Visual Studio 14.0\Web\External\git
C:\Users\AA\.dnx\runtimes\dnx-clr-win-x86.1.0.0-rc1-update2\bin\dnx.exe "C:\Users\AA\.dnx\runtimes\dnx-clr-win-x86.1.0.0-rc1-update2\bin\lib\Microsoft.Dnx.Tooling\Microsoft.Dnx.Tooling.dll" restore "D:\MyProject\src\MyProject"
Microsoft .NET Development Utility Clr-x86-1.0.0-rc1-16609
GET https://api.nuget.org/v3/index.json
Restoring packages for D:\MyProject\src\MyProject\project.json
GET https://api.nuget.org/v3/index.jsonFindPackagesById()?id='Microsoft.ApplicationInsights.AspNet'
GET https://api.nuget.org/v3/index.jsonFindPackagesById()?id='Microsoft.AspNet.Diagnostics'
GET https://api.nuget.org/v3/index.jsonFindPackagesById()?id='Microsoft.AspNet.IISPlatformHandler'
GET https://api.nuget.org/v3/index.jsonFindPackagesById()?id='Microsoft.AspNet.Mvc'
GET https://api.nuget.org/v3/index.jsonFindPackagesById()?id='Microsoft.AspNet.Mvc.TagHelpers'
GET https://api.nuget.org/v3/index.jsonFindPackagesById()?id='Microsoft.AspNet.Server.Kestrel'
GET https://api.nuget.org/v3/index.jsonFindPackagesById()?id='Microsoft.AspNet.StaticFiles'
GET https://api.nuget.org/v3/index.jsonFindPackagesById()?id='Microsoft.AspNet.Tooling.Razor'
GET https://api.nuget.org/v3/index.jsonFindPackagesById()?id='Microsoft.Extensions.CodeGenerators.Mvc'
GET https://api.nuget.org/v3/index.jsonFindPackagesById()?id='Microsoft.Extensions.Configuration.FileProviderExtensions'
GET https://api.nuget.org/v3/index.jsonFindPackagesById()?id='Microsoft.Extensions.Configuration.Json'
GET https://api.nuget.org/v3/index.jsonFindPackagesById()?id='Microsoft.Extensions.Configuration.UserSecrets'
GET https://api.nuget.org/v3/index.jsonFindPackagesById()?id='Microsoft.Extensions.Logging'
GET https://api.nuget.org/v3/index.jsonFindPackagesById()?id='Microsoft.Extensions.Logging.Console'
GET https://api.nuget.org/v3/index.jsonFindPackagesById()?id='Microsoft.Extensions.Logging.Debug'
GET https://api.nuget.org/v3/index.jsonFindPackagesById()?id='Microsoft.VisualStudio.Web.BrowserLink.Loader'
Warning: FindPackagesById: Microsoft.ApplicationInsights.AspNet
An error occurred while sending the request.
GET https://api.nuget.org/v3/index.jsonFindPackagesById()?id='Microsoft.ApplicationInsights.AspNet'
Warning: FindPackagesById: Microsoft.AspNet.Server.Kestrel
An error occurred while sending the request.
Warning: FindPackagesById: Microsoft.AspNet.Mvc.TagHelpers
An error occurred while sending the request.
GET https://api.nuget.org/v3/index.jsonFindPackagesById()?id='Microsoft.AspNet.Server.Kestrel'
Warning: FindPackagesById: Microsoft.AspNet.Tooling.Razor
An error occurred while sending the request.
Warning: FindPackagesById: Microsoft.Extensions.Configuration.FileProviderExtensions
An error occurred while sending the request.
Warning: FindPackagesById: Microsoft.Extensions.Logging.Debug
An error occurred while sending the request.
GET https://api.nuget.org/v3/index.jsonFindPackagesById()?id='Microsoft.AspNet.Mvc.TagHelpers'
Warning: FindPackagesById: Microsoft.AspNet.StaticFiles
An error occurred while sending the request.
GET https://api.nuget.org/v3/index.jsonFindPackagesById()?id='Microsoft.AspNet.Tooling.Razor'
Warning: FindPackagesById: Microsoft.Extensions.Logging
An error occurred while sending the request.
GET https://api.nuget.org/v3/index.jsonFindPackagesById()?id='Microsoft.AspNet.StaticFiles'
GET https://api.nuget.org/v3/index.jsonFindPackagesById()?id='Microsoft.Extensions.Logging.Debug'
GET https://api.nuget.org/v3/index.jsonFindPackagesById()?id='Microsoft.Extensions.Configuration.FileProviderExtensions'
Warning: FindPackagesById: Microsoft.VisualStudio.Web.BrowserLink.Loader
An error occurred while sending the request.
Warning: FindPackagesById: Microsoft.Extensions.CodeGenerators.Mvc
An error occurred while sending the request.
GET https://api.nuget.org/v3/index.jsonFindPackagesById()?id='Microsoft.Extensions.Logging'
GET https://api.nuget.org/v3/index.jsonFindPackagesById()?id='Microsoft.VisualStudio.Web.BrowserLink.Loader'
GET https://api.nuget.org/v3/index.jsonFindPackagesById()?id='Microsoft.Extensions.CodeGenerators.Mvc'
Warning: FindPackagesById: Microsoft.Extensions.Configuration.Json
An error occurred while sending the request.
Warning: FindPackagesById: Microsoft.Extensions.Logging.Console
An error occurred while sending the request.
Warning: FindPackagesById: Microsoft.AspNet.Diagnostics
An error occurred while sending the request.
Warning: FindPackagesById: Microsoft.Extensions.Configuration.UserSecrets
An error occurred while sending the request.
Warning: FindPackagesById: Microsoft.AspNet.IISPlatformHandler
An error occurred while sending the request.
GET https://api.nuget.org/v3/index.jsonFindPackagesById()?id='Microsoft.Extensions.Configuration.Json'
Warning: FindPackagesById: Microsoft.AspNet.Mvc
An error occurred while sending the request.
GET https://api.nuget.org/v3/index.jsonFindPackagesById()?id='Microsoft.AspNet.IISPlatformHandler'
GET https://api.nuget.org/v3/index.jsonFindPackagesById()?id='Microsoft.AspNet.Mvc'
GET https://api.nuget.org/v3/index.jsonFindPackagesById()?id='Microsoft.AspNet.Diagnostics'
GET https://api.nuget.org/v3/index.jsonFindPackagesById()?id='Microsoft.Extensions.Configuration.UserSecrets'
GET https://api.nuget.org/v3/index.jsonFindPackagesById()?id='Microsoft.Extensions.Logging.Console'
Warning: FindPackagesById: Microsoft.ApplicationInsights.AspNet
An error occurred while sending the request.
GET https://api.nuget.org/v3/index.jsonFindPackagesById()?id='Microsoft.ApplicationInsights.AspNet'
Warning: FindPackagesById: Microsoft.AspNet.Server.Kestrel
An error occurred while sending the request.
GET https://api.nuget.org/v3/index.jsonFindPackagesById()?id='Microsoft.AspNet.Server.Kestrel'
Warning: FindPackagesById: Microsoft.AspNet.Mvc.TagHelpers
An error occurred while sending the request.
GET https://api.nuget.org/v3/index.jsonFindPackagesById()?id='Microsoft.AspNet.Mvc.TagHelpers'
Warning: FindPackagesById: Microsoft.AspNet.StaticFiles
An error occurred while sending the request.
GET https://api.nuget.org/v3/index.jsonFindPackagesById()?id='Microsoft.AspNet.StaticFiles'
Warning: FindPackagesById: Microsoft.AspNet.Tooling.Razor
An error occurred while sending the request.
GET https://api.nuget.org/v3/index.jsonFindPackagesById()?id='Microsoft.AspNet.Tooling.Razor'
Warning: FindPackagesById: Microsoft.VisualStudio.Web.BrowserLink.Loader
An error occurred while sending the request.
Warning: FindPackagesById: Microsoft.Extensions.Logging.Debug
An error occurred while sending the request.
Warning: FindPackagesById: Microsoft.Extensions.Logging
An error occurred while sending the request.
Warning: FindPackagesById: Microsoft.Extensions.Configuration.FileProviderExtensions
An error occurred while sending the request.
Warning: FindPackagesById: Microsoft.Extensions.CodeGenerators.Mvc
An error occurred while sending the request.
GET https://api.nuget.org/v3/index.jsonFindPackagesById()?id='Microsoft.Extensions.Configuration.FileProviderExtensions'
GET https://api.nuget.org/v3/index.jsonFindPackagesById()?id='Microsoft.VisualStudio.Web.BrowserLink.Loader'
GET https://api.nuget.org/v3/index.jsonFindPackagesById()?id='Microsoft.Extensions.Logging.Debug'
GET https://api.nuget.org/v3/index.jsonFindPackagesById()?id='Microsoft.Extensions.CodeGenerators.Mvc'
GET https://api.nuget.org/v3/index.jsonFindPackagesById()?id='Microsoft.Extensions.Logging'
Warning: FindPackagesById: Microsoft.AspNet.IISPlatformHandler
An error occurred while sending the request.
GET https://api.nuget.org/v3/index.jsonFindPackagesById()?id='Microsoft.AspNet.IISPlatformHandler'
Warning: FindPackagesById: Microsoft.AspNet.Diagnostics
An error occurred while sending the request.
GET https://api.nuget.org/v3/index.jsonFindPackagesById()?id='Microsoft.AspNet.Diagnostics'
Warning: FindPackagesById: Microsoft.Extensions.Logging.Console
An error occurred while sending the request.
Warning: FindPackagesById: Microsoft.Extensions.Configuration.Json
An error occurred while sending the request.
Warning: FindPackagesById: Microsoft.Extensions.Configuration.UserSecrets
An error occurred while sending the request.
Warning: FindPackagesById: Microsoft.AspNet.Mvc
An error occurred while sending the request.
GET https://api.nuget.org/v3/index.jsonFindPackagesById()?id='Microsoft.Extensions.Logging.Console'
GET https://api.nuget.org/v3/index.jsonFindPackagesById()?id='Microsoft.Extensions.Configuration.Json'
GET https://api.nuget.org/v3/index.jsonFindPackagesById()?id='Microsoft.AspNet.Mvc'
GET https://api.nuget.org/v3/index.jsonFindPackagesById()?id='Microsoft.Extensions.Configuration.UserSecrets'
Error: FindPackagesById: Microsoft.AspNet.Mvc.TagHelpers
An error occurred while sending the request.
Error: FindPackagesById: Microsoft.ApplicationInsights.AspNet
An error occurred while sending the request.
----------
Error: FindPackagesById: Microsoft.AspNet.Tooling.Razor
An error occurred while sending the request.
Error: FindPackagesById: Microsoft.AspNet.Server.Kestrel
An error occurred while sending the request.
Error: FindPackagesById: Microsoft.AspNet.StaticFiles
An error occurred while sending the request.
System.Net.Http.HttpRequestException: An error occurred while sending the request. ---> System.Net.WebException: The request was aborted: Could not create SSL/TLS secure channel.
at System.Net.HttpWebRequest.EndGetResponse(IAsyncResult asyncResult)
at System.Net.Http.HttpClientHandler.GetResponseCallback(IAsyncResult ar)
--- End of inner exception stack trace ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd(Task task)
at Microsoft.Dnx.Tooling.Restore.NuGet.HttpSource.<GetAsync>d__11.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd(Task task)
at Microsoft.Dnx.Tooling.Restore.NuGet.NuGetv2Feed.<FindPackagesByIdAsyncCore>d__25.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Microsoft.Dnx.Tooling.RemoteWalkProvider.<FindLibrary>d__6.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Microsoft.Dnx.Tooling.RestoreOperations.<FindLibrary>d__9.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd(Task task)
at Microsoft.Dnx.Tooling.RestoreOperations.<FindLibraryByVersion>d__8.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd(Task task)
at Microsoft.Dnx.Tooling.RestoreOperations.<FindLibraryMatch>d__6.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Microsoft.Dnx.Tooling.RestoreOperations.<FindLibraryEntry>d__5.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd(Task task)
at Microsoft.Dnx.Tooling.RestoreOperations.<CreateGraphNode>d__2.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd(Task task)
at Microsoft.Dnx.Tooling.RestoreOperations.<CreateGraphNode>d__2.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Microsoft.Dnx.Tooling.RestoreCommand.<CreateGraphNode>d__71.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd(Task task)
at Microsoft.Dnx.Tooling.RestoreCommand.<RestoreForProject>d__69.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Microsoft.Dnx.Tooling.RestoreCommand.<>c__DisplayClass68_0.<<Execute>b__2>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd(Task task)
at Microsoft.Dnx.Tooling.RestoreCommand.<Execute>d__68.MoveNext()
----------
Restore failed
An error occurred while sending the request.
NuGet Config files used:
C:\ProgramData\NuGet\Config\Microsoft.VisualStudio.Offline.config
C:\Users\AA\AppData\Roaming\NuGet\nuget.config
Feeds used:
https://api.nuget.org/v3/index.json
C:\Program Files (x86)\Microsoft SDKs\NuGetPackages\
this is project.json
{
"version": "1.0.0-*",
"userSecretsId": "aspnetcore-MyProject-3db060cf-000d-481d-b013-6fcaf0c10504",
"compilationOptions": {
"emitEntryPoint": true
},
"dependencies": {
"Microsoft.ApplicationInsights.AspNet": "1.0.0-rc1",
"Microsoft.AspNet.Diagnostics": "1.0.0-rc1-final",
"Microsoft.AspNet.IISPlatformHandler": "1.0.0-rc1-final",
"Microsoft.AspNet.Mvc": "6.0.0-rc1-final",
"Microsoft.AspNet.Mvc.TagHelpers": "6.0.0-rc1-final",
"Microsoft.AspNet.Server.Kestrel": "1.0.0-rc1-final",
"Microsoft.AspNet.StaticFiles": "1.0.0-rc1-final",
"Microsoft.AspNet.Tooling.Razor": "1.0.0-rc1-final",
"Microsoft.Extensions.CodeGenerators.Mvc": "1.0.0-rc1-final",
"Microsoft.Extensions.Configuration.FileProviderExtensions": "1.0.0-rc1-final",
"Microsoft.Extensions.Configuration.Json": "1.0.0-rc1-final",
"Microsoft.Extensions.Configuration.UserSecrets": "1.0.0-rc1-final",
"Microsoft.Extensions.Logging": "1.0.0-rc1-final",
"Microsoft.Extensions.Logging.Console": "1.0.0-rc1-final",
"Microsoft.Extensions.Logging.Debug": "1.0.0-rc1-final",
"Microsoft.VisualStudio.Web.BrowserLink.Loader": "14.0.0-rc1-final"
},
"commands": {
"web": "Microsoft.AspNet.Server.Kestrel"
},
"frameworks": {
"dnx46": { },
"dnxcore50": { }
},
"exclude": [
"wwwroot",
"node_modules",
"bower_components"
],
"publishExclude": [
"**.user",
"**.vspscc"
],
"scripts":{
"prepublish": [
"npm install",
"bower install",
"gulp clean",
"gulp min"
]
}
}
I installed dnx 1.0.0-rc1-update2 in .dnx and sdk 1.0.0-preview-1-003177 in dotnet/sdk
I removed dnxcore5.0 and changed frameworks in project.json as the following:
"frameworks": {
"dnx46": { }
}
and changed SDK in global.json as the following:
"sdk": {
"version": "1.0.0-preview2-1-003177"
}
because I searched for 1.0.0-rc1-update2 and didn't find
After that packges are restored successfully
but when I tried to run, I encountered this error
Unable to start process D:\MyProject\artifacts\bin\MyProject\bin\Debug\dnx46\win-x64\MyProject.exe
request failed with status code 500 Internal server error.
the full response has been written to C:\Users\AA\AppData\Local\Temp\HttpFailure_06_00_18.html
After restarting Visual Studio this error appeared:
An unhandled exception of type 'System.InvalidOperationException' occurred in Microsoft.Extensions.DependencyInjection.Abstractions.dll
Additional information: No service for type 'Microsoft.Extensions.PlatformAbstractions.IApplicationEnvironment' has been registered.
Related
Identity:notauth::
Module:WanderingWiFi.AirWatch.BusinessImpl.Authentication.AuthenticationProcessor.ProcessConsoleLoginAsync
Message: Console LDAP Login Failed with following error*** EXCEPTION ***
AirWatch.CloudMessaging.Client.AwcmClientException: Received a failure response from AWCM. at AirWatch.CloudConnector.Client.AccServiceClient.SendRequest[TResponse](String serviceOp, Int32 serviceTimeout, BaseServiceRequest serviceRequest, AwcmMessageType messageType)
at AirWatch.CloudConnector.DirectoryService.IDirectoryService$acc.Authenticate(DirectoryAuthenticationRequest )
at WanderingWiFi.AirWatch.BusinessImpl.EnterpriseIntegrationHelper.DoAuthenticate(DirectoryAuthenticationRequest request, EntityKey locationGroupId)
at WanderingWiFi.AirWatch.BusinessImpl.EnterpriseIntegrationHelper.Authenticate(DirectoryAuthenticationRequest request, EntityKey locationGroupId, AuthenticationType type)
at WanderingWiFi.AirWatch.BusinessImpl.Authentication.AuthenticationProcessor.d__48.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at WanderingWiFi.AirWatch.BusinessImpl.Authentication.AuthenticationProcessor.d__46.MoveNext()awcmsessionid
I implemented ASP.NET Core Windows Authentication supporting Cookie
In Startup.cs
services.AddAuthentication(IISDefaults.AuthenticationScheme);
services.AddAuthentication("CookieAuthenticationScheme")
.AddCookie("CookieAuthenticationScheme");
On Login:
var claims = new List<Claim>{new Claim(ClaimTypes.Name, userName)};
await httpContext.SignInAsync("CookieAuthenticationScheme", new ClaimsPrincipal(new ClaimsIdentity(claims, "CookieAuthenticationScheme")));
It works okay. But if no one uses the application for a while, and when user logs in the application again it raises this error:
info: Microsoft.AspNetCore.Hosting.Internal.WebHost[1]
Request starting HTTP/1.1 GET http://localhost/api/User/GetCurrentUserInfo
info: Microsoft.AspNetCore.Authentication.Cookies.CookieAuthenticationHandler[7]
CookieAuthenticationScheme was not authenticated. Failure message: Unprotect ticket failed
info: Microsoft.AspNetCore.Authorization.DefaultAuthorizationService[2]
Authorization failed for user: (null).
info: Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker[3]
Authorization failed for the request at filter 'Microsoft.AspNetCore.Mvc.Authorization.AuthorizeFilter'.
info: Microsoft.AspNetCore.Mvc.ChallengeResult[1]
Executing ChallengeResult with authentication schemes ().
info: Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker[2]
Executed action Application.Controllers.UserController.GetCurrentUserInfo (Application) in 0.251ms
info: Microsoft.AspNetCore.Hosting.Internal.WebHost[2]
Request finished in 23.2483ms 401
info: Microsoft.AspNetCore.Hosting.Internal.WebHost[1]
Request starting HTTP/1.1 GET http://localhost/api/User/GetCurrentUserInfo
info: Microsoft.AspNetCore.Authentication.Cookies.CookieAuthenticationHandler[7]
CookieAuthenticationScheme was not authenticated. Failure message: Unprotect ticket failed
info: Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker[2]
Executed action Application.Controllers.UserController.GetCurrentUserInfo (Application) in 1.1302ms
fail: Microsoft.AspNetCore.Server.Kestrel[13]
Connection id "0HLB9USN79JN9", Request id "0HLB9USN79JN9:00000002": An unhandled exception was thrown by the application.
System.ObjectDisposedException: Safe handle has been closed
at System.Runtime.InteropServices.SafeHandle.DangerousAddRef(Boolean& success)
at System.StubHelpers.StubHelpers.SafeHandleAddRef(SafeHandle pHandle, Boolean& success)
at Interop.Advapi32.LsaLookupSids(SafeLsaPolicyHandle handle, Int32 count, IntPtr[] sids, SafeLsaMemoryHandle& referencedDomains, SafeLsaMemoryHandle& names)
at System.Security.Principal.SecurityIdentifier.TranslateToNTAccounts(IdentityReferenceCollection sourceSids, Boolean& someFailed)
at System.Security.Principal.SecurityIdentifier.Translate(IdentityReferenceCollection sourceSids, Type targetType, Boolean& someFailed)
at System.Security.Principal.SecurityIdentifier.Translate(IdentityReferenceCollection sourceSids, Type targetType, Boolean forceSuccess)
at System.Security.Principal.SecurityIdentifier.Translate(Type targetType)
at System.Security.Principal.WindowsIdentity.<GetName>b__45_0()
at System.Security.Principal.WindowsIdentity.<>c__DisplayClass61_0.<RunImpersonatedInternal>b__0(Object <state>)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
at System.Security.Principal.WindowsIdentity.RunImpersonatedInternal(SafeAccessTokenHandle token, Action action)
at System.Security.Principal.WindowsIdentity.RunImpersonated(SafeAccessTokenHandle safeAccessTokenHandle, Action action)
at System.Security.Principal.WindowsIdentity.GetName()
at System.Security.Principal.WindowsIdentity.get_Name()
at Microsoft.AspNetCore.Authorization.DefaultAuthorizationService.GetUserNameForLogging(ClaimsPrincipal user)
at Microsoft.AspNetCore.Authorization.DefaultAuthorizationService.<AuthorizeAsync>d__7.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()
at Microsoft.AspNetCore.Authorization.Policy.PolicyEvaluator.<AuthorizeAsync>d__3.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()
at Microsoft.AspNetCore.Mvc.Authorization.AuthorizeFilter.<OnAuthorizationAsync>d__15.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Microsoft.AspNetCore.Mvc.Internal.ResourceInvoker.<InvokeFilterPipelineAsync>d__17.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Microsoft.AspNetCore.Mvc.Internal.ResourceInvoker.<InvokeAsync>d__15.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Microsoft.AspNetCore.Builder.RouterMiddleware.<Invoke>d__4.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Microsoft.AspNetCore.Authentication.AuthenticationMiddleware.<Invoke>d__6.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Microsoft.AspNetCore.Cors.Infrastructure.CorsMiddleware.<Invoke>d__7.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Microsoft.AspNetCore.Server.IISIntegration.IISMiddleware.<Invoke>d__11.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Microsoft.AspNetCore.Builder.Extensions.UsePathBaseMiddleware.<Invoke>d__3.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Microsoft.AspNetCore.Hosting.Internal.RequestServicesContainerMiddleware.<Invoke>d__3.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http.Frame`1.<ProcessRequestsAsync>d__2.MoveNext()
info: Microsoft.AspNetCore.Hosting.Internal.WebHost[2]
Request finished in 20.4616ms 500
The point of windows authentication is to allow the server to do its own thing. When you try using cookies to handle authentication, you're effectively letting the system authenticate, then storing that authentication client side.
The system's authorization for that user is expiring in IIS, but the user's own cookie is saying that they're still authenticated.
I believe what you may actually be trying to do is enable both windows authentication and anonymous users. This answer has some details on how to accomplish this.
This answer also seems to support that you do not want cookie auth here.
You may also want to review the setup guide for windows auth in ASP.NET Core as laid out in this article.
We are using Azure Graph API client library version 2.1.1.0. Our application tries to validate the user roles at the time of login. While doing this ad client. Following call seems to be throwing an exception. Any help in this regard is highly appreciated.
Call:
adClient.Users
.Expand(_ => _.MemberOf)
.Where(_ => _.ObjectId == objectId)
.ExecuteAsync()
.Result;
adClient.DirectoryRoles
.Expand(_ => _.Members)
.ExecuteAsync()
.Result;.
Exception Details:
---> (Inner Exception #0) System.InvalidOperationException: The context is already tracking a different entity with the same resource Uri.
at System.Data.Services.Client.EntityTracker.InternalAttachEntityDescriptor(EntityDescriptor entityDescriptorFromMaterializer, Boolean failIfDuplicated)
at System.Data.Services.Client.AtomMaterializerLog.ApplyToContext()
at System.Data.Services.Client.MaterializeAtom.MoveNextInternal()
at System.Data.Services.Client.MaterializeAtom.MoveNext()
at System.Linq.Enumerable.d__941.MoveNext()
at System.Collections.Generic.List1..ctor(IEnumerable1 collection)
at System.Linq.Enumerable.ToList[TSource](IEnumerable1 source)
at Microsoft.Azure.ActiveDirectory.GraphClient.Extensions.PagedCollection2..ctor(DataServiceContextWrapper context, QueryOperationResponse1 qor)
at Microsoft.Azure.ActiveDirectory.GraphClient.Extensions.DataServiceContextWrapper.<>c__DisplayClass4c2.b__4a(IAsyncResult r)
at System.Threading.Tasks.TaskFactory1.FromAsyncCoreLogic(IAsyncResult iar, Func2 endFunction, Action1 endAction, Task1 promise, Boolean requiresSynchronization)
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Microsoft.Azure.ActiveDirectory.GraphClient.Extensions.DataServiceContextWrapper.d__4e2.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Microsoft.Azure.ActiveDirectory.GraphClient.Extensions.ReadOnlyQueryableSet2.<b__0>d__2.MoveNext()<---
we are seeing following issue - we have couple of actor systems with actor instances - most of them are windows services - and exchange messages between them - this is generally working. We have now introduced new actor which is linked to API and therefore resides within IIS
this for some reason prevents messages to be delivered between windows service actor instance and remote actor which resides in IIS
using akka.net 1.1.1 and helios 2.1.3
the same actor code and config, when moved to another windows service does behave as expected
the IIS app is running and I can see netstat showing the port as listening and was even able to debug the code as far as socket being bound however under iis I get socket exception
*2016-08-23 10:02:44.232 +01:00 [Warning] Tried to associate with unreachable remote address ["akka.tcp://NodeSystem#127.0.0.1:7096"]. Address is now gated for 5000 ms, all messages to this address will be delivered to dead letters. Reason: ["Invalid address: akka.tcp://NodeSystem#127.0.0.1:7096"] "Caused by: [Akka.Remote.Transport.InvalidAssociationException: Association failure ---> Helios.Exceptions.HeliosConnectionException: failed as a result of System.AggregateException: One or more errors occurred. ---> System.AggregateException: One or more errors occurred. ---> System.AggregateException: One or more errors occurred. ---> Helios.Channels.ConnectException: LogError connecting to 127.0.0.1:7096 ---> System.Net.Sockets.SocketException: No connection could be made because the target machine actively refused it
at Helios.Channels.Sockets.SocketChannelAsyncOperation.Validate()
at Helios.Channels.Sockets.TcpSocketChannel.DoFinishConnect(SocketChannelAsyncOperation operation)
at Helios.Channels.Sockets.AbstractSocketChannel.AbstractSocketUnsafe.FinishConnect(SocketChannelAsyncOperation operation)
--- End of inner exception stack trace ---
--- End of inner exception stack trace ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Helios.Channels.Bootstrap.ClientBootstrap.<DoResolveAndConnect>d__15.MoveNext()
--- End of inner exception stack trace ---
at System.Threading.Tasks.Task.ThrowIfExceptional(Boolean includeTaskCanceledExceptions)
at System.Threading.Tasks.Task`1.GetResultCore(Boolean waitCompletionNotification)
at System.Threading.Tasks.Task`1.get_Result()
at Akka.Remote.Transport.Helios.HeliosTcpTransport.<>c.<AssociateInternal>b__1_0(Task`1 tr)
at System.Threading.Tasks.ContinuationResultTaskFromResultTask`2.InnerInvoke()
at System.Threading.Tasks.Task.Execute()
--- End of inner exception stack trace ---
---> (Inner Exception #0) System.AggregateException: One or more errors occurred. ---> System.AggregateException: One or more errors occurred. ---> Helios.Channels.ConnectException: LogError connecting to 127.0.0.1:7096 ---> System.Net.Sockets.SocketException: No connection could be made because the target machine actively refused it
at Helios.Channels.Sockets.SocketChannelAsyncOperation.Validate()
at Helios.Channels.Sockets.TcpSocketChannel.DoFinishConnect(SocketChannelAsyncOperation operation)
at Helios.Channels.Sockets.AbstractSocketChannel.AbstractSocketUnsafe.FinishConnect(SocketChannelAsyncOperation operation)
--- End of inner exception stack trace ---
--- End of inner exception stack trace ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Helios.Channels.Bootstrap.ClientBootstrap.<DoResolveAndConnect>d__15.MoveNext()
--- End of inner exception stack trace ---
at System.Threading.Tasks.Task.ThrowIfExceptional(Boolean includeTaskCanceledExceptions)
at System.Threading.Tasks.Task`1.GetResultCore(Boolean waitCompletionNotification)
at System.Threading.Tasks.Task`1.get_Result()
at Akka.Remote.Transport.Helios.HeliosTcpTransport.<>c.<AssociateInternal>b__1_0(Task`1 tr)
at System.Threading.Tasks.ContinuationResultTaskFromResultTask`2.InnerInvoke()
at System.Threading.Tasks.Task.Execute()
---> (Inner Exception #0) System.AggregateException: One or more errors occurred. ---> Helios.Channels.ConnectException: LogError connecting to 127.0.0.1:7096 ---> System.Net.Sockets.SocketException: No connection could be made because the target machine actively refused it
at Helios.Channels.Sockets.SocketChannelAsyncOperation.Validate()
at Helios.Channels.Sockets.TcpSocketChannel.DoFinishConnect(SocketChannelAsyncOperation operation)
at Helios.Channels.Sockets.AbstractSocketChannel.AbstractSocketUnsafe.FinishConnect(SocketChannelAsyncOperation operation)
--- End of inner exception stack trace ---
--- End of inner exception stack trace ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Helios.Channels.Bootstrap.ClientBootstrap.<DoResolveAndConnect>d__15.MoveNext()
---> (Inner Exception #0) Helios.Channels.ConnectException: LogError connecting to 127.0.0.1:7096 ---> System.Net.Sockets.SocketException: No connection could be made because the target machine actively refused it
at Helios.Channels.Sockets.SocketChannelAsyncOperation.Validate()
at Helios.Channels.Sockets.TcpSocketChannel.DoFinishConnect(SocketChannelAsyncOperation operation)
at Helios.Channels.Sockets.AbstractSocketChannel.AbstractSocketUnsafe.FinishConnect(SocketChannelAsyncOperation operation)
--- End of inner exception stack trace ---<---
<---
<---
---> System.AggregateException: One or more errors occurred. ---> System.AggregateException: One or more errors occurred. ---> System.AggregateException: One or more errors occurred. ---> Helios.Channels.ConnectException: LogError connecting to 127.0.0.1:7096 ---> System.Net.Sockets.SocketException: No connection could be made because the target machine actively refused it
at Helios.Channels.Sockets.SocketChannelAsyncOperation.Validate()
at Helios.Channels.Sockets.TcpSocketChannel.DoFinishConnect(SocketChannelAsyncOperation operation)
at Helios.Channels.Sockets.AbstractSocketChannel.AbstractSocketUnsafe.FinishConnect(SocketChannelAsyncOperation operation)
--- End of inner exception stack trace ---
--- End of inner exception stack trace ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Helios.Channels.Bootstrap.ClientBootstrap.<DoResolveAndConnect>d__15.MoveNext()
--- End of inner exception stack trace ---
at System.Threading.Tasks.Task.ThrowIfExceptional(Boolean includeTaskCanceledExceptions)
at System.Threading.Tasks.Task`1.GetResultCore(Boolean waitCompletionNotification)
at System.Threading.Tasks.Task`1.get_Result()
at Akka.Remote.Transport.Helios.HeliosTcpTransport.<>c.<AssociateInternal>b__1_0(Task`1 tr)
at System.Threading.Tasks.ContinuationResultTaskFromResultTask`2.InnerInvoke()
at System.Threading.Tasks.Task.Execute()
--- End of inner exception stack trace ---
--- End of inner exception stack trace ---
at Akka.Remote.Transport.Helios.HeliosTcpTransport.<>c.<AssociateInternal>b__1_1(Task`1 r)
at System.Threading.Tasks.ContinuationResultTaskFromResultTask`2.InnerInvoke()
at System.Threading.Tasks.Task.Execute()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Akka.Remote.Transport.Helios.HeliosTransport.<Associate>d__27.MoveNext()
--- End of inner exception stack trace ---]"
2016-08-23 10:02:44.233 +01:00 [Error] "Invalid address: akka.tcp://NodeSystem#127.0.0.1:7096"
Akka.Remote.InvalidAssociation: Invalid address: akka.tcp://NodeSystem#127.0.0.1:7096 ---> Akka.Remote.Transport.InvalidAssociationException: Association failure ---> Helios.Exceptions.HeliosConnectionException: failed as a result of System.AggregateException: One or more errors occurred. ---> System.AggregateException: One or more errors occurred. ---> System.AggregateException: One or more errors occurred. ---> Helios.Channels.ConnectException: LogError connecting to 127.0.0.1:7096 ---> System.Net.Sockets.SocketException: No connection could be made because the target machine actively refused it
at Helios.Channels.Sockets.SocketChannelAsyncOperation.Validate()
at Helios.Channels.Sockets.TcpSocketChannel.DoFinishConnect(SocketChannelAsyncOperation operation)
at Helios.Channels.Sockets.AbstractSocketChannel.AbstractSocketUnsafe.FinishConnect(SocketChannelAsyncOperation operation)
--- End of inner exception stack trace ---
--- End of inner exception stack trace ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Helios.Channels.Bootstrap.ClientBootstrap.<DoResolveAndConnect>d__15.MoveNext()
--- End of inner exception stack trace ---
at System.Threading.Tasks.Task.ThrowIfExceptional(Boolean includeTaskCanceledExceptions)
at System.Threading.Tasks.Task`1.GetResultCore(Boolean waitCompletionNotification)
at System.Threading.Tasks.Task`1.get_Result()
at Akka.Remote.Transport.Helios.HeliosTcpTransport.<>c.<AssociateInternal>b__1_0(Task`1 tr)
at System.Threading.Tasks.ContinuationResultTaskFromResultTask`2.InnerInvoke()
at System.Threading.Tasks.Task.Execute()
--- End of inner exception stack trace ---
---> (Inner Exception #0) System.AggregateException: One or more errors occurred. ---> System.AggregateException: One or more errors occurred. ---> Helios.Channels.ConnectException: LogError connecting to 127.0.0.1:7096 ---> System.Net.Sockets.SocketException: No connection could be made because the target machine actively refused it
at Helios.Channels.Sockets.SocketChannelAsyncOperation.Validate()
at Helios.Channels.Sockets.TcpSocketChannel.DoFinishConnect(SocketChannelAsyncOperation operation)
at Helios.Channels.Sockets.AbstractSocketChannel.AbstractSocketUnsafe.FinishConnect(SocketChannelAsyncOperation operation)
--- End of inner exception stack trace ---
--- End of inner exception stack trace ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Helios.Channels.Bootstrap.ClientBootstrap.<DoResolveAndConnect>d__15.MoveNext()
--- End of inner exception stack trace ---
at System.Threading.Tasks.Task.ThrowIfExceptional(Boolean includeTaskCanceledExceptions)
at System.Threading.Tasks.Task`1.GetResultCore(Boolean waitCompletionNotification)
at System.Threading.Tasks.Task`1.get_Result()
at Akka.Remote.Transport.Helios.HeliosTcpTransport.<>c.<AssociateInternal>b__1_0(Task`1 tr)
at System.Threading.Tasks.ContinuationResultTaskFromResultTask`2.InnerInvoke()
at System.Threading.Tasks.Task.Execute()
---> (Inner Exception #0) System.AggregateException: One or more errors occurred. ---> Helios.Channels.ConnectException: LogError connecting to 127.0.0.1:7096 ---> System.Net.Sockets.SocketException: No connection could be made because the target machine actively refused it
at Helios.Channels.Sockets.SocketChannelAsyncOperation.Validate()
at Helios.Channels.Sockets.TcpSocketChannel.DoFinishConnect(SocketChannelAsyncOperation operation)
at Helios.Channels.Sockets.AbstractSocketChannel.AbstractSocketUnsafe.FinishConnect(SocketChannelAsyncOperation operation)
--- End of inner exception stack trace ---
--- End of inner exception stack trace ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Helios.Channels.Bootstrap.ClientBootstrap.<DoResolveAndConnect>d__15.MoveNext()
---> (Inner Exception #0) Helios.Channels.ConnectException: LogError connecting to 127.0.0.1:7096 ---> System.Net.Sockets.SocketException: No connection could be made because the target machine actively refused it
at Helios.Channels.Sockets.SocketChannelAsyncOperation.Validate()
at Helios.Channels.Sockets.TcpSocketChannel.DoFinishConnect(SocketChannelAsyncOperation operation)
at Helios.Channels.Sockets.AbstractSocketChannel.AbstractSocketUnsafe.FinishConnect(SocketChannelAsyncOperation operation)
--- End of inner exception stack trace ---<---
<---
<---
---> System.AggregateException: One or more errors occurred. ---> System.AggregateException: One or more errors occurred. ---> System.AggregateException: One or more errors occurred. ---> Helios.Channels.ConnectException: LogError connecting to 127.0.0.1:7096 ---> System.Net.Sockets.SocketException: No connection could be made because the target machine actively refused it
at Helios.Channels.Sockets.SocketChannelAsyncOperation.Validate()
at Helios.Channels.Sockets.TcpSocketChannel.DoFinishConnect(SocketChannelAsyncOperation operation)
at Helios.Channels.Sockets.AbstractSocketChannel.AbstractSocketUnsafe.FinishConnect(SocketChannelAsyncOperation operation)
--- End of inner exception stack trace ---
--- End of inner exception stack trace ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Helios.Channels.Bootstrap.ClientBootstrap.<DoResolveAndConnect>d__15.MoveNext()
--- End of inner exception stack trace ---
at System.Threading.Tasks.Task.ThrowIfExceptional(Boolean includeTaskCanceledExceptions)
at System.Threading.Tasks.Task`1.GetResultCore(Boolean waitCompletionNotification)
at System.Threading.Tasks.Task`1.get_Result()
at Akka.Remote.Transport.Helios.HeliosTcpTransport.<>c.<AssociateInternal>b__1_0(Task`1 tr)
at System.Threading.Tasks.ContinuationResultTaskFromResultTask`2.InnerInvoke()
at System.Threading.Tasks.Task.Execute()
--- End of inner exception stack trace ---
--- End of inner exception stack trace ---
at Akka.Remote.Transport.Helios.HeliosTcpTransport.<>c.<AssociateInternal>b__1_1(Task`1 r)
at System.Threading.Tasks.ContinuationResultTaskFromResultTask`2.InnerInvoke()
at System.Threading.Tasks.Task.Execute()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Akka.Remote.Transport.Helios.HeliosTransport.<Associate>d__27.MoveNext()
--- End of inner exception stack trace ---
--- End of inner exception stack trace ---
at Akka.Remote.EndpointWriter.PublishAndThrow(Exception reason, LogLevel level)
at Akka.Remote.EndpointWriter.<Initializing>b__24_1(Failure failure)
at lambda_method(Closure , Object , Action`1 , Action`1 , Action`1 )
at Akka.Tools.MatchHandler.PartialHandlerArgumentsCapture`4.Handle(T value)
at Akka.Actor.ReceiveActor.ExecutePartialMessageHandler(Object message, PartialAction`1 partialAction)
at Akka.Actor.ReceiveActor.OnReceive(Object message)
at Akka.Actor.UntypedActor.Receive(Object message)
at Akka.Actor.ActorBase.AroundReceive(Receive receive, Object message)
at Akka.Actor.ActorCell.ReceiveMessage(Object message)
at Akka.Actor.ActorCell.Invoke(Envelope envelope)
--- End of stack trace from previous location where exception was thrown ---
at Akka.Actor.ActorCell.HandleFailed(Failed f)
at Akka.Actor.ActorCell.SysMsgInvokeAll(EarliestFirstSystemMessageList messages, Int32 currentState)*
this is the hocon for the sending actor
akka {
# here we are configuring log levels
log-config-on-start = on
stdout-loglevel = INFO
loglevel = DEBUG
loggers = ["Akka.Logger.Serilog.SerilogLogger, Akka.Logger.Serilog"]
persistence
{
journal
{
plugin = "akka.persistence.journal.sql-server"
sql-server
{
# qualified type name of the SQL Server persistence journal actor
class = "Akka.Persistence.SqlServer.Journal.SqlServerJournal, Akka.Persistence.SqlServer"
# dispatcher used to drive journal actor
plugin-dispatcher = "akka.actor.default-dispatcher"
# connection string used for database access
connection-string = "Data Source=wcamm0q3pdbd1.gbcaydc.emea.bankofamerica.com,15001;Initial Catalog=BrokerDealer;User ID=BDLFUser;Password=dfnklgkdfkg"
# default SQL commands timeout
connection-timeout = 30s
# SQL server schema name to table corresponding with persistent journal
schema-name = dbo
# SQL server table corresponding with persistent journal
table-name = AKKAJournal
# should corresponding journal table be initialized automatically
auto-initialize = off
# timestamp provider used for generation of journal entries timestamps
timestamp-provider = "Akka.Persistence.Sql.Common.Journal.DefaultTimestampProvider, Akka.Persistence.Sql.Common"
# metadata table
metadata-table-name = AKKAMetadata
}
}
snapshot-store
{
plugin = "akka.persistence.snapshot-store.sql-server"
sql-server
{
# qualified type name of the SQL Server persistence journal actor
class = "Akka.Persistence.SqlServer.Snapshot.SqlServerSnapshotStore, Akka.Persistence.SqlServer"
# dispatcher used to drive journal actor
plugin-dispatcher = "akka.actor.default-dispatcher"
# connection string used for database access
connection-string = "Data Source=wcamm0q3pdbd1.gbcaydc.emea.bankofamerica.com,15001;Initial Catalog=BrokerDealer;User ID=BDLFUser;Password=dfgdfgdfg"
# default SQL commands timeout
connection-timeout = 30s
# SQL server schema name to table corresponding with persistent journal
schema-name = dbo
# SQL server table corresponding with persistent journal
table-name = AKKASnapshot
# should corresponding journal table be initialized automatically
auto-initialize = off
}
}
}
# this config section will be referenced as akka.actor
actor {
provider = "Akka.Remote.RemoteActorRefProvider, Akka.Remote"
debug {
receive = on
autoreceive = on
lifecycle = on
event-stream = on
unhandled = on
}
deployment {
/CashFundingManagementView {
router = smallest-mailbox-pool
nr-of-instances = 1
}
}
}
# here we're configuring the Akka.Remote module
remote {
helios.tcp {
transport-class =
"Akka.Remote.Transport.Helios.HeliosTcpTransport, Akka.Remote"
#applied-adapters = []
transport-protocol = tcp
port = 7095
hostname = "localhost"
}
log-remote-lifecycle-events = INFO
}
this is the destination actor path we use
akka.tcp://NodeSystem#127.0.0.1:7096/user/FundingManagementView
and the destination HOCON
akka {
loglevel = DEBUG
log-config-on-start = on
loggers = ["Akka.Logger.Serilog.SerilogLogger, Akka.Logger.Serilog"]
persistence {
snapshot-store {
# Path to the snapshot store plugin to be used
plugin = "akka.persistence.snapshot-store.local"
# Local filesystem snapshot store plugin.
local {
# Class name of the plugin.
class = "Akka.Persistence.Snapshot.LocalSnapshotStore, Akka.Persistence"
# Dispatcher for the plugin actor.
plugin-dispatcher = "akka.persistence.dispatchers.default-plugin-dispatcher"
# Dispatcher for streaming snapshot IO.
stream-dispatcher = "akka.persistence.dispatchers.default-stream-dispatcher"
# Storage location of snapshot files.
dir = "c:/logs"
}
}
}
actor {
provider = "Akka.Remote.RemoteActorRefProvider, Akka.Remote"
debug {
receive = on
autoreceive = on
lifecycle = on
event-stream = on
unhandled = on
}
deployment
{
/FundingManagementView
{
router = smallest-mailbox-pool
nr-of-instances = 1
}
/RealtimeControllerService
{
router = smallest-mailbox-pool
nr-of-instances = 1
}
/SignalRBridge
{
router = smallest-mailbox-pool
nr-of-instances = 1
}
}
}
remote {
helios.tcp {
transport-class = "Akka.Remote.Transport.Helios.HeliosTcpTransport, Akka.Remote"
transport-protocol = tcp
port = 7096
hostname = 0.0.0.0 # listen on all interfaces
public-hostname = "localhost"
}
}
}
any ideas as to diagnostics, I am currently trying to debug through the association workflow but it will take time...
the OS here is fairly locked down so I wonder if this is caused by some permission issue but still wonder why it inherently works win. service to win. service and not win.servie to IIS (Express) actor system
Any help greatly appreciated.
UPDATE
the same code/config is working on my colleague's box - sounds like my box is funny - I can telnet to the socket occassionally but more often than not, it stops listening
I am trying to test my controller methods for a asp.net web api site I deployed on IIS on Windows Server 2012 R2. But postman returns this response. I don't want to buy a certificate. This is only for test purposes after all. Can I make my self signed certificate trusted? If not, is the a way around this so I could test my web api methods on postman?
{
"Message": "An error has occurred.",
"ExceptionMessage": "An error occurred while sending the request.",
"ExceptionType": "System.Net.Http.HttpRequestException",
"StackTrace": " at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)\r\n at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\r\n at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()\r\n at TetherThingWS.Controllers.AccountController.<LoginUser>d__12.MoveNext()\r\n--- End of stack trace from previous location where exception was thrown ---\r\n at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)\r\n at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\r\n at System.Threading.Tasks.TaskHelpersExtensions.<CastToObject>d__3`1.MoveNext()\r\n--- End of stack trace from previous location where exception was thrown ---\r\n at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)\r\n at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\r\n at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()\r\n at System.Web.Http.Controllers.ApiControllerActionInvoker.<InvokeActionAsyncCore>d__0.MoveNext()\r\n--- End of stack trace from previous location where exception was thrown ---\r\n at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)\r\n at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\r\n at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()\r\n at System.Web.Http.Controllers.ActionFilterResult.<ExecuteAsync>d__2.MoveNext()\r\n--- End of stack trace from previous location where exception was thrown ---\r\n at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)\r\n at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\r\n at System.Web.Http.Filters.AuthorizationFilterAttribute.<ExecuteAuthorizationFilterAsyncCore>d__2.MoveNext()\r\n--- End of stack trace from previous location where exception was thrown ---\r\n at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)\r\n at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\r\n at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()\r\n at System.Web.Http.Controllers.AuthenticationFilterResult.<ExecuteAsync>d__0.MoveNext()\r\n--- End of stack trace from previous location where exception was thrown ---\r\n at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)\r\n at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\r\n at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()\r\n at System.Web.Http.Dispatcher.HttpControllerDispatcher.<SendAsync>d__1.MoveNext()",
"InnerException": {
"Message": "An error has occurred.",
"ExceptionMessage": "The underlying connection was closed: Could not establish trust relationship for the SSL/TLS secure channel.",
"ExceptionType": "System.Net.WebException",
"StackTrace": " at System.Net.HttpWebRequest.EndGetRequestStream(IAsyncResult asyncResult, TransportContext& context)\r\n at System.Net.Http.HttpClientHandler.GetRequestStreamCallback(IAsyncResult ar)",
"InnerException": {
"Message": "An error has occurred.",
"ExceptionMessage": "The remote certificate is invalid according to the validation procedure.",
"ExceptionType": "System.Security.Authentication.AuthenticationException",
"StackTrace": " at System.Net.TlsStream.EndWrite(IAsyncResult asyncResult)\r\n at System.Net.ConnectStream.WriteHeadersCallback(IAsyncResult ar)"
}
}
}