小编Ste*_*ang的帖子

C#.net MVC,设置Google Application Credentials JSON文件的路径

我刚刚将这个Google Sample Project用于我的VS2015,

但是,在我发布到"IIS"并托管它之后,当我打开链接时,网页会一直显示此消息,如图所示

错误图片

我在web.config中添加了密钥,但仍然无法正常工作,只是想知道是否有人之前已经这样做了,我真的需要帮助,谢谢!

编辑:这是我的代码

Web.Config中

  <appSettings>
<!-- Set to your Google project id as shown on the Google Developers Console -->
<add key="GoogleCloudSamples:ProjectId" value="gdtest-1332" />
<add key="GOOGLE_APPLICATION_CREDENTIALS" value="D:\ProjectCloud\gdtest-12323.json" />
<!--
Set to either mysql or datastore.
If using mysql, update the connectionString far below, and then run Update-Database in the
Package Manager Console.
-->
<add key="GoogleCloudSamples:BookStore" value="datastore" />
<!-- Set to your Google Cloud Storage bucket -->
<add key="GoogleCloudSamples:BucketName" value="cloudstoragetestbillez" />
<add key="webpages:Version" value="3.0.0.0" />
<add key="webpages:Enabled" value="false" …
Run Code Online (Sandbox Code Playgroud)

c# json credentials

11
推荐指数
2
解决办法
6699
查看次数

标签 统计

c# ×1

credentials ×1

json ×1