2017-02-28 6 views
1

私は解決できない永続的な問題があります。
しばらくして私のDLLがメモリからアンロードされたようです。
たとえば、30分間ボットを使用せずに再利用すると、応答が返されるまでに時間がかかったり、dllがRAMになくなり、応答の前にリロードされたりしました。
しばらくボットを使用していないときのラグを修正する方法はありますか?特定の未使用時間の後にラグを持つボット応答

更新:3/1/17

は、「常にオン」オプションを有効にするには、払って提供する上で合格することが必要です。 私はまだデベロッパーであるため、このオファーを渡すことはできません。 毎分メッセージを送信するスクリプトを作成して、ボットをアライブモードに保つソリューションを見つけました。 私のスクリプトはC#で実行されていますが、私は認証エラーを受け取ります。

var authValue = new AuthenticationHeaderValue( "Basic"、Convert.ToBase64String(Encoding.UTF8.GetBytes($ "{MyMicrosoftAppPassword}"))));

var client = new HttpClient() 
    { 
     DefaultRequestHeaders = { Authorization = authValue } 

    }; 

    var jsonObject = new Rootobject() 
    { 
     type = "message", 
     id = "0a24ca1428074419a1679b37e0e3dd39", 
     timestamp = DateTime.Now, 
     serviceUrl = "http://localhost:9000/", 
     channelId = "emulator", 
     from = new From() 
     { 
      id = "2c1c7fa3", 
      name = "User1" 
     }, 
     conversation = new Conversation() 
     { 
      isGroup = false, 
      id = "8a684db8", 
      name = "Conv1" 
     }, 
     recipient = new Recipient() 
     { 
      id = "56800324", 
      name = "Bot1" 
     }, 
     text = "ping", 
     attachments = new object[0], 
     entities = new object[0] 
    }; 

    var content = new StringContent(jsonObject.ToString(), Encoding.UTF8, "application/json"); 
    var result = client.PostAsync("http://emiko.azurewebsites.net/api/messages", content).Result; 
    result.ToString();   

しかし、私は許可エラーを取得: のStatusCode:401、のreasonPhrase: '不正な' バージョン:1.1コンテンツ:System.Net.Http.StreamContent ...

どのように正しくログインできますボットのとで常にに関する公式documentで述べたようにそのURLを (http://emiko.azurewebsites.net/api/messages

+2

可能な複製http://stackoverflow.com/questions/39852390/microsoft-bot-webchat-c​​hannel-500-internal-server-error-failed-to-send-messa/39853068 –

答えて

1

をメッセージを送信します。

あなたのシナリオに基づいて210

By default, web apps are unloaded if they are idle for some period of time. This lets the system conserve resources. In Basic or Standard mode, you can enable Always On to keep the app loaded all the time. If your app runs continuous web jobs, you should enable Always On, or the web jobs may not run reliably.

To activate the option ' Always on ', it is necessary to pass on a paying offer. As I am still there dev, I cannot pass on this offer.

、私はあなたが定期的にあなたがそれら(tutorial1tutorial2)を参照してください可能性があり、いくつかのチュートリアルがあり、ここで、あなたのサイトが生きていることを確認するためのリクエストを送ることができると仮定しました。

関連する問題