小编Jam*_*123的帖子

提供的URI方案"https"无效; 预期'http'.参数名称:via

我使用下面的配置没有"https".现在网址已更改为"https".但我得到"提供的URI方案'https'无效;预期'http'.Parameter名称:通过" 调用它时出错.

<system.serviceModel>
<bindings>
  <basicHttpBinding>
    <binding name="ERightsPortBinding" closeTimeout="00:01:00" openTimeout="00:01:00" receiveTimeout="00:10:00" sendTimeout="00:01:00" allowCookies="false" bypassProxyOnLocal="false" hostNameComparisonMode="StrongWildcard" maxBufferSize="65536" maxBufferPoolSize="524288" maxReceivedMessageSize="65536" messageEncoding="Text" textEncoding="utf-8" transferMode="Buffered" useDefaultWebProxy="true">
      <readerQuotas maxDepth="32" maxStringContentLength="8192" maxArrayLength="16384" maxBytesPerRead="4096" maxNameTableCharCount="16384" />
      <security mode="None">
        <transport clientCredentialType="None" proxyCredentialType="None" realm="" />
        <message clientCredentialType="UserName" algorithmSuite="Default" />
      </security>          
    </binding>
  </basicHttpBinding>
</bindings>
<client>
  <endpoint address="https://dev.company.com/jws/ws/EService?WSDL" binding="basicHttpBinding" bindingConfiguration="ERightsPortBinding" contract="ERights.ERights" name="ERightsPort" />
</client>
Run Code Online (Sandbox Code Playgroud)

如何修复错误?

asp.net wcf web-services

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

为什么我在IE 9中丢失了关于Ajax请求的cookie和会话

会话cookie在Chrome和Firefox中运行良好,但是对于IE9和AJAX请求,我丢失了所有会话cookie.

直接请求查看

  public class AddressController : Controller
  {
    [MvcSiteMapNode(Title = "Addresses", ParentKey = "MyAccount", Key = "Addresses")]
     public ActionResult Index()
     {
        ....
         var memberId = GetKeyValues.GetMemberId(); // This works perfect.
        ...
      }
Run Code Online (Sandbox Code Playgroud)

Ajax调用

   $.ajax({
        url: "/Address/CheckPrimaryAddressGood?t="+ Math.random(),
        type: "Get",
        success: function(data) {
         ...

public class AddressController : Controller
{
    public ActionResult CheckPrimaryAddressGood()
        {
           ...
           var memberId = GetKeyValues.GetMemberId();
           ...
       }
 }
 public static class GetKeyValues
 {
    public static string GetMemberId()
    {
         if (HttpContext.Current.Session[keyCookie] != null)
            {
                memberId = GetMemberIdFromSession();
            } …
Run Code Online (Sandbox Code Playgroud)

cookies ajax asp.net-mvc jquery asp.net-mvc-4

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

是否可以使用MVC项目制作单独的dll?

我们在Asp.net MVC5中开发了一个大项目.我们的模型和业务逻辑在单独的类库中定义.现在我们需要向现有项目添加另一个模块,但我们需要一个单独的dll.

该模块还共享最多javascripts,css文件和其他文件.这就是我们不想分离MVC项目的原因.

有没有为什么我们可以为模块基础创建单独的DLL.所以我们不想部署或触摸其他dll.

c# asp.net dll asp.net-mvc

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

在c#中除以两个值时如何获得整数商?

我想在分割两个值时得到整数商.每个例子

X=3
Y=2
Q=X/Y = 1.5 // I want get 1 from results


X=7
Y=2
Q=X/Y=3.5 //I want get only 3 from results
Run Code Online (Sandbox Code Playgroud)

c# vb.net

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

将图像文件从网址复制到本地文件夹?

我有一个图片的网址.例如" http://testsite.com/web/abc.jpg ".我想在我的本地文件夹中复制该网址"c:\ images \"; 当我将该文件复制到文件夹中时,我必须将图像重命名为"c:\ images\xyz.jpg".

我们怎么做?

c# vb.net asp.net

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

如何更改EF生成的类属性的[DisplayName]?

我们知道EF根据我们添加到.edmx文件的表生成类.哪个不会有[DisplayName] DataAnnotations.

如何在不修改生成的类的情况下添加此[DisplayName]?因为生成的类可以被覆盖如果我修改.edmx文件(重新添加修改的表),如果数据库更改.所以我不想修改生成类本身.

EF生成类

 public partial class Committee
    {
        public string Committee_Description { get; set; }
        public byte[] Committee_Id { get; set; }
        public string Rn_Descriptor { get; set; }
        public Nullable<System.DateTime> Rn_Create_Date { get; set; }
       ......
       .....
Run Code Online (Sandbox Code Playgroud)

视图

 <tr>
            <th>
                @Html.DisplayNameFor(model => model.Item2.GetEnumerator().Current.Committee_Name)
            </th>
Run Code Online (Sandbox Code Playgroud)

asp.net-mvc entity-framework ef-database-first asp.net-mvc-4

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

将数据库表从一个SQL Server数据库表更新到另一个?

我正在尝试将数据库字段从一个SQL Server表更新到另一个SQL Server表.

我们的生产SQL Server是[spdbprod.test.com\spprod],我们的QA服务器是[spdbQA.test.com\spQA].

我需要从QA表更新生产中的表.我使用这个SQL语句,但它给出了一个错误.

UPDATE 
    [spdbprod.test.com\spprod].[aspnetdb].[dbo].[Communities_Groups] as t1
SET 
    t1.Show = (Select t2.show from [spdbQA.test.com\spQA].[aspnetdb].[dbo].
[Communities_Groups] as t2 where t1.GroupID = t2.GroupdID)
Run Code Online (Sandbox Code Playgroud)

我在这里缺少什么? 错误:更新.("关键字'附近的语法不正确为'.")

t-sql sql-server sql-server-2005

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

尝试获取LogWriter类型的实例时出现激活错误,键""?

我有asp.net网站.我添加Microsoft.Practices.EnterpriseLibrary.Logging.dll了对该网站的引用 .

在web.cofig文件中,我定义如下.

    <?xml version="1.0" encoding="utf-8" ?>
<configuration>
  <configSections>
    <section name="loggingConfiguration" type="Microsoft.Practices.EnterpriseLibrary.Logging.Configuration.LoggingSettings, Microsoft.Practices.EnterpriseLibrary.Logging, Version=5.0.414.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" requirePermission="true" />
  </configSections>
  <loggingConfiguration name="Logging Application Block" tracingEnabled="true"
    defaultCategory="General" logWarningsWhenNoCategoriesMatch="true">
    <listeners>
      <add name="Rolling Flat File Trace Listener" type="Microsoft.Practices.EnterpriseLibrary.Logging.TraceListeners.RollingFlatFileTraceListener, Microsoft.Practices.EnterpriseLibrary.Logging"
        listenerDataType="Microsoft.Practices.EnterpriseLibrary.Logging.Configuration.RollingFlatFileTraceListenerData, Microsoft.Practices.EnterpriseLibrary.Logging"
        fileName="C:\Temp\RollingFlatFile.log" footer="----------------------------------------"
        formatter="Text Formatter" header="----------------------------------------"
        rollFileExistsBehavior="Increment" rollInterval="None" rollSizeKB="20"
        timeStampPattern="yyyy-MM-dd" maxArchivedFiles="3" traceOutputOptions="None"
        filter="All" />
      </listeners>
    <formatters>
      <add type="Microsoft.Practices.EnterpriseLibrary.Logging.Formatters.TextFormatter, Microsoft.Practices.EnterpriseLibrary.Logging"
        template="Timestamp: {timestamp(local)}{tab}Message: {message}{tab}Category: {category}{tab}Priority: {priority}{tab}EventId: {eventid}{tab}ActivityId: {property(ActivityId)}{tab}Severity: {severity}{tab}Title:{title}{tab}"
        name="Brief Format Text" />
      <add type="Microsoft.Practices.EnterpriseLibrary.Logging.Formatters.TextFormatter, Microsoft.Practices.EnterpriseLibrary.Logging"
        template="Timestamp: {timestamp}{tab}Message: {message}{tab}Category: {category}{tab}Priority: {priority}{tab}EventId: {eventid}{tab}Severity: {severity}{tab}Title: {title}{tab}Activity …
Run Code Online (Sandbox Code Playgroud)

c# vb.net asp.net enterprise-library

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

When&must的FluentValidation?

当dropdownlist值为,yes并且字段必须为date 时,我正在尝试使用FluentValidation validaton .当dropdownlist yes检查时它正在工作date.但是当我选择No它时,它也会显示验证Must be date.

它应该不再验证是否下拉列表值除了yes.我们怎么做?

 RuleFor(x => x.DtPublishedTimeText)
            .NotEmpty()
            .When(HasMaterialPublishedElseWhereText)
            .WithMessage("Required Field")
            .Must(BeAValidDate)
            .WithMessage("Must be date");

private bool BeAValidDate(string val)
{
    DateTime date;
    return  DateTime.TryParse(val, out date);
}

private bool HasMaterialPublishedElseWhereText(MeetingAbstract model)
{
    return model.HasMaterialPublishedElseWhereText != null && 
             model.HasMaterialPublishedElseWhereText.Equals("yes");
}
Run Code Online (Sandbox Code Playgroud)

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

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

在notepad ++中查找重复项并删除所有内容

我有多个电子邮件地址.我需要找到并删除所有(包括找到的).这在记事本++中是否可行?

例:epshetsky@test.com, rek4@test.com, rajesh1239@test.com, mohanraj@test.com, sam@test.com, nithin@test.com, midhunvintech@test.com, karthickgm27@test.com, rajesh1239@test.com, mohanraj@test.com, nithin@test.com,

我需要结果像

epshetsky@test.com, rek4@test.com, sam@test.com, nithin@test.com, midhunvintech@test.com, karthickgm27@test.com,

在记事本++中怎么办?

text-editor notepad++

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