我在我的工作者角色中調用了CloudTableClient.CreateTableIfNotExist方法,並收到一個異常,其中一個請求輸入超出範圍。Azure Worker角色內部異常「請求輸入之一超出範圍」。
我做了一個小小的調查,發現這是由於給表名命名了一個非法的表名造成的,但是,我試過給我的表命名幾個不同的名字,但都沒有成功。有些我已經試過了表名是:
- 例外
- exceptioninfo
- listoferrors
所有的人都失敗了同樣的錯誤。
編輯
這裏是我用來創建表的代碼:
public static void InitializeTableStorage()
{
var storageAccount = CloudStorageAccount.Parse(CloudConfigurationManager.GetSetting(Constants.StorageConnectionString));
// Retrieve storage account from connection-string
// Create the table client
CloudTableClient tableClient = storageAccount.CreateCloudTableClient();
// Create the table if it doesn't exist
string tableName = ExceptionsTableName;
tableClient.CreateTableIfNotExist(tableName);
}
這裏是HTTP請求的錯誤了:
請求:
GET https://<account>.table.core.windows.net/Tables('exceptioninfo') HTTP/1.1
User-Agent: Microsoft ADO.NET Data Services
DataServiceVersion: 1.0;NetFx
MaxDataServiceVersion: 2.0;NetFx
x-ms-version: 2011-08-18
x-ms-date: Mon, 03 Sep 2012 21:54:20 GMT
Authorization: SharedKeyLite <AccountName>:aBcDeFgAbCdEfGhIjKlMnOpQrStUba+jKlMn/DqrsTu=
Accept: application/atom+xml,application/xml
Accept-Charset: UTF-8
Host: <account>.table.core.windows.net
Connection: Keep-Alive
<account>
is al升小寫和<AcountName>
是駱駝的情況下(如果這意味着什麼) 這裏是迴應:
HTTP/1.1 400 One of the request inputs is out of range.
Content-Length: 343
Content-Type: application/xml
Server: Microsoft-HTTPAPI/2.0
x-ms-request-id: abcdefgh-ijkl-44ed-9ff2-3d07df99c266
Date: Mon, 03 Sep 2012 21:54:03 GMT
<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<error xmlns="http://schemas.microsoft.com/ado/2007/08/dataservices/metadata">
<code>OutOfRangeInput</code>
<message xml:lang="en-US">One of the request inputs is out of range.
RequestId:abcdefgh-ijkl-44ed-9ff2-3d07df99c266
Time:2012-09-03T21:54:03.6716225Z</message>
</error>
我用同樣的CloudStorageAccount創建隊列和斑點,並且已經取得了成功。
是否有任何其他原因在嘗試在azure中創建表時遇到OutOfRange異常?
或許運行菲德勒跟蹤捕獲REST調用,將其製成(和失敗),你可能會發現在HTTP請求的東西你在嗎? –
你可以發佈你的代碼嗎?我試圖通過名稱「例外」創建一個表,並能夠使用「CreateTableIfNotExist()」方法創建。 –
我剛剛更新了我的確切代碼和Fiddler req和resp –