System.Net.NetworkInformation.NetworkInformationException: The system cannot find the file specified

1

My site works in local. However, when I launch it on azure, I get an error as below.

I used graph api and OwinStartup.

using Microsoft.Owin; using Owin;

[assembly: OwinStartup(typeof(graph_tutorial.Startup))]

namespace graph_tutorial { public partial class Startup { public void Configuration(IAppBuilder app) { ConfigureAuth(app); } } }

How can I fix it?

help me please.

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.Net.NetworkInformation.NetworkInformationException: The system cannot find the file 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.

Stack Trace:


[NetworkInformationException (0x2): The system cannot find the file specified]
   System.Net.NetworkInformation.SystemIPGlobalProperties.GetFixedInfo() +6885092
   System.Net.NetworkInformation.SystemIPGlobalProperties.get_FixedInfo() +94
   System.Net.NetworkInformation.SystemIPGlobalProperties.get_DomainName() +131
   System.Net.CookieContainer..ctor() +102
   System.Net.Http.HttpClientHandler..ctor() +248
   System.Net.Http.WebRequestHandler..ctor() +18
   Microsoft.Owin.Security.OpenIdConnect.OpenIdConnectAuthenticationMiddleware.ResolveHttpMessageHandler(OpenIdConnectAuthenticationOptions options) +37
   Microsoft.Owin.Security.OpenIdConnect.OpenIdConnectAuthenticationMiddleware..ctor(OwinMiddleware next, IAppBuilder app, OpenIdConnectAuthenticationOptions options) +547
   lambda_method(Closure , OwinMiddleware , IAppBuilder , OpenIdConnectAuthenticationOptions ) +55

[TargetInvocationException: Exception has been thrown by the target of an invocation.]
   System.RuntimeMethodHandle.InvokeMethod(Object target, Object[] arguments, Signature sig, Boolean constructor) +0
   System.Reflection.RuntimeMethodInfo.UnsafeInvokeInternal(Object obj, Object[] parameters, Object[] arguments) +168
   System.Delegate.DynamicInvokeImpl(Object[] args) +124
   Microsoft.Owin.Builder.AppBuilder.BuildInternal(Type signature) +222
   Microsoft.Owin.Host.SystemWeb.OwinAppContext.Initialize(Action`1 startup) +465
   Microsoft.Owin.Host.SystemWeb.OwinBuilder.Build(Action`1 startup) +40
   Microsoft.Owin.Host.SystemWeb.OwinHttpModule.InitializeBlueprint() +70
   System.Threading.LazyInitializer.EnsureInitializedCore(T& target, Boolean& initialized, Object& syncLock, Func`1 valueFactory) +119
   Microsoft.Owin.Host.SystemWeb.OwinHttpModule.Init(HttpApplication context) +91
   System.Web.HttpApplication.RegisterEventSubscriptionsWithIIS(IntPtr appContext, HttpContext context, MethodInfo[] handlers) +552
   System.Web.HttpApplication.InitSpecial(HttpApplicationState state, MethodInfo[] handlers, IntPtr appContext, HttpContext context) +181
   System.Web.HttpApplicationFactory.GetSpecialApplicationInstance(IntPtr appContext, HttpContext context) +228
   System.Web.Hosting.PipelineRuntime.InitializeApplication(IntPtr appContext) +314

[HttpException (0x80004005): Exception has been thrown by the target of an invocation.]
   System.Web.HttpRuntime.FirstRequestInit(HttpContext context) +10080656
   System.Web.HttpRuntime.EnsureFirstRequestInit(HttpContext context) +99
   System.Web.HttpRuntime.ProcessRequestNotificationPrivate(IIS7WorkerRequest wr, HttpContext context) +263
asp.net
asp.net-mvc-5
microsoft-graph-api
app-startup
asked on Stack Overflow Sep 9, 2020 by 구자룡

0 Answers

Nobody has answered this question yet.


User contributions licensed under CC BY-SA 3.0