我显然不了解有关 Razor 页面中模型绑定复杂属性的基本知识。当我的模型无效时,我return Page();在引用模型的复杂属性时会遇到异常。这是我所拥有的精简版本:
楷模:
public class Movie
{
public int Id { get; set; }
public string Title { get; set; }
public Director Director { get; set; }
public string Description { get; set; }
}
public class Director
{
public int Id { get; set; }
public string Name { get; set; }
}
Run Code Online (Sandbox Code Playgroud)
索引.cshtml.cs:
[BindProperty]
public Movie Movie { get; set; }
[BindProperty, Required]
public string Description { get; set; }
public IActionResult OnGet() …Run Code Online (Sandbox Code Playgroud) SSMS 导入/导出数据向导不再在我的 PC 上打开;它立即崩溃并出现以下错误。我尝试通过上下文菜单项“导入数据...”和“导出数据...”以及文件DTSWizard.exe本身在 SSMS 中启动它C:\Program Files (x86)\Microsoft SQL Server Management Studio 18\Common7\IDE\CommonExtensions\Microsoft\SSIS\150\Binn.
自从SSMS 18.9.2发布以来,我一直在使用它,从来没有遇到过这个问题,它是今天才开始出现的。我尝试卸载并重新安装 SSMS 18.9.2 但没有成功。有任何想法吗?
===================================
This wizard will close because it encountered the following error: (Microsoft SQL Server)
------------------------------
For help, click: https://go.microsoft.com:80/fwlink?ProdName=Microsoft%20SQL%20Server&ProdVer=15.0.2000.168&EvtSrc=Microsoft.SqlServer.Management.UI.WizardFrameworkErrorSR&EvtID=UncaughtException&LinkId=20476
===================================
The data is invalid.
------------------------------
Program Location:
at Microsoft.SqlServer.Dts.Runtime.Wrapper.ApplicationClass.get_DBProviderInfos()
at Microsoft.SqlServer.Dts.DtsWizard.DTSWizard.GetDtsDbProviderInfos(WizardInputs wizardInputs)
at Microsoft.SqlServer.Dts.DtsWizard.DataSourceCombo.PopulateProviders(Boolean fSources, WizardInputs wizardInputs)
at Microsoft.SqlServer.Dts.DtsWizard.Step1.OnInitializePage(EventArgs e)
at Microsoft.SqlServer.Management.UI.WizardPage.RaiseEnterPage()
at Microsoft.SqlServer.Management.UI.WizardForm.NextPage(WizardPage nextPage)
at Microsoft.SqlServer.Management.UI.WizardForm.Next_Click(Object sender, EventArgs e)
Run Code Online (Sandbox Code Playgroud)
更新
刚刚注意到我无法在 SQL Server 代理作业中添加或编辑步骤。当我在“作业属性”对话框中单击“新建”或“编辑”时,我会收到类似的“数据无效”错误:
===================================
The data …Run Code Online (Sandbox Code Playgroud)