应该将Android项目中的哪些文件提交到版本控制存储库?哪些文件不应该提交?
现在我的.gitignore文件包含以下几行:
# Android generated files #
###########################
android.keystore
local.properties
bin/
gen/
libs/
obj/
# OS generated files #
######################
.DS_Store*
ehthumbs.db
Icon?
Thumbs.db
# Eclipse generated files #
###########################
.settings/org.eclipse.jdt.core.prefs
Run Code Online (Sandbox Code Playgroud)
我错过了什么吗?
在我的appsettings.json中,当我使用此代码段时:
"ConnectionStrings": {
"CssDatabase": "Server=BLUEJAY\\MSSQLSERVER2014;Database=CSS;Trusted_Connection=True;"
}
Run Code Online (Sandbox Code Playgroud)
我可以按预期连接到数据库......没问题.
但是,当我更改它以使用SQL别名(CSSDB)时,如下所示:
"ConnectionStrings": {
"CssDatabase": "Server=CSSDB;Database=CSS;Trusted_Connection=True;"
}
Run Code Online (Sandbox Code Playgroud)
它已正确配置,因为我可以在SSMS中使用此SQL别名连接到DB而不会出现问题.
返回:
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 network path was not found
Run Code Online (Sandbox Code Playgroud)
我在用Microsoft.EntityFrameworkCore.
我正在尝试从我们的 API 实例中获取数据。我拥有的代码几乎是复制了 MS 网站,并在 SO 上找到了柚木。我正在使用的代码是这样的:
string peopleEndpoint = $"{apiConf.ApiEndpoint}/{apiConf.dbspec}/_table/mdm.PEOPLE_SV";
string json = null;
try
{
using (var httpClient = new HttpClient())
{
httpClient.DefaultRequestHeaders.Accept.Add(new MediaTypeWithQualityHeaderValue("application/json"));
httpClient.DefaultRequestHeaders.Add("X-Api-Key", apiConf.ApiKey);
HttpResponseMessage response = await httpClient.GetAsync(peopleEndpoint);
json = await response.Content.ReadAsStringAsync();
}
}
catch (Exception ex)
{
Debug.WriteLine(ex.ToString());
throw;
}
Run Code Online (Sandbox Code Playgroud)
配置值很好...我可以将它们复制并粘贴到 cURL 命令中并获取数据。与标题相同。
现在,当我调试时,执行此行后停止执行:
HttpResponseMessage response = await httpClient.GetAsync(peopleEndpoint);
Run Code Online (Sandbox Code Playgroud)
而且,在输出窗口中,我看到的是:
The program '[10172] dotnet.exe' has exited with code 0 (0x0).
The program '[10172] dotnet.exe: Program Trace' has exited with code 0 (0x0).
Run Code Online (Sandbox Code Playgroud)
我如何找出导致此失败的原因?
该框架记为: …
我正在尝试执行此文件中定义的代码:
但是,当我尝试获取 object_id (data.azurerm_client_config.current.object_id) 时,我发现该值为空。因此,我无法进一步设置访问策略。
现在查看其他人关于空 object_id 的帖子,它说这是由于 Azure CLI 的更改所致。
鉴于此,如何为当前客户端设置密钥保管库中的访问策略?