我正在尝试从Azure存储容器中列出所有blob。我正在使用Xamarin.Forms PCL,在Android模拟器上进行调试。我收到以下错误:远程服务器返回错误:(403)服务器无法验证请求。确保正确形成Authorization标头的值,包括签名.. 我试图将我的代码放在一个控制台应用程序中,它没有任何错误。
对于Microsoft.WindowsAzure.Storage在PCL上工作,我必须安装WindowsAzure.Storage-Preview.3.2.0-preview,在我的References列表上手动添加引用。
这是我的代码:
...
module.exports = {
entry,
output: {
filename: '[name].js',
path: path.resolve(__dirname, 'dist'),
publicPath: '/'
},
devtool:
process.env.NODE_ENV === 'production' ? 'source-map' : 'inline-source-map',
module: {
rules: [
{
test: /\.jsx?$/,
include: path.resolve(__dirname, './app/view/'),
exclude: /node_modules/,
loader: 'babel-loader'
},
{
test: /\.pcss$/,
include: path.resolve(__dirname, './app/view/'),
use: [
{
loader: 'style-loader'
},
{
loader:
'css-loader?modules&importLoaders=1&localIdentName=[name]__[local]___[hash:base64:5]'
},
{
loader: 'postcss-loader',
options: {
plugins: function() {
return [
require('postcss-import'),
require('postcss-mixins'),
require('postcss-cssnext')({
browsers: ['last 2 versions']
}),
require('postcss-nested'),
require('postcss-brand-colors')
];
}
}
}
],
exclude: /node_modules/
},
{
test: /\.(png|svg|jpg|webp)$/,
use: {
loader: 'file-loader'
}
}
]
},
resolve: {
extensions: ['.js', '.jsx'],
modules: [path.resolve(__dirname, 'node_modules')]
},
plugins
};
当我尝试调用container.ListBlobsSegmentedAsync(token);
时出现错误