无论出于何种原因,当我第一次向Azure发布我的服务器时,为我生成了一些非常长的密码,无论出于何种原因我都认为这不是问题.
显然我需要这个发布到我的服务器.
http://i.imgur.com/w5K1ySZ.png
它与我的Azure服务器管理员密码不匹配,我可以从管理门户轻松更改.有没有办法看到这个密码是什么和/或改变它?
我在邮递员中发送以下请求,以便从此网址的Azure Blob存储中检索一个简单的.jpg https://steamo.blob.core.windows.net/testcontainer/dog.jpg
GET /testcontainer/dog.jpg HTTP/1.1
Host: steamo.blob.core.windows.net
Authorization: SharedKey steamo:<my access key>
x-ms-date: Tue, 26 May 2015 17:35:00 GMT
x-ms-version: 2014-02-14
Cache-Control: no-cache
Postman-Token: b1134f8a-1a03-152c-2810-9cb351efb9ce
Run Code Online (Sandbox Code Playgroud)
如果您对Postman不熟悉它只是一个REST客户端 - 可能会忽略Postman-Token标头.
我的访问密钥是从Azure管理门户复制的.
我收到此错误:
Server failed to authenticate the request. Make sure the value of Authorization header is formed correctly including the signature. RequestId:2482503d-0001-0033-60da-9708ed000000 Time:2015-05-26T17:35:41.4577821Z
Run Code Online (Sandbox Code Playgroud)
有了这个AutheticationErrorDetail:
The MAC signature found in the HTTP request '<my access key>' is not the same as any computed signature. Server used following string to sign: 'GET x-ms-date:Tue, …
Run Code Online (Sandbox Code Playgroud) 以本教程为指导(OData/EntityFramework/Asp.Net).
我能够在root上执行一个简单的GET命令.
{
"@odata.context": "http://localhost:49624/$metadata",
"value": [
{
"name": "Appointments",
"kind": "EntitySet",
"url": "Appointments"
},
......
{
"name": "Clients",
"kind": "EntitySet",
"url": "Clients"
}
]
}
Run Code Online (Sandbox Code Playgroud)
但是比这更复杂的东西给了我一个错误信息.(我正在使用null routePrefix.)
http://localhost:49624/Services
Run Code Online (Sandbox Code Playgroud)
给我:
{
"Message": "No HTTP resource was found that matches the request URI 'http://localhost:49624/Services'.",
"MessageDetail": "No type was found that matches the controller named 'Services'."
}
Run Code Online (Sandbox Code Playgroud)
这是我超级简单的GET
[EnableQuery]
public IQueryable<Service> Get()
{
return db.Services;
}
Run Code Online (Sandbox Code Playgroud)
如果重要的话我正在使用Postman来测试这些命令.虽然我认为这是一个非因素.
我为每个表都有一个数据库和一个DbSet.我不知道为什么我不能访问任何这个.
WebApiConfig:
config.MapHttpAttributeRoutes();
ODataModelBuilder builder = new ODataConventionModelBuilder();
builder.EntitySet<Appointment>("Appointments");
builder.EntitySet<Service>("Services");
builder.EntitySet<Employee>("Employees"); …
Run Code Online (Sandbox Code Playgroud)