小编mim*_*imo的帖子

带有WCF错误的https:"找不到与方案https匹配的基址"

我转到https://mywebsite/MyApp/Myservice.svc并收到以下错误:

(如果我使用http://链接有效)

" 由于编译期间的异常,无法激活服务'/MyApp/MyService.svc'.例外消息是:找不到与绑定BasicHttpBinding的端点的方案https匹配的基址.注册的基址方案是[http ] .. "

编辑:所以如果我address=""改为address="https:// ..."那么我得到这个错误:

" 错误:不支持协议'https'..... '带有合同的' https://.../Annotation.svc ' 的ChannelDispatcher '"Annotation"'无法打开其IChannelListener. "

这是我的Web.Config样子:

<services>
      <service behaviorConfiguration="AnnotationWCF.AnnotationBehavior"
              name="AnnotationWCF.Annotation">
              <endpoint address="" binding="basicHttpBinding" bindingConfiguration="BasicHttpBinding_Annotation"
                      contract="AnnotationWCF.Annotation" />
              <endpoint address="" 
                  binding="basicHttpBinding" bindingConfiguration="SecureTransport"
                  contract="AnnotationWCF.Annotation" />
              <endpoint address="mex" binding="mexHttpBinding" contract="IMetadataExchange" />
      </service>
Run Code Online (Sandbox Code Playgroud)

<bindings>
<basicHttpBinding>
    <binding name="BasicHttpBinding_Annotation" maxBufferSize="2147483647"
            maxReceivedMessageSize="2147483647">
        <readerQuotas maxDepth="2147483647" maxStringContentLength="2147483647"
            maxArrayLength="2147483647" maxBytesPerRead="2147483647"
            maxNameTableCharCount="2147483647" />
    </binding>
    <binding name="SecureTransport" maxBufferSize="2147483647"
            maxReceivedMessageSize="2147483647">
        <security mode="Transport">
        <transport clientCredentialType="None"/>
        </security>
        <readerQuotas maxDepth="2147483647" maxStringContentLength="2147483647"
            maxArrayLength="2147483647" maxBytesPerRead="2147483647"
            maxNameTableCharCount="2147483647" />
    </binding> …
Run Code Online (Sandbox Code Playgroud)

https wcf

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

Eclipse控制台不显示整个输出

在Java中,我尝试将String作为输出写入控制台.String的长度为20166个字符.将字符串打印到控制台后,只显示字符串的后半部分.

整个字符串是一个长行:

它看起来像: 从一开始就有很多空格(应该是字母数字字符),然后就会显示其余的字符串.

我试图将控制台编码从默认更改为UTF-16和UTF-8,但它没有帮助.

我试图输出的字符串是从特定网页抓取的文本内容(http://docs.jquery.com/Tutorials:Getting_Started_with_jQuery).如果我抓取不同的网页,则没有问题.

我如何处理字符串: 我使用web服务从网页获取文本内容.返回的String(文本contet)正确打印(整个).我需要处理这个字符串,所以我将所有字符更改为小写,并用单个空格替换所有多个空格.

textContent.toLowerCase().replaceAll("\\s+", " ");
Run Code Online (Sandbox Code Playgroud)

在小写字符后,我仍然可以正确打印整个字符串,但在用一个替换多个空格后,字符串的开头是不可见的.

你知道问题是什么吗?

Thakns提前提供任何帮助.

java eclipse

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

是否有用于TFS 2013内部部署安装的REST API?

我们使用Team Foundation Server 2013公司进行源代码和任务管理.有没有办法如何通过REST API操作积压工作项?

我们的项目可通过网址访问:https://tfs.company.com/tfs/ProjectCollection/Project

我发现了这个:https://tfsodata.visualstudio.com/但这似乎只适用于https://visualstudio.com中的项目.

我还要感谢一些例子.

谢谢!

tfs-sdk tfs2013 azure-devops-rest-api

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

为什么任何html按钮导致aspx页面回发?

我在SharePoint网站上创建了.aspx页面,并在页面HTML按钮中插入.

    <PublishingWebControls:editmodepanel PageDisplayMode="Display" runat="server" SuppressTag="True">
...
<button>Click Me!</button>
...
</PublishingWebControls:editmodepanel>
Run Code Online (Sandbox Code Playgroud)

每次我点击"Click Me!" 发回邮件.这不是我想要的行为,但我找到了一种如何不引起回发的方法.我将javascript代码添加到onclick属性中<button onclick='return false;'>Click Me!</button>

我的问题是,为什么回发后,即使按钮不包含type="submit"属性?

我还检查了母版页,其中包含<form runat="server">并包装了所有内容,但也没有action="page.aspx"属性.

html javascript asp.net sharepoint

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

容器类型CSS属性的“size”和“inline-size”有什么区别

我正在尝试使用container-type属性来设置一个容器查询,当达到容器的特定高度时,该查询将更改子元素的对齐方式。

.snackbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  
  width: 500px;
  
  margin: 0 auto;
  padding: 12px;
  
  border-radius: 4px;
  
  color: white;
  background-color: #333;
  
  font-size: 14px;
  font-family: sans-serif;
}

.snackbar-inline-size {
  container-type: inline-size;
  container-name: mySnackbar;
}

.snackbar-size {
  container-type: size;
  container-name: mySnackbar;
}

.snackbar-size-fixed-height {
  container-type: size;
  container-name: mySnackbar;
  height: 100px;
}

.actions-container {
  display: flex;
  align-items: center;
  justify-content: center;
}

.actions-container button {
  margin-left: 12px;
}

@container mySnackbar (min-height: 40px) {
  .actions-container {
    align-self: flex-end;
  }
}
Run Code Online (Sandbox Code Playgroud)
<h2>container-type: inline-size</h2> …
Run Code Online (Sandbox Code Playgroud)

html css container-queries

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

在 Visual Studio Code 的源代码管理中查看嵌套存储库的更改

如何配置 VS Code 以显示多个存储库的更改?

我有以下结构:

- Repository 1 (git repo)
|- src
|- test
|- ...
|- Widgets (git repo)
   |- src
   |- test
   |- ...
Run Code Online (Sandbox Code Playgroud)

两者Repository 1都有文件Widgets.git。在“源代码管理”中,我只能看到 的更改Repository 1,但看不到Widgets

另外,在“源代码控制 - 源代码控制提供程序”中我只能看到Repository 1.

VS Code 源代码控制

我尝试将Repository 1和都配置Widgets为工作空间文件夹,但没有帮助。在GitLens扩展中,我独立地看到两个存储库,但无法从那里提交。

visual-studio-code

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

TypeError:'undefined'不是对象

我有一个目前相当功能失调的Javascript程序,这一直导致我的问题.但是,它抛出一个我不明白的错误:

TypeError: 'undefined' is not an object (evaluating 'sub.from.length')
Run Code Online (Sandbox Code Playgroud)

正如你可能猜到的那样,我正在尝试做的是检查dict length中的某个" from"数组sub.这是整个函数源代码,这里是我认为导致错误的循环代码:

console.log(afcHelper_ffuSubmissions.length); // just for debugging, returns the correct number
for (var i = 0; i < afcHelper_ffuSubmissions.length; i++) { // this whole section works fine
    var sub = afcHelper_ffuSubmissions[i];
    //console.log("THIS IS BROKEN DOWN BY LINK",afcHelper_Submissions[i]);
    if (pagetext.indexOf(afcHelper_ffuSections[sub.section]) == -1) {
        // Someone has modified the section in the mean time. Skip.
        document.getElementById('afcHelper_status').innerHTML += '<li>Skipping ' + sub.title + ': Cannot …
Run Code Online (Sandbox Code Playgroud)

javascript

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

如何在自定义angularjs模块的Visual Studio代码中添加intellisense?

有没有办法为我的自定义模块/服务添加intellisense支持?

我找到了关于如何为AngularJS API添加智能感知的文章,但没有找到任何,如何为我的项目私有的模块和服务创建一个.

我使用的是Visual Studio Code v 0.9.2

intellisense angularjs visual-studio-code

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

如何解决无法添加对'Microsoft.WITDataStore'的引用?

我得到空Class library项目,并希望安装以下NuGet作为依赖:

nuget-bot.Microsoft.TeamFoundation.WorkItemTracking.Client.DataStoreLoader.12.0.31101

安装失败,错误:

无法添加对"Microsoft.WITDataStore"的引用.

其他的例子,Entity Framework或者Microsoft.TeamFoundation.Client我能够安装.

我的配置

  • Windows 7企业版
  • Visual Studio Enterprise 2015
  • 适用于Visual Studio 2015的NuGet包管理器

谢谢.

.net visual-studio nuget

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

使用Newtonsoft JSON处理循环引用

我的模型类如下所示:

public class ModelType
{
    public string Name { get; set; }
    public ModelType SuperType { get; set }
    public IEnumerable<ModelType> SubTypes { get; set; }
}
Run Code Online (Sandbox Code Playgroud)

我试图序列化对象,但得到StackOverflowException.我试着打电话

JsonConvert.SerializeObject(model, new JsonSerializerSettings { ReferenceLoopHandling = ReferenceLoopHandling.Ignore });
Run Code Online (Sandbox Code Playgroud)

以及

JsonConvert.SerializeObject(model, new JsonSerializerSettings { PreserveReferencesHandling = PreserveReferencesHandling.Objects });
Run Code Online (Sandbox Code Playgroud)

这两个电话都导致了StackOverflowException.知道如何序列化ModelType实例吗?

编辑:

实例示例,无法序列化:

{
    Name: "Child",
    SuperType: {
        Name: "Parent",
        SuperType: null,
        SubTypes: [{
                Name: "Child",
                SuperType: {
                    Name: "Parent",
                    SuperType: null,
                    SubTypes: [{Name: "Child", ...}]
                },
                SubTypes: …
Run Code Online (Sandbox Code Playgroud)

c# serialization json json.net

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