小编Jas*_*des的帖子

找不到vs-mda-targets\Microsoft.MDA.targets

尝试使用Visual Studio 2013 Update 3简单地创建一个新的Cordova"空白应用程序".

我看到了模板,但在尝试打开空白应用时,我得到:

找不到导入的项目"C:\ Users\jeades.GC\AppData\Roaming \npm \node_modules\vs-mda-targets\Microsoft.MDA.targets".确认Import声明中的路径是否正确,以及该文件是否存在于磁盘上

在此输入图像描述

尝试安装/重新安装多设备混合应用程序工具,我遇到了同样的问题.节点模块中不存在"vs-mda-targets"文件夹,这是它抱怨的但是我不确定为什么.有任何想法吗?我以为这是用安装创建的?

cordova visual-studio-2013 multi-device-hybrid-apps

9
推荐指数
1
解决办法
4092
查看次数

大小/类型的SqlParameters数组

我正在尝试创建一个dbTyped和大小的SqlParameters数组.这工作正常,但如果我需要另一列,则会导致两个地方都更改代码.

SqlParameter[] parameters = {
                                  new SqlParameter("@first_name", SqlDbType.VarChar, 50),
                                  new SqlParameter("@last_name", SqlDbType.VarChar, 50),
                                  new SqlParameter("@middle_name", SqlDbType.VarChar, 50),
                                  new SqlParameter("@empid", SqlDbType.Int)
                            };
parameters[0].Value = to.FirstName;
parameters[1].Value = to.LastName;
parameters[2].Value = to.MiddleName;
parameters[3].Value = to.EmpId;
Run Code Online (Sandbox Code Playgroud)

这样做的更好方法是什么?

.net c# sqlclient

5
推荐指数
1
解决办法
2万
查看次数

使用真正的随机盐或用户名盐加胡椒进行密码哈希?

考虑以下两种方法:

hashedPassword = hash(trulyRandomSalt + password)
Run Code Online (Sandbox Code Playgroud)

其中 hashedPassword 和 trueRandomSalt 存储在数据库中。

hashedPassword = hash(applicationConstantPepper + uniqueUserName + password)
Run Code Online (Sandbox Code Playgroud)

其中 hashedPassword 和 uniqueUserName 存储在数据库中,applicationConstantPepper 存储在应用程序配置中。在这里,uniqueUserName 充当盐,通常是电子邮件地址。

我已经读过这个问题,它有很多重要的信息,但没有解决应用程序恒定胡椒值以及如何使用用户名作为盐来改进。

我一直使用方法一和 32 位加密随机盐。但是,我刚刚看到另一个应用程序中使用了方法二。我对方法二遇到的第一个问题是它将用户名与哈希值联系起来,这样用户名就永远不会在不重新生成哈希值的情况下更改。

方法二有哪些安全问题?哪种方法是最好的使用方法?

security passwords hash salt

5
推荐指数
1
解决办法
1780
查看次数

COMException未知错误(0x80005000) - DirectoryServices

我在我的一个应用程序上遇到错误,每个月发生几次,但本周发生了两次.当这种情况发生时,第一个用户加载应用程序并开始工作时,它总是第一件事(Web应用程序,3-4个内部用户)错误源于这个非常简单的方法,一旦失败,它将无法工作,直到我重启应用程序池.现在,我也以其他方式查询AD,但这是用户在早上开始工作时调用的第一个AD相关方法.

public DomainUser GetDomainUser(string userLoginName)
    {
        using (PrincipalContext context = new PrincipalContext(ContextType.Domain, this.DomainName))
        {
            using (UserPrincipal user = UserPrincipal.FindByIdentity(context, userLoginName))
            {
                // If user is null, the result is not a UserPrinciple
                if (user != null)
                {
                    string firstName = user.GivenName;
                    string middleName = user.MiddleName;
                    string lastName = user.Surname;
                    int empId = Convert.ToInt32(user.EmployeeId);
                    string emailAddr = user.EmailAddress;
                    string userName = user.SamAccountName;
                    DateTime? accountExp = user.AccountExpirationDate;

                    return new DomainUser
                    {
                        FirstName = firstName,
                        MiddleName = middleName,
                        LastName = lastName,
                        EmployeeId = …
Run Code Online (Sandbox Code Playgroud)

asp.net directoryservices active-directory account-management

5
推荐指数
1
解决办法
4421
查看次数

Internet Explorer DOM7009:无法解析URL上的图像:[url]

我正在使用O365中的SharePoint站点.该网站包含一个列表/库,其中只包含带有.GIF扩展名的员工图像.第三方进程将图像导入SharePoint.我没有关于这个过程的细节.

从SharePoint O365服务器提供时,所有图像都不会显示在IE 11中.即使单独加载图像也不会显示.该问题与此问题所讨论的图像数量或大小无关.相同的精确图像在内部部署的SharePoint 2010服务器上的IE 11中正常显示.Chrome,Firefox等可在两台服务器上正常显示图像.我没有看到任何其他浏览器的这个问题,也没有给出任何警告或控制台错误.它与IE 11以及O365服务器上的这些.GIF图像完全相关.

IE为每个图像显示以下控制台消息:

DOM7009:无法解析URL上的图像:[url]

如何解决此问题以及可能导致此问题的原因?

编辑: 如果我只是从网络上保存图像并尝试通过IE打开图像,则无法显示相同的问题.如果我保存在本地正确显示的图像并尝试通过IE打开它,它也会失败.

标题:http://pastebin.com/vHhs4rm6

sharepoint internet-explorer image gif internet-explorer-11

5
推荐指数
1
解决办法
2万
查看次数

Visual Studio 中的 Git 变基

我想我对 Visual Studio 2019 Git Rebase UI 中的措辞感到困惑。愚蠢的问题。

场景:我在一个名为COREv2.0. 错误修复和其他类似的事情已经致力于master. COREv2.0仍在进行中,但我想从中提取这些更改,master因此我有那些修复程序master

因此,用我自己的话来说,我相信我想将COREv2.0分支重新建立在当前的主节点上。

在 Visual Studio 中,我是否需要从当前分支 ( COREv2.0) ONTO变基master?还是我把它颠倒了?这个屏幕截图是否代表了我想要在这里做的事情?

在此处输入图片说明

git rebase visual-studio

5
推荐指数
2
解决办法
1153
查看次数

configSections是否为web.configInheritInChildApplications =“ false”?

我在IIS 7上有一个.NET 4.0应用程序,其中包含一个嵌套的.NET 2.0应用程序。问题在于,嵌套的.NET 2.0应用程序<configSections>在web.config的内部具有system.web.extensions sectionGroup ,而.NET 4.0父应用程序machine.config也包含这些sectionGroups 。这将导致状态码500服务器错误。

从子应用程序web.config中注释掉system.web.extensions sectionGroup可以,但是在我们的设置中不是可选项。

如何防止在子应用程序中继承父web.config?我已经看到了<location path="." inheritInChildApplications="false">在.NET以前的版本中使用过的方法,但是我应该如何包装location元素呢?

Intellisense向我显示“不允许使用InheritedInChildApplications属性”,并且在我放置它的位置似乎无关紧要。

c# iis inheritance location web-config

3
推荐指数
1
解决办法
2万
查看次数

Azure表存储异常:409冲突是否意外?

我正在使用WindowsAzure.Storage nuget软件包版本9.0.0。

Install-Package WindowsAzure.Storage -Version 9.0.0
Run Code Online (Sandbox Code Playgroud)

以下代码(table.CreateIfNotExistsAsync())引发错误:远程服务器返回错误:(409)冲突。

CloudTableClient tableClient = storageAccount.CreateCloudTableClient();
CloudTable table = tableClient.GetTableReference(tableName);
try
{
    if (await table.CreateIfNotExistsAsync())
    {
        log.Info(string.Format("Created Table named: {0}", tableName));
    }
}
catch (StorageException)
{
    log.Error("If you are running with the default configuration please make sure you have started the storage emulator. Press the Windows key and type Azure Storage to select and run it from the list of applications - then restart the sample.");
    throw;
}

return table;
Run Code Online (Sandbox Code Playgroud)

如果检查StorageException详细信息,则会发现以下消息:指定的表已存在。 …

azure azure-storage azure-table-storage

2
推荐指数
2
解决办法
3404
查看次数

使用语句变体

我发现我的代码库包含各种数据访问代码,其中我以两种不同的方式使用using语句.哪个是更好的方式,这两种方法有什么不同?在using语句中不实例化SqlConnection和SqlCommand可能引起的任何问题?忽略明显的不一致问题.

方法1:

public int SampleScalar(string query, CommandType queryType, SqlParameter[] parameters)
    {
        int returnValue = 0;
        SqlConnection objConn = new SqlConnection(ConnString);
        SqlCommand objCmd = new SqlCommand(query, objConn);
        objCmd.CommandType = queryType;

        if (parameters.Length > 0)
            objCmd.Parameters.AddRange(parameters);

        using (objConn)
        {
            using (objCmd)
            {
                objConn.Open();
                try
                {
                    returnValue = (int)objCmd.ExecuteScalar();
                }
                catch (SqlException e)
                {
                    Errors.handleSqlException(e, objCmd);
                    throw;
                }
            }
        }
        return returnValue;
    }
Run Code Online (Sandbox Code Playgroud)

方法2:

public int SampleScalar2(string query, CommandType queryType, SqlParameter[] parameters)
    {
        int returnValue = 0;
        using (SqlConnection objConn = new SqlConnection(ConnString)) …
Run Code Online (Sandbox Code Playgroud)

c# ado.net using

0
推荐指数
1
解决办法
195
查看次数