发布到Google Cloud

时间:2019-05-26 16:59:29

标签: asp.net asp.net-web-api

当尝试将我的api发布到Google云时,遇到无法修复的错误,我真的不知道该怎么做

首先,我尝试在本地测试它以检查其连接字符串是否有问题(在useMySql中查找错误)或在我的数据库中是否有问题,但是没有问题

ERROR: (gcloud.app.deploy) Error Response: [9] 
Application startup error:[40m[1m[33mwarn[39m[22m[49m:
Microsoft.AspNetCore.DataProtection.KeyManagement.XmlKeyManager[35]
No XML encryptor configured. Key {61770642-0594-457d-ad48-a955f9c845be} may be persisted to storage in unencrypted form. 
Application startup exception: System.Exception: Could not resolve a service of type 'RestApiTrivia.Database.ShowDbContext' for the parameter 'showDbContext' of method 'Configure' on type 'RestApiTrivia.Startup'. ---> System.ArgumentNullException: Value cannot be null. 
Parameter name: connectionString at Microsoft.EntityFrameworkCore.Utilities.Check.NotEmpty(String value, String parameterName) at Microsoft.EntityFrameworkCore.Infrastructure.RelationalOptionsExtension.
With connectionString(String connectionString) at Microsoft.EntityFrameworkCore.MySQLDbContextOptionsExtensions.UseMySQL(DbContextOptionsBuilder optionsBuilder, String connectionString, Action`1 MySQLOptionsAction)

0 个答案:

没有答案