Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/sharepoint/4.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
C# 找不到引用协定的默认终结点元素 我正在尝试解决连接问题,我已经花了比预期更多的时间,结果一事无成。 错误: 在ServiceModel客户端配置节中找不到引用约定“timeedit3”的默认终结点元素。这可能是因为找不到应用程序的配置文件,或者在客户端元素_C#_Sharepoint_Service_Web Parts_Endpoint - Fatal编程技术网

C# 找不到引用协定的默认终结点元素 我正在尝试解决连接问题,我已经花了比预期更多的时间,结果一事无成。 错误: 在ServiceModel客户端配置节中找不到引用约定“timeedit3”的默认终结点元素。这可能是因为找不到应用程序的配置文件,或者在客户端元素

C# 找不到引用协定的默认终结点元素 我正在尝试解决连接问题,我已经花了比预期更多的时间,结果一事无成。 错误: 在ServiceModel客户端配置节中找不到引用约定“timeedit3”的默认终结点元素。这可能是因为找不到应用程序的配置文件,或者在客户端元素,c#,sharepoint,service,web-parts,endpoint,C#,Sharepoint,Service,Web Parts,Endpoint,找不到引用协定的默认终结点元素 我正在尝试解决连接问题,我已经花了比预期更多的时间,结果一事无成。 错误: 在ServiceModel客户端配置节中找不到引用约定“timeedit3”的默认终结点元素。这可能是因为找不到应用程序的配置文件,或者在客户端元素中找不到与此约定匹配的端点元素。 堆栈跟踪: [InvalidOperationException:在ServiceModel客户端配置节中找不到引用约定“timeedit3”的默认终结点元素。这可能是因为找不到应用程序的配置文件,或者在客户端

找不到引用协定的默认终结点元素
我正在尝试解决连接问题,我已经花了比预期更多的时间,结果一事无成。
错误:
在ServiceModel客户端配置节中找不到引用约定“timeedit3”的默认终结点元素。这可能是因为找不到应用程序的配置文件,或者在客户端元素中找不到与此约定匹配的端点元素。
堆栈跟踪:
[InvalidOperationException:在ServiceModel客户端配置节中找不到引用约定“timeedit3”的默认终结点元素。这可能是因为找不到应用程序的配置文件,或者在客户端元素中找不到与此约定匹配的终结点元素。]
System.ServiceModel.Description.ConfigLoader.LoadChannelBehavior(ServiceEndpoint ServiceEndpoint,String configurationName)+15858380
System.ServiceModel.ChannelFactory.InitializeEndpoint(字符串配置名称,端点地址)+95
System.ServiceModel.ChannelFactory`1..ctor(字符串endpointConfigurationName,EndpointAddress remoteAddress)+291
System.ServiceModel.ChannelFactory`1..ctor(字符串endpointConfigurationName)+12
System.ServiceModel.EndpointTrait`1.CreateSimplexFactory()+15623711
System.ServiceModel.EndpointTrait`1.CreateChannelFactory()+18
System.ServiceModel.ClientBase`1.CreateChannelFactoryRef(EndpointTrait`1 EndpointTrait)+20
System.ServiceModel.ClientBase`1.InitializeChannelFactoryRef()+436
System.ServiceModel.ClientBase`1..ctor()+211
timeedit3Client..ctor()+41
LUSEM.SharePoint.Utils.DataAccess.TimeEdit3..ctor()+125
LUSEM.SharePoint.WebParts.Administration.TEUpdateAndModify.TEUpdateAndModifyUserControl..ctor()+77
c:\Windows\Microsoft.NET\Framework64\v2.0.50727\临时ASP.NET文件\root\1f0e5a2f\af1522bf\App\u Web\u z\cuvts.0.cs:0
__ASP.FastObjectFactory\u app\u web\u z\u cuvts.在c:\Windows\Microsoft.NET\Framework64\v2.0.50727\临时ASP.NET文件\root\1f0e5a2f\af1522bf\app\u web\u cuvts.1.cs:0中创建\u ASP\u控件模板\u lusem\u sharepoint\u web部件\u管理\u teUpdate和修改\u teUpdate和ModifyUserControl\u ascx()
LoadControl(IWebObjectFactoryObjectFactory、VirtualPath、VirtualPath、类型t、对象[]参数)+192
System.Web.UI.TemplateControl.LoadControl(VirtualPath VirtualPath)+110
LUSEM.SharePoint.WebParts.Administration.TEUpdateAndModify.TEUpdateAndModify.CreateChildControls()+95
System.Web.UI.Control.ensureChildControl()+146
System.Web.UI.Control.PreRenderRecursiveInternal()+61
System.Web.UI.Control.PreRenderRecursiveInternal()+224
System.Web.UI.Control.PreRenderRecursiveInternal()+224
System.Web.UI.Control.PreRenderRecursiveInternal()+224
System.Web.UI.Control.PreRenderRecursiveInternal()+224
System.Web.UI.Control.PreRenderRecursiveInternal()+224
System.Web.UI.Page.ProcessRequestMain(布尔includeStagesBeforeAsyncPoint,布尔includeStagesAfterAsyncPoint)+3394
App.Config:
创建构造函数:
私有timeedit3Client te3c=新timeedit3Client();
在windows客户端上使用相同的代码结构运行良好,但在Web部件中会出现此问题。
请帮帮我!

你已经弄明白了吗?我在MVC项目上运行NUnit时也遇到了这个问题。你已经弄明白了吗?我在MVC项目上运行NUnit时也遇到了这个问题。
I am trying to solve connection problem, I've already spent more hours than expected and ended nowhere.

Error:
Could not find default endpoint element that references contract 'timeedit3' in the ServiceModel client configuration section. This might be because no configuration file was found for your application, or because no endpoint element matching this contract could be found in the client element.

Stacktrace:


[InvalidOperationException: Could not find default endpoint element that references contract 'timeedit3' in the ServiceModel client configuration section. This might be because no configuration file was found for your application, or because no endpoint element matching this contract could be found in the client element.]
   System.ServiceModel.Description.ConfigLoader.LoadChannelBehaviors(ServiceEndpoint serviceEndpoint, String configurationName) +15858380
   System.ServiceModel.ChannelFactory.InitializeEndpoint(String configurationName, EndpointAddress address) +95
   System.ServiceModel.ChannelFactory`1..ctor(String endpointConfigurationName, EndpointAddress remoteAddress) +291
   System.ServiceModel.ChannelFactory`1..ctor(String endpointConfigurationName) +12
   System.ServiceModel.EndpointTrait`1.CreateSimplexFactory() +15623711
   System.ServiceModel.EndpointTrait`1.CreateChannelFactory() +18
   System.ServiceModel.ClientBase`1.CreateChannelFactoryRef(EndpointTrait`1 endpointTrait) +20
   System.ServiceModel.ClientBase`1.InitializeChannelFactoryRef() +436
   System.ServiceModel.ClientBase`1..ctor() +211
   timeedit3Client..ctor() +41
   LUSEM.SharePoint.Utils.DataAccess.TimeEdit3..ctor() +125
   LUSEM.SharePoint.WebParts.Administration.TEUpdateAndModify.TEUpdateAndModifyUserControl..ctor() +77
   ASP._controltemplates_lusem_sharepoint_webparts_administration_teupdateandmodify_teupdateandmodifyusercontrol_ascx..ctor() in c:\Windows\Microsoft.NET\Framework64\v2.0.50727\Temporary ASP.NET Files\root\1f0e5a2f\af1522bf\App_Web_z__cuvts.0.cs:0
   __ASP.FastObjectFactory_app_web_z__cuvts.Create_ASP__controltemplates_lusem_sharepoint_webparts_administration_teupdateandmodify_teupdateandmodifyusercontrol_ascx() in c:\Windows\Microsoft.NET\Framework64\v2.0.50727\Temporary ASP.NET Files\root\1f0e5a2f\af1522bf\App_Web_z__cuvts.1.cs:0
   System.Web.UI.TemplateControl.LoadControl(IWebObjectFactory objectFactory, VirtualPath virtualPath, Type t, Object[] parameters) +192
   System.Web.UI.TemplateControl.LoadControl(VirtualPath virtualPath) +110
   LUSEM.SharePoint.WebParts.Administration.TEUpdateAndModify.TEUpdateAndModify.CreateChildControls() +95
   System.Web.UI.Control.EnsureChildControls() +146
   System.Web.UI.Control.PreRenderRecursiveInternal() +61
   System.Web.UI.Control.PreRenderRecursiveInternal() +224
   System.Web.UI.Control.PreRenderRecursiveInternal() +224
   System.Web.UI.Control.PreRenderRecursiveInternal() +224
   System.Web.UI.Control.PreRenderRecursiveInternal() +224
   System.Web.UI.Control.PreRenderRecursiveInternal() +224
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +3394





App.Config:





  <?xml version="1.0" encoding="utf-8" ?>
    <configuration>
           <system.serviceModel>
            <bindings>
                <basicHttpBinding>
                  <binding name="timeedit3_portBinding" 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="Transport">
                    <transport clientCredentialType="None" proxyCredentialType="None"
                        realm="" />
                    <message clientCredentialType="UserName" algorithmSuite="Default" />
                  </security>
                </binding>
              </basicHttpBinding>
            </bindings>
            <client>
    <endpoint address="https://web.timeedit.se/lu_test/soap/db1/2/" binding="basicHttpBinding" bindingConfiguration="timeedit3_portBinding" contract="timeedit3" name="timeedit3_port" />
            </client>
        </system.serviceModel>
    </configuration> 





Creating constructor:
private timeedit3Client te3c = new timeedit3Client();

Using the same code structure on a windows client runs fine, but in a webpart this problem occures.

Please Help me!