63-0100-000001-00101111-122211-Chipset$1APPW010_BIOS DATE: 03/10/16 14:47:31 VER: 30.03
63-0100-000001-00101111-122211-Chipset$Z77M-D3H_BIOS DATE: 12/31/13 09:36:32 VER: 04.06.05
ID системной платы 63-0100-000001-00101111-122211-Chipset$1APPW010_BIOS DATE: 03/10/16 14:47:31 VER: 30.03
SerialNumber : 151260495100411
__GENUS : 2
__CLASS : Win32_BaseBoard
__SUPERCLASS :
__DYNASTY :
__RELPATH :
__PROPERTY_COUNT : 1
__DERIVATION : {}
__SERVER :
__NAMESPACE :
__PATH :
SerialNumber : 151260495100411
PSComputerName :
ngrok http 3000 -host-header=”localhost:3000”
IDisposable webapp;
private void Run(string address)
{
webapp = WebApp.Start<Startup>("http://localhost:3000/");
// Endpoint musst be configured with netsh:
// netsh http add urlacl url=https://+:8443/ user=<username>
// netsh http add sslcert ipport=0.0.0.0:8443 certhash=<cert thumbprint> appid=<random guid>
// Register WebHook
Bot.Api.SetWebhook("https://dd0173db.ngrok.io:443/WebHook").Wait(); // адрес "https://dd0173db.ngrok.io" берется с консол окна Ngrok
Console.WriteLine("Server Started");
// Stop Server after <Enter>
Console.ReadLine();
//// Unregister WebHook
Bot.Api.SetWebhookAsync().Wait();
}
public class Startup
{
public void Configuration(IAppBuilder app)
{
var configuration = new HttpConfiguration();
configuration.MapHttpAttributeRoutes();
//configuration.Routes.MapHttpRoute("WebHook", "{controller}");
configuration.Routes.MapHttpRoute(
name: "DefaultApi",
routeTemplate: "api/{controller}/{id}",
defaults: new { id = RouteParameter.Optional }
);
app.UseWebApi(configuration);
}
}
public class WebHookController : ApiController
{
//[HttpPost]
[Route(@"api/webhook/update")] // webhook uri api
public async Task<IHttpActionResult> Post([FromBody]Update update)
{
var message = update.Message;
Console.WriteLine("Received Message from {0}, {1}", message.Chat.Id, message.Text);
}
}