Bugfixes Feb2019Update_ContosoHelpdeskChatBot_master (#73)
* Retargeting projects to Win10 SDK Anniversary * bugfixes
This commit is contained in:
Родитель
7889b68025
Коммит
d8e264b6b3
|
@ -304,7 +304,6 @@
|
|||
<SubType>Designer</SubType>
|
||||
</Content>
|
||||
<Content Include="contosohelpdeskchatbot.bot" />
|
||||
<None Include="Properties\PublishProfiles\ContosoHelpdeskChatBot111 - Web Deploy.pubxml" />
|
||||
<None Include="Web.Debug.config">
|
||||
<DependentUpon>Web.config</DependentUpon>
|
||||
</None>
|
||||
|
|
|
@ -9,9 +9,9 @@ using Microsoft.Bot.Builder;
|
|||
|
||||
namespace ContosoHelpdeskChatBot.Dialogs
|
||||
{
|
||||
[Serializable]
|
||||
public class InstallAppDialog : WaterfallDialog
|
||||
{
|
||||
private static log4net.ILog logger = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType);
|
||||
private Models.InstallApp install = new InstallApp();
|
||||
List<string> names = new List<string>();
|
||||
public static string dialogId = "InstallAppDialog";
|
||||
|
@ -100,6 +100,8 @@ namespace ContosoHelpdeskChatBot.Dialogs
|
|||
db.SaveChanges();
|
||||
}
|
||||
|
||||
logger.Info("InstallAppDialog: AppName = " + install.AppName + "; MachineName = " + install.MachineName);
|
||||
|
||||
await stepContext.Context.SendActivityAsync($"Great, your request to install {install.AppName} on {install.MachineName} has been scheduled.");
|
||||
return await stepContext.EndDialogAsync();
|
||||
}
|
||||
|
|
|
@ -9,7 +9,6 @@ using System.Threading;
|
|||
|
||||
namespace ContosoHelpdeskChatBot.Dialogs
|
||||
{
|
||||
[Serializable]
|
||||
public class LocalAdminDialog : WaterfallDialog
|
||||
{
|
||||
private LocalAdmin admin = new LocalAdmin();
|
||||
|
|
|
@ -11,7 +11,6 @@ using Microsoft.Bot.Builder;
|
|||
|
||||
namespace ContosoHelpdeskChatBot.Dialogs
|
||||
{
|
||||
[Serializable]
|
||||
public class ResetPasswordDialog : WaterfallDialog
|
||||
{
|
||||
public static string dialogId = "ResetPasswordDialog";
|
||||
|
@ -54,6 +53,12 @@ namespace ContosoHelpdeskChatBot.Dialogs
|
|||
if (result == passcode)
|
||||
{
|
||||
string temppwd = "TempPwd" + new Random().Next(0, 5000);
|
||||
using (var db = new ContosoHelpdeskContext())
|
||||
{
|
||||
var reset = db.ResetPasswords.Where(r => r.EmailAddress == email).First();
|
||||
reset.TempPassword = temppwd;
|
||||
db.SaveChanges();
|
||||
}
|
||||
await stepContext.Context.SendActivityAsync($"Your temp password is {temppwd}");
|
||||
return await stepContext.EndDialogAsync();
|
||||
}
|
||||
|
|
|
@ -8,19 +8,21 @@
|
|||
"connectionString" to use "ReleaseSQLServer" only when the "Match" locator
|
||||
finds an attribute "name" that has a value of "MyDB".
|
||||
-->
|
||||
<connectionStrings>
|
||||
<add name="ContosoHelpdeskContext"
|
||||
connectionString="Data Source=leoleo-dev-db.database.windows.net;initial catalog=ContosoHelpdeskData;Integrated Security=False;User ID=leoleo;Password=NinjaCat1!;Connect Timeout=60;Encrypt=True;TrustServerCertificate=False;ApplicationIntent=ReadWrite;MultiSubnetFailover=False"
|
||||
xdt:Transform="SetAttributes" xdt:Locator="Match(name)"/>
|
||||
</connectionStrings>
|
||||
|
||||
<!-- Settings for Azure -->
|
||||
<connectionStrings>
|
||||
<add name="ContosoHelpdeskContext"
|
||||
connectionString="Replace with Azure Database connection string. Hint: Use SQL Server Explorer"
|
||||
xdt:Transform="SetAttributes" xdt:Locator="Match(name)"/>
|
||||
</connectionStrings>
|
||||
|
||||
<log4net>
|
||||
<appender>
|
||||
<connectionString xdt:Transform="Replace" value="Data Source=leoleo-dev-db.database.windows.net;initial catalog=ContosoHelpdeskData;Integrated Security=False;User ID=leoleo;Password=NinjaCat1!;Connect Timeout=60;Encrypt=True;TrustServerCertificate=False;ApplicationIntent=ReadWrite;MultiSubnetFailover=False" />
|
||||
<connectionString xdt:Transform="Replace" value="This should be the same as ContosoHelpdeskContext connection string" />
|
||||
</appender>
|
||||
</log4net>
|
||||
|
||||
|
||||
<system.web>
|
||||
<!--
|
||||
In the example below, the "Replace" transform will replace the entire
|
||||
|
|
|
@ -8,19 +8,21 @@
|
|||
"connectionString" to use "ReleaseSQLServer" only when the "Match" locator
|
||||
finds an attribute "name" that has a value of "MyDB".
|
||||
-->
|
||||
<connectionStrings>
|
||||
<add name="ContosoHelpdeskContext"
|
||||
connectionString="Data Source=leoleo-dev-db.database.windows.net;initial catalog=ContosoHelpdeskData;Integrated Security=False;User ID=leoleo;Password=NinjaCat1!;Connect Timeout=60;Encrypt=True;TrustServerCertificate=False;ApplicationIntent=ReadWrite;MultiSubnetFailover=False"
|
||||
xdt:Transform="SetAttributes" xdt:Locator="Match(name)"/>
|
||||
</connectionStrings>
|
||||
|
||||
<!-- Settings for Azure -->
|
||||
<connectionStrings>
|
||||
<add name="ContosoHelpdeskContext"
|
||||
connectionString="Replace with Azure Database connection string. Hint: Use SQL Server Explorer"
|
||||
xdt:Transform="SetAttributes" xdt:Locator="Match(name)"/>
|
||||
</connectionStrings>
|
||||
|
||||
<log4net>
|
||||
<appender>
|
||||
<connectionString xdt:Transform="Replace" value="Data Source=leoleo-dev-db.database.windows.net;initial catalog=ContosoHelpdeskData;Integrated Security=False;User ID=leoleo;Password=NinjaCat1!;Connect Timeout=60;Encrypt=True;TrustServerCertificate=False;ApplicationIntent=ReadWrite;MultiSubnetFailover=False" />
|
||||
<connectionString xdt:Transform="Replace" value="This should be the same as ContosoHelpdeskContext connection string" />
|
||||
</appender>
|
||||
</log4net>
|
||||
|
||||
|
||||
|
||||
<system.web>
|
||||
<compilation xdt:Transform="RemoveAttributes(debug)" />
|
||||
<!--
|
||||
|
|
|
@ -1,15 +1,15 @@
|
|||
{
|
||||
"name": "BOTNAME",
|
||||
"name": "<bot handle>",
|
||||
"services": [
|
||||
{
|
||||
"type": "endpoint",
|
||||
"name": "development",
|
||||
"endpoint": "ENDPOINT",
|
||||
"appId": "APPID",
|
||||
"appPassword": "PASSWORD",
|
||||
"id": "166"
|
||||
"endpoint": "http://<your bot name>.azurewebsites.net/api/messages",
|
||||
"appId": "<Refer PBI1 Task 5 Step 3>",
|
||||
"appPassword": "<Refer PBI1 Task 5 Step 4>",
|
||||
"id": "http://<your bot name>.azurewebsites.net/api/messages"
|
||||
}
|
||||
],
|
||||
"padlock": "",
|
||||
"version": "2.0"
|
||||
}
|
||||
}
|
||||
|
|
|
@ -11,7 +11,7 @@
|
|||
<AssemblyName>WoodgroveBankATM</AssemblyName>
|
||||
<DefaultLanguage>en-US</DefaultLanguage>
|
||||
<TargetPlatformIdentifier>UAP</TargetPlatformIdentifier>
|
||||
<TargetPlatformVersion Condition=" '$(TargetPlatformVersion)' == '' ">10.0.15063.0</TargetPlatformVersion>
|
||||
<TargetPlatformVersion Condition=" '$(TargetPlatformVersion)' == '' ">10.0.14393.0</TargetPlatformVersion>
|
||||
<TargetPlatformMinVersion>10.0.10586.0</TargetPlatformMinVersion>
|
||||
<MinimumVisualStudioVersion>14</MinimumVisualStudioVersion>
|
||||
<FileAlignment>512</FileAlignment>
|
||||
|
|
|
@ -11,7 +11,7 @@
|
|||
<AssemblyName>WoodgroveBankRegistration</AssemblyName>
|
||||
<DefaultLanguage>en-US</DefaultLanguage>
|
||||
<TargetPlatformIdentifier>UAP</TargetPlatformIdentifier>
|
||||
<TargetPlatformVersion Condition=" '$(TargetPlatformVersion)' == '' ">10.0.15063.0</TargetPlatformVersion>
|
||||
<TargetPlatformVersion Condition=" '$(TargetPlatformVersion)' == '' ">10.0.14393.0</TargetPlatformVersion>
|
||||
<TargetPlatformMinVersion>10.0.10586.0</TargetPlatformMinVersion>
|
||||
<MinimumVisualStudioVersion>14</MinimumVisualStudioVersion>
|
||||
<FileAlignment>512</FileAlignment>
|
||||
|
|
Загрузка…
Ссылка в новой задаче