Azure関数ツールを使用してビジュアルスタジオ内でAzure関数をデバッグしようとすると問題が発生します。 私は過去に(おそらく1ヶ月前に)働いていましたが、なんらかの理由で今は動作しませんでした。Azure関数 - ビジュアルスタジオが起動しません
私は、Visual Studioを再起動すると、私はappsettings.json
AppSettings.json
内のストレージアカウントを設定してなかった全く新しいきれいな空色の機能プロジェクトを作成し、唯一のタイマーテンプレートプロジェクトに変更しようとしました{
"IsEncrypted": false,
"Values": {
"AzureWebJobsStorage": "DefaultEndpointsProtocol=https;AccountName=YYYAccountKey=XXX;",
"AzureWebJobsDashboard": "DefaultEndpointsProtocol=https;AccountName=YYY;AccountKey=XXX;"
}
}
host.json
それが失敗した後、私は、次
あるgithubの例からhost.jsonにいくつかのコンテンツを追加しようとしました0{
"id": "9f4ea53c5136457d883d685e57164f05",
"functionTimeout": "00:05:00",
"http": {
"routePrefix": "api"
},
"watchDirectories": [ "Shared" ],
"queues": {
"maxPollingInterval": 2000,
"batchSize": 16,
"maxDequeueCount": 5,
"newBatchThreshold": 8
},
"serviceBus": {
"maxConcurrentCalls": 16,
"prefetchCount": 100,
"autoRenewTimeout": "00:05:00"
},
"eventHub": {
"maxBatchSize": 64,
"prefetchCount": 256
},
"tracing": {
"consoleLevel": "verbose",
"fileLoggingMode": "debugOnly"
},
"singleton": {
"lockPeriod": "00:00:15",
"listenerLockPeriod": "00:01:00",
"listenerLockRecoveryPollingInterval": "00:01:00",
"lockAcquisitionTimeout": "00:01:00",
"lockAcquisitionPollingInterval": "00:00:03"
}
}
しかし、それはどちらも役に立ちません。私はVisual Studioでデバッグを開始すると
をどうなり
は、コマンドプロンプトウィンドウが開き、前に、Azureの機能文字のロゴが表示され、その後、テキストの束は、(非常に非常に迅速に< 1秒)を示していますコマンドプロンプトが表示されなくなります。ここで
ウィンドウが
完全なコンソールメッセージ
%%%%%%
%%%%%%
@ %%%%%% @
@@ %%%%%% @@
@@@ %%%%%%%%%%% @@@
@@ %%%%%%%%%% @@
@@ %%%% @@
@@ %%% @@
@@ %% @@
%%
%
Autofac.Core.DependencyResolutionException: An error occurred during the activat
ion of a particular registration. See the inner exception for details. Registrat
ion: Activator = WebScriptHostManager (DelegateActivator), Services = [Microsoft
.Azure.WebJobs.Script.WebHost.WebScriptHostManager], Lifetime = Autofac.Core.Lif
etime.CurrentScopeLifetime, Sharing = None, Ownership = ExternallyOwned ---> A h
ost ID must be between 1 and 32 characters, contain only lowercase letters, numb
ers, and dashes, not start or end with a dash, and not contain consecutive dashe
s.
Parameter name: value (See inner exception for details.) ---> System.ArgumentExc
eption: A host ID must be between 1 and 32 characters, contain only lowercase le
tters, numbers, and dashes, not start or end with a dash, and not contain consec
utive dashes.
Parameter name: value
at Microsoft.Azure.WebJobs.JobHostConfiguration.set_HostId(String value)
at Microsoft.Azure.WebJobs.Script.WebHost.WebHostResolver.CreateScriptHostCon
figuration(WebHostSettings settings)
at Microsoft.Azure.WebJobs.Script.WebHost.WebHostResolver.EnsureInitialized(W
ebHostSettings settings)
at Microsoft.Azure.WebJobs.Script.WebHost.WebHostResolver.GetWebScriptHostMan
ager(WebHostSettings settings)
at Microsoft.Azure.WebJobs.Script.WebHost.AutofacBootstrap.<>c__DisplayClass0
_0.<Initialize>b__2(IComponentContext ct)
at Autofac.RegistrationExtensions.<>c__DisplayClass5_0`1.<Register>b__0(IComp
onentContext c, IEnumerable`1 p)
at Autofac.Builder.RegistrationBuilder.<>c__DisplayClass0_0`1.<ForDelegate>b_
_0(IComponentContext c, IEnumerable`1 p)
at Autofac.Core.Activators.Delegate.DelegateActivator.ActivateInstance(ICompo
nentContext context, IEnumerable`1 parameters)
at Autofac.Core.Resolving.InstanceLookup.Activate(IEnumerable`1 parameters)
--- End of inner exception stack trace ---
at Autofac.Core.Resolving.InstanceLookup.Activate(IEnumerable`1 parameters)
at Autofac.Core.Resolving.InstanceLookup.Execute()
at Autofac.Core.Resolving.ResolveOperation.GetOrCreateInstance(ISharingLifeti
meScope currentOperationScope, IComponentRegistration registration, IEnumerable`
1 parameters)
at Autofac.Core.Resolving.ResolveOperation.Execute(IComponentRegistration reg
istration, IEnumerable`1 parameters)
at Autofac.Core.Lifetime.LifetimeScope.ResolveComponent(IComponentRegistratio
n registration, IEnumerable`1 parameters)
at Autofac.Core.Container.ResolveComponent(IComponentRegistration registratio
n, IEnumerable`1 parameters)
at Autofac.ResolutionExtensions.TryResolveService(IComponentContext context,
Service service, IEnumerable`1 parameters, Object& instance)
at Autofac.ResolutionExtensions.ResolveOptionalService(IComponentContext cont
ext, Service service, IEnumerable`1 parameters)
at Autofac.Integration.WebApi.AutofacWebApiDependencyScope.GetService(Type se
rviceType)
at Autofac.Integration.WebApi.AutofacWebApiDependencyResolver.GetService(Type
serviceType)
at Microsoft.Azure.WebJobs.Script.WebHost.DependencyResolverExtensions.GetSer
vice[TService](IDependencyResolver resolver)
at Microsoft.Azure.WebJobs.Script.WebHost.WebApiConfig.Initialize(HttpConfigu
ration config, ScriptSettingsManager settingsManager, WebHostSettings settings,
Action`2 dependencyCallback)
at WebJobs.Script.Cli.Actions.HostActions.StartHostAction.<RunAsync>d__21.Mov
eNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNot
ification(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.GetResult()
at WebJobs.Script.Cli.ConsoleApp.<RunAsync>d__4`1.MoveNext()
Press any key to continue . . .
サードパーティのプロバイダを使用する代わりに、内蔵の機能を使用して写真をアップロードしてください。 –