其實我不太確定這是By-design 還是Product limit 還是環境因素
原因是資料儲存在Disk上,第一次讀時會需要時間把資料從Disk Load到Memory裡
cache之後執行速度就會變快。
我後來是加了 execution plan 來定期更新 statistic,這問題就不會影響到Production
my007FFF 發表在 痞客邦 留言(0) 人氣(171)
my007FFF 發表在 痞客邦 留言(0) 人氣(45)
測試Block Specific IP Addresses from Accessing a Web Role(http://msdn.microsoft.com/en-us/library/windowsazure/jj154098.aspx)時碰到了個問題
錯誤訊息:
Recycling ..... Application startup task failed with exit code 1.
my007FFF 發表在 痞客邦 留言(0) 人氣(7)

其實這不僅僅是發生在Azure,一般Server也有同樣的狀況。
If the server is exhibiting a strange network performance problem or strange connectivity problem maybe the issue is with TCP Chimney.
The fastest way to determine if any TCP connection on the system is offloaded is to use the netstat command with the –t command. Here is an example:
C:\Windows\system32>netstat -t
my007FFF 發表在 痞客邦 留言(0) 人氣(437)

因為是測試用,所以我是用self-signed certificate:
***注意喔~self-signed certificate的有效期只有一年
IIS Manager > Server Certificates > Create Self-Signed Certificate
取得Thumbprint: IIS Manager > Server Certificates > [Cert Name] > View > [Details] Tab > Thumbprint
匯出Cert: 取得Thumbprint: IIS Manager > Server Certificates > [Cert Name] 按右鍵 > Export
my007FFF 發表在 痞客邦 留言(0) 人氣(62)
public GraphClient(string tenantDomainName, string tenantId, string appPrincipalId, string servicePrincipalSymmetricKey)
{
this.tenantDomainName = tenantDomainName;
this.tenantId = tenantId;
this.servicePrincipalSymmetricKey = servicePrincipalSymmetricKey;
this.appPrincipalId = appPrincipalId;
dataService = new DirectoryDataService(GetConnectionUri());
dataService.SendingRequest += (sender, args) =>
{
var webRequest = ((HttpWebRequest)args.Request);
webRequest.Headers.Add(HeaderName_Authorization, GetAuthorizationHeader());
webRequest.Headers.Add(HeaderName_DataContractVersion, DataContractVersion);
webRequest.Headers.Add(HeaderName_ClientRequestId, Guid.NewGuid().ToString());
};
}
my007FFF 發表在 痞客邦 留言(0) 人氣(6)
在Azure portal執行:
1. 新建 Windows Azure AD directory tenant
2. 建立directory users
3. 註冊application來啟用Web sign on
Management Portal > Active Directory > Integrated Apps
my007FFF 發表在 痞客邦 留言(0) 人氣(6)
基本trouble shooting步驟:
到manage portal上啟用遠端連線: [Cloud Service] > [cloud service名稱] > [Configure] > [Remote]
檢查設定及錯誤訊息:
1. 遠端連進有問題的Role Instance後,到C:\Logs\WaBootStrapper.log
一般來說,如果是Startup Task沒有執行完畢導致Role Recycle,在這裡應該可以看到Log的最後一行是停在執行Startup Task,且可以在這裡看到是哪一個Task無法完成。
此時可以跟E:\或是F:\的RoleModel.xml來比對Startup Task的相關資料。
接著可以檢查Task Manager裡面,WaIISHost.exe或是WaWorkerHost.exe是不是有正常執行?
WaIISHost與WaWorkerHost是Role Instance的Host Process,他們會先載入E:\或是F:\下的__RoleEntry這個檔案中所指定的Role Entry,如果無法載入,Role Instance也就無法順利啟動。
2. 如果需要Debug WaIISHost.exe與WaWorkerHost.exe,可以透過Windbg來attach到該process然後看看是否有甚麼錯誤。
3. 打開Event Viewer,看看裡面有沒有甚麼明顯的訊息。
如果程式有丟出Exception,可以在這裡看到。
4. 瀏覽本機網頁,看看網站是不是有回報錯誤。
如果看到Could not load xxx assembly or its depencies;表示網站所需要的DLL 沒有佈署到雲端上,這時要回到Visual Studio中將所有reference到的DLL都設定Copy Local,並確認該安裝的元件都有包在package裡面
my007FFF 發表在 痞客邦 留言(0) 人氣(15)
看完了這篇文章(http://vniklas.djungeln.se/2013/08/21/shrinking-the-c-system-vhd-disk-in-azure-iaas/)講的步驟後,
我決定還是用resize的方式比較保險。
這篇文章說明了Resize的步驟:
http://blog.maartenballiauw.be/post/2013/01/07/Tales-from-the-trenches-resizing-a-Windows-Azure-virtual-disk-the-smooth-way.aspx
my007FFF 發表在 痞客邦 留言(0) 人氣(10)
之前試著要匯入大概100MB的資料,發現用SQL Server Import and Export Wizard 很麻煩
找了一下發現用SQLCMD可以達到我的需求:
sqlcmd -S <server\instance> -i <script file> -o
my007FFF 發表在 痞客邦 留言(0) 人氣(14)