小编Ada*_*itt的帖子

ASP.NET无法加载程序集

我的计算机崩溃,我现在无法在Visual Studio 2008中启动我以前工作的ASP.NET Web应用程序 - 收到以下错误:

=== Pre-bind state information ===
LOG: User = Adam-PC\Adam
LOG: DisplayName = log4net
 (Partial)
LOG: Appbase = file:///C:/Users/Adam/Desktop/SV/sview/Src/StoredProcedureTest/SV.Common.Web/
LOG: Initial PrivatePath = C:\Users\Adam\Desktop\SV\sview\Src\StoredProcedureTest\SV.Common.Web\bin
Calling assembly : (Unknown).
===
LOG: This bind starts in default load context.
LOG: Using application configuration file: C:\Users\Adam\Desktop\SV\sview\Src\StoredProcedureTest\SV.Common.Web\web.config
LOG: Using machine configuration file from C:\Windows\Microsoft.NET\Framework\v2.0.50727\config\machine.config.
LOG: Policy not being applied to reference at this time (private, custom, partial, or location-based assembly bind).
LOG: Attempting download of new URL file:///C:/Users/Adam/AppData/Local/Temp/Temporary ASP.NET …
Run Code Online (Sandbox Code Playgroud)

asp.net dll

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

knockout bind text label to dropdown value selected option text

是否有一种简单的方法来绑定div的文本框以根据同一页面下拉列表中所选选项的文本值进行更改?

<div data-bind="text: dropdownValue"></div>
<select>
  <option value="1">Value1</option>
  <option value="2">Value2</option>
</select>
Run Code Online (Sandbox Code Playgroud)

请注意,我不想使用javascript将值放入select元素.我想直接从HTML绑定值.我还可以包含jQuery以使其工作.

data-binding knockout.js drop-down-menu

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

CSS 3柱液体布局,带固定中心柱

我想为我的营销网站制作一个3列布局,顶部横幅中有图像.

我希望液体左/右侧有一个固定的中心.理想情况下,html看起来像这样:

<div id="pixelLeft">&nbsp;</div>
<div id="bannerCenter">
  <img src="images/mybanner.png" />
</div>
<div id="pixelRight">&nbsp;</div>

<style>
#pixelLeft { background: url(../../images/pixel_left_fixed.png) 0 0 repeat-x; }
#pixelRight { background: url(../../images/pixel_right_fixed.png) 0 0 repeat-x; }
#bannerCenter { /* something here to make fixed width of 1550px */ }
</style>
Run Code Online (Sandbox Code Playgroud)

左/右像素侧的图像是1px×460px.图像mybanner.png是1550px x 460px.

提前致谢!(特别是如果它适用于所有浏览器!)

html css layout liquid-layout

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

使用SharpSVN进行SVN存储库身份验证 - 凭据无法正常工作

我在C#中有以下代码:

1.  public static void Main(string[] args) {
2.  Uri repository = new Uri("https://svnserver:port/svn/Src/trunk");
3.  using (SvnClient client = new SvnClient()) {                
4.    client.Authentication.Clear();
5.    client.Authentication.DefaultCredentials = new System.Net.NetworkCredential("user", "pass");
6.
7.    System.Collections.ObjectModel.Collection<SvnLogEventArgs> logEntries;
8.    SvnLogArgs logArgs = new SvnLogArgs();
9.    logArgs.Limit = 1;
10.   client.GetLog(repository, logArgs, out logEntries);
11.   }
12. }
Run Code Online (Sandbox Code Playgroud)

如果我删除第4行和第5行,此代码可以正常工作.我假设它以某种方式在TortoiseSVN本地使用我保存的凭据.但是,我想在服务器环境中运行它,我需要专门传入用户名/密码.但是,只要我尝试输入登录凭据,我就会在第10行收到以下错误:

SharpSvn.SvnRepositoryIOException was unhandled
Message: Unable to connect to a repository at URL
Run Code Online (Sandbox Code Playgroud)

我在这做错了什么?我已经验证我尝试使用的用户名/密码可以正常工作.

c# sharpsvn

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

Shibboleth - 如何阅读属性?

我已成功使用Shibboleth登录我的服务提供商测试页面.然后我转到/Shibboleth.sso/Session页面,我看到以下内容:

Attributes
affiliation: 1 value(s)
entitlement: 1 value(s)
eppn: 1 value(s)
persistent-id: 1 value(s)
unscoped-affiliation: 1 value(s)
Run Code Online (Sandbox Code Playgroud)

我的问题是......如何阅读这些价值观?我在Fiddler的HTTP Request标头中看不到它们.

我的Web应用程序将在ASP.NET MVC 4(C#)中实现.

attributes shibboleth

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

ASP.Net Web API帮助页面区域返回空输出

我有一个预先存在的MVC应用程序,我使用Nuget添加了Web API和Web API自我文档.虽然Web API控制器运行正常(返回对HTTP请求的有效响应),但帮助控制器未找到任何要记录的Web API方法.

在帮助控制器索引操作"Configuration.Services.GetApiExplorer().ApiDescriptions"返回0结果.

填充ApiDescriptions的是什么,我需要设置任何配置设置以将我的API暴露给文档吗?

帮助区域与我的应用程序的其余部分是一个单独的区域.这是否导致找到控制器的部件找不到我的控制器?此外,我甚至添加了一个帮助剪切到HelpController本身,这仍然没有导致API描述.

我的API控制器也有特殊的路由,所以我不确定这是否相关.

documentation documentation-generation asp.net-web-api

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

有没有办法将范围传递给指令templateUrl:function?

我有一个指令,我正在循环调用.循环中的每个项都有一个FieldTypeId属性,并且根据FieldTypeId的值,我想换出模板的URL.我觉得这是一种更好的多态方法,而不是在html中执行ng-switch语句.

<div ng-repeat="item in attributes">
  <div attribute-input></div>
</div>
Run Code Online (Sandbox Code Playgroud)

当然,$scope这个指令中没有:

editStudentAccountModule.directive('attributeInput', function () {
        return {
            restrict: "AE",
            templateUrl: function () { // 
               var attribute = $scope.attributes[$scope.$index];
               if (attribute.FieldTypeId == 1) {
                 return '../Templates/dropdown.html';
               } else if (attribute.FieldTypeId == 2) {
                 return '../Templates/radio.html';
               } // etc.
            }
        }
    });
Run Code Online (Sandbox Code Playgroud)

angularjs angularjs-directive angularjs-scope

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

jqPlot pieRenderer图例方块未显示

我正在运行jqPlot,由于某种原因,应该显示在饼图渲染器图例中的颜色编码方块没有出现.我想知道它是否与我正在使用twitter bootstrap的事实有关?我没有使用任何其他css库.

        var plot1 = jQuery.jqplot('chartdiv', [graphData],
        {
            grid: {
                shadow: false, 
                background: '#FFFFFF',                                                                                          
            },
            seriesDefaults: {
                // Make this a pie chart.
                renderer: jQuery.jqplot.PieRenderer,
                rendererOptions: {
                    // Put data labels on the pie slices.
                    // By default, labels show the percentage of the slice.
                    showDataLabels: true,
                    padding: 20,
                    startAngle: 270 
                }
            },
            legend: {
                show: true,
                location: 'e',
                fontSize: 11,
                marginTop: 10,                                
            }
        });
Run Code Online (Sandbox Code Playgroud)

jqplot

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

带有子接口的ASP.NET MVC 4 ViewModel

有没有办法在没有自定义模型绑定的情况下处理这个问题?

public class MyViewModel {
  public string UserId { get; set; }
  public IJob Job { get; set; }
}

public interface IJob {
  public long Id { get; set; }
  public string CompanyName { get; set; }
}

public class FullTimeJob : IJob {
  // omitted for brevity
}

public class Internship : IJob {
  // omitted for brevity
}
Run Code Online (Sandbox Code Playgroud)

我遇到的问题是我在默认模型绑定器中遇到错误,因为它不了解实例化IJob的实现.当我创建MyViewModel时,我将FullTimeJob的实例设置为其Job属性.我猜ASP.NET不能保留实现类型?

什么是最佳实践解决方案?

c# asp.net asp.net-mvc-4 asp.net-mvc-viewmodel

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

sql使用subselect更新多行

我试图将gradu_term表中相应的gradu_date值复制到user_education_mba_school表中具有匹配的gradu_term_id的行中.这是我的非工作查询

TABLE DEFS
**user_education_mba_school
  school_id
  graduation_date
  graduation_term_id

**graduation_term
  graduation_term_id
  graduation_year_id
  graduation_date

**graduation_class
  graduation_class_id
  graduation_year_id  

**user
  user_id
  graduation_class_id
Run Code Online (Sandbox Code Playgroud)

- 多连接不起作用......

UPDATE  u
SET     graduation_class_id = gc.graduation_class_id
FROM    [user] u
JOIN    user_education_mba_school mba
ON      mba.user_id = u.user_id
JOIN    graduation_term gt
ON      mba.graduation_term_id = gt.graduation_term_id
JOIN    graduation_class gc
ON      gt.graduation_year_id = gc.graduation_year_id
Run Code Online (Sandbox Code Playgroud)

sql subquery sql-update

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