小编Md.*_*rim的帖子

Google Chrome"解析SourceMap失败":css.map(Web Essential)

Visual Studio 2013 UP5 + Web Essential(v.2.6.36)生成的css.map文件在"Google Chrome"中无效,但在"Firefox"中有效.因此,无法在Google Chrome中调试较少的文件. 解析SourceMap失败:css映射文件

目前,我使用的是Web Essential 2.6.36(+ Visual Studio 2013 Up5).我可以从google chrome的开发人员设置中禁用源地图.哪个会删除这些错误,但是我们仍然无法调试更少的文件并更改样式.这是一个可怕的问题.

Google Chrome开发者工具:禁用源地图解析

任何建议将被认真考虑.先感谢您.

css google-chrome less source-maps web-essentials

28
推荐指数
1
解决办法
4万
查看次数

ASP.NET MVC 5自定义脚手架选项[t4模板]

目前,我正在开发一个框架,我想在visual studio菜单中添加自定义脚手架选项.

自定义脚手架选项

默认情况下,"对话框中带有视图的MVC5控制器,使用实体框架"选项3选择"CodeTemplates\MvcControllerWithContext\Controller.cs.t4",t4再次定位内部视图t4模板

  • "CodeTemplates\MvcView\ModelMetadataFunctions.cs.include.cs.t4"
  • "CodeTemplates\MvcView\Create.cs.t4"
  • "CodeTemplates\MvcView\Edit.cs.cs.t4"
  • "CodeTemplates\MvcView\Delete.cs.cs.t4"
  • "CodeTemplates\MvcView\List.cs.cs.t4"

可视化

我已经修改了t4模板差不多一年了,我还没有发现一条证据表明它是如何针对这些视图或者如何在脚手架对话框中添加选项.我搜索了很多,但是没有找到任何接近的东西.

总之,我只是在寻找可以添加或修改这些t4模板位置的地方,并在脚手架对话框中添加新脚手架的引用.

任何答案都将非常感激.谢谢.

asp.net-mvc t4 asp.net-mvc-3 asp.net-mvc-scaffolding t4scaffolding

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

ASP.NET MVC 5.1 C#OWIN facebook身份验证或登录请求生日,喜欢,公开个人资料,电话号码

我看过很多关于facebook身份验证的帖子,要么是旧的,要么是不正常的.

然而,最后我在我的项目中做了一些有效但不完全的东西.这是我要求的代码

        var facebookAuthenticationOptions = new FacebookAuthenticationOptions()
        {
            AppId = "...ID",
            AppSecret = "...AppSecret",
            AuthenticationType = "Facebook",
            SignInAsAuthenticationType = "ExternalCookie",
            //Provider = new FacebookAuthenticationProvider
            //{
            //    OnAuthenticated = async ctx =>
            //    {
            //        if (ctx.User["birthday"] != null)
            //        {
            //            ctx.Identity.AddClaim(new Claim(ClaimTypes.DateOfBirth,ctx.User["birthday"].ToString()));
            //        }
            //    }
            //}
        };
        facebookAuthenticationOptions.Scope.Add("user_birthday");
        //facebookAuthenticationOptions.Scope.Add("first_name");
        //facebookAuthenticationOptions.Scope.Add("last_name");
        //page goes blank if ask for first_name,last_name , if comment out works
        //but doesn give date of birth or likes or other things.
        facebookAuthenticationOptions.Scope.Add("publish_stream");
        facebookAuthenticationOptions.Scope.Add("user_likes");
        facebookAuthenticationOptions.Scope.Add("friends_likes");
        facebookAuthenticationOptions.Scope.Add("read_stream");
        facebookAuthenticationOptions.Scope.Add("email"); …
Run Code Online (Sandbox Code Playgroud)

c# asp.net-mvc facebook-login owin asp.net-mvc-5.2

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

C# - 动态加载 DLL - System.Reflection.ReflectionTypeLoadException:无法加载一种或多种请求的类型

在 C# 中,当尝试获取类型时,使用下面的代码从文件夹加载 DLL,获取下面的堆栈跟踪。

var assembly = Assembly.LoadFile(assemblyInfo.FullName); // assembly loads perfectly using the absolute path.
var types = assembly.GetTypes(); // this line throws the below stacktrace.
Run Code Online (Sandbox Code Playgroud)

堆栈跟踪:

System.Reflection.ReflectionTypeLoadException: Unable to load one or more of the requested types. Retrieve the LoaderExceptions property for more information.
   at System.Reflection.RuntimeModule.GetTypes(RuntimeModule module)
   at System.Reflection.Assembly.GetTypes()
Run Code Online (Sandbox Code Playgroud)

我还检查了现有的解决方案:错误消息“无法加载一种或多种请求的类型”。检索 LoaderExceptions 属性以获取更多信息。,在 C# 中运行时加载 DLL(不起作用)

c# dll dllimport dll-injection dynamic-dll-import

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

Outlook Office 365:无法检索刷新令牌,因为“AADSTS70000”为“代码”参数提供的值无效

在下面的代码中,我可以从 email@company.com 电子邮件地址成功检索刷新令牌。但是,当我尝试使用 email@outlook.com 登录时,它不会提供刷新令牌,而是返回此响应。

回复:

{
  "error": "invalid_grant",
  "error_description": "AADSTS70000: The provided value for the 'code' parameter is not valid. The code has expired.\r\nTrace ID: ...\r\nCorrelation ID: ...\r\nTimestamp: 2016-05-19 10:13:05Z",
  "error_codes": [
    70000
  ],
  "timestamp": "2016-05-19 10:13:05Z",
  "trace_id": "8cceb393-....",
  "correlation_id": "5227de8...."
}
Run Code Online (Sandbox Code Playgroud)

代码:

 private async Task<string> GetRefreshRoken(string authCode, string onSuccessRedirectUri) {
        var client = new HttpClient();
        var parameters = new Dictionary<string, string>
       {
          {"client_id", _clientId},
          {"client_secret", _clientSecret},
          {"code",authCode }, // what retreived from //https://login.microsoftonline.com/common with authroization.
          {"redirect_uri",  onSuccessRedirectUri}, //http://localhost:27592/Home/Authorize …
Run Code Online (Sandbox Code Playgroud)

outlook oauth access-token oauth-2.0 office365

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

LINQ:如何搜索2个列表(两个列表:实体列表和数组)组合?

假设我是Member我不想包含的名称的实体和名单.

var excludeNames = new [] { "A","B","C","D"};

var members = db.Members.Except(excludeNames);
Run Code Online (Sandbox Code Playgroud)

要么

 var excludeNames = new[]{ "A","B","C","D"};
 var Members = db.Members.Where(m=> excludeNames.Where(xcl => xcl != m.Name));
Run Code Online (Sandbox Code Playgroud)

这些都不起作用.我也试过这个:

 var excludeNames = new[] { "A","B","C","D"};
 var members = from m in db.Members
               from xcl in excludeNames
               where m.Name != xcl
               select m;
Run Code Online (Sandbox Code Playgroud)

linq linq-to-objects linq-to-entities entity-framework

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