मैं शुरुआती लोगों को डेमो वीडियो के साथ MSDN पर डब्ल्यूसीएफ पेज पर अनुसरण करने का प्रयास कर रहा हूं।"एंडपॉइंट्स के साथ सेवाओं को कॉन्फ़िगर करना" डेमो मेरे लिए विफल रहता है (माइक्रोसॉफ्ट/एंडपॉइंट.tv/Pluralsight)
पहला वीडियो कम या ज्यादा ठीक काम करता था। मैं अब दूसरे वीडियो के अंत में हूं। मैं वीएस -2010/.NET 4.0 का उपयोग कर रहा हूं, जबकि वीडियो वीएस -2008 का उपयोग कर रहा है (मैं .NET 3.5 मान रहा हूं, लेकिन मुझे याद नहीं है)। एक सादे http, net.tcp, और net.pipe:
हम सिर्फ 3 और अंत अंक जोड़ दिया है। जब मैं प्रोजेक्ट को चलाने की कोशिश करता हूं तो वेब सेवा शुरू करने में विफल रहता है। बस अभी तक "Cannot load the X.509 certificate identity specified in the configuration"
मैं वास्तव में प्रमाण पत्र में शामिल हो नहीं करना चाहता था क्योंकि मैं अभी भी सिर्फ इसलिए मैं पीछा मूल बातें के साथ प्रयोग कर रहा हूँ:
System.InvalidOperationException: Cannot load the X.509 certificate identity specified in the configuration.
at System.ServiceModel.Description.ConfigLoader.LoadIdentity(IdentityElement element)
at System.ServiceModel.Description.ConfigLoader.LoadServiceDescription(ServiceHostBase host, ServiceDescription description, ServiceElement serviceElement, Action`1 addBaseAddress)
at System.ServiceModel.ServiceHostBase.LoadConfigurationSectionInternal(ConfigLoader configLoader, ServiceDescription description, ServiceElement serviceSection)
at System.ServiceModel.ServiceHostBase.LoadConfigurationSectionInternal(ConfigLoader configLoader, ServiceDescription description, String configurationName)
at System.ServiceModel.ServiceHostBase.ApplyConfiguration()
at System.ServiceModel.ServiceHostBase.InitializeDescription(UriSchemeKeyedCollection baseAddresses)
at System.ServiceModel.ServiceHost.InitializeDescription(Type serviceType, UriSchemeKeyedCollection baseAddresses)
at System.ServiceModel.ServiceHost..ctor(Type serviceType, Uri[] baseAddresses)
at Microsoft.Tools.SvcHost.ServiceHostHelper.CreateServiceHost(Type type, ServiceKind kind)
at Microsoft.Tools.SvcHost.ServiceHostHelper.OpenService(ServiceInfo info)
मेरे गूगल फू के आधार पर, मैं इस सूत्र में आए उस पोस्ट में सलाह और बस <dns value="localhost" />
टैग जोड़ा गया। अपवाद परिवर्तन:
Please try changing the HTTP port to 8732 or running as Administrator.
System.ServiceModel.AddressAccessDeniedException: HTTP could not register URL http://+:8080/EvalService/. Your process does not have access rights to this namespace (see http://go.microsoft.com/fwlink/?LinkId=70353 for details). ---> System.Net.HttpListenerException: Access is denied
at System.Net.HttpListener.AddAllPrefixes()
at System.Net.HttpListener.Start()
at System.ServiceModel.Channels.SharedHttpTransportManager.OnOpen()
--- End of inner exception stack trace ---
at System.ServiceModel.Channels.SharedHttpTransportManager.OnOpen()
at System.ServiceModel.Channels.TransportManager.Open(TransportChannelListener channelListener)
at System.ServiceModel.Channels.TransportManagerContainer.Open(SelectTransportManagersCallback selectTransportManagerCallback)
at System.ServiceModel.Channels.TransportChannelListener.OnOpen(TimeSpan timeout)
at System.ServiceModel.Channels.HttpChannelListener.OnOpen(TimeSpan timeout)
at System.ServiceModel.Channels.CommunicationObject.Open(TimeSpan timeout)
at System.ServiceModel.Channels.DatagramChannelDemuxer`2.OnOuterListenerOpen(ChannelDemuxerFilter filter, IChannelListener listener, TimeSpan timeout)
at System.ServiceModel.Channels.SingletonChannelListener`3.OnOpen(TimeSpan timeout)
at System.ServiceModel.Channels.CommunicationObject.Open(TimeSpan timeout)
at System.ServiceModel.Dispatcher.ChannelDispatcher.OnOpen(TimeSpan timeout)
at System.ServiceModel.Channels.CommunicationObject.Open(TimeSpan timeout)
at System.ServiceModel.ServiceHostBase.OnOpen(TimeSpan timeout)
at System.ServiceModel.Channels.CommunicationObject.Open(TimeSpan timeout)
at System.ServiceModel.Security.NegotiationTokenAuthenticator`1.OnOpen(TimeSpan timeout)
at System.ServiceModel.Security.WrapperSecurityCommunicationObject.OnOpen(TimeSpan timeout)
at System.ServiceModel.Channels.CommunicationObject.Open(TimeSpan timeout)
at System.ServiceModel.Security.CommunicationObjectSecurityTokenAuthenticator.Open(TimeSpan timeout)
at System.ServiceModel.Security.SecurityUtils.OpenCommunicationObject(ICommunicationObject obj, TimeSpan timeout)
at System.ServiceModel.Security.SecurityUtils.OpenTokenAuthenticatorIfRequired(SecurityTokenAuthenticator tokenAuthenticator, TimeSpan timeout)
at System.ServiceModel.Security.SecurityProtocolFactory.Open(String propertyName, Boolean requiredForForwardDirection, SecurityTokenAuthenticator authenticator, TimeSpan timeout)
at System.ServiceModel.Security.SymmetricSecurityProtocolFactory.OnOpen(TimeSpan timeout)
at System.ServiceModel.Security.WrapperSecurityCommunicationObject.OnOpen(TimeSpan timeout)
at System.ServiceModel.Channels.CommunicationObject.Open(TimeSpan timeout)
at System.ServiceModel.Security.SecurityProtocolFactory.Open(Boolean actAsInitiator, TimeSpan timeout)
at System.ServiceModel.Security.SecurityListenerSettingsLifetimeManager.Open(TimeSpan timeout)
at System.ServiceModel.Channels.SecurityChannelListener`1.OnOpen(TimeSpan timeout)
at System.ServiceModel.Channels.CommunicationObject.Open(TimeSpan timeout)
at System.ServiceModel.Dispatcher.ChannelDispatcher.OnOpen(TimeSpan timeout)
at System.ServiceModel.Channels.CommunicationObject.Open(TimeSpan timeout)
at System.ServiceModel.ServiceHostBase.OnOpen(TimeSpan timeout)
at System.ServiceModel.Channels.CommunicationObject.Open(TimeSpan timeout)
at System.ServiceModel.Security.SecuritySessionSecurityTokenAuthenticator.OnOpen(TimeSpan timeout)
at System.ServiceModel.Security.WrapperSecurityCommunicationObject.OnOpen(TimeSpan timeout)
at System.ServiceModel.Channels.CommunicationObject.Open(TimeSpan timeout)
at System.ServiceModel.Security.CommunicationObjectSecurityTokenAuthenticator.Open(TimeSpan timeout)
at System.ServiceModel.Security.SecurityUtils.OpenCommunicationObject(ICommunicationObject obj, TimeSpan timeout)
at System.ServiceModel.Security.SecurityUtils.OpenTokenAuthenticatorIfRequired(SecurityTokenAuthenticator tokenAuthenticator, TimeSpan timeout)
at System.ServiceModel.Security.SecuritySessionServerSettings.OnOpen(TimeSpan timeout)
at System.ServiceModel.Security.WrapperSecurityCommunicationObject.OnOpen(TimeSpan timeout)
at System.ServiceModel.Channels.CommunicationObject.Open(TimeSpan timeout)
at System.ServiceModel.Security.SecuritySessionServerSettings.Open(TimeSpan timeout)
at System.ServiceModel.Security.SecurityListenerSettingsLifetimeManager.Open(TimeSpan timeout)
at System.ServiceModel.Channels.SecurityChannelListener`1.OnOpen(TimeSpan timeout)
at System.ServiceModel.Channels.CommunicationObject.Open(TimeSpan timeout)
at System.ServiceModel.Dispatcher.ChannelDispatcher.OnOpen(TimeSpan timeout)
at System.ServiceModel.Channels.CommunicationObject.Open(TimeSpan timeout)
at System.ServiceModel.ServiceHostBase.OnOpen(TimeSpan timeout)
at System.ServiceModel.Channels.CommunicationObject.Open(TimeSpan timeout)
at System.ServiceModel.Channels.CommunicationObject.Open()
at Microsoft.Tools.SvcHost.ServiceHostHelper.OpenService(ServiceInfo info)
System.Net.HttpListenerException (0x80004005): Access is denied
at System.Net.HttpListener.AddAllPrefixes()
at System.Net.HttpListener.Start()
at System.ServiceModel.Channels.SharedHttpTransportManager.OnOpen()
तो, मैं क्या कर यह क्या कहा की कोशिश की: पोर्ट को बदलने 8732 हो सकता है, लेकिन अपवाद अभी भी फेंक दिया जाता है, इस बार Please try changing the HTTP port to 8732...HTTP could not register URL http://+:8732/EvalService/...
कह। : पी
मैंने बिना किसी लाभ के नए अंत बिंदुओं पर टिप्पणी करने का प्रयास किया है। यहां तक कि मूल भी इस त्रुटि से असफल हो जाते हैं। कोई फर्क नहीं पड़ता या तो अगर मैं उन्हें मूल बंदरगाह में वापस डाल [नहीं तो] 1337
यहाँ App.config है, और कुछ नहीं के रूप समस्याग्रस्त बाहर खड़ा है:
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<system.web>
<compilation debug="true" />
</system.web>
<system.serviceModel>
<services>
<service name="EvalServiceLibrary.EvalService">
<clear />
<endpoint address="ws" binding="wsHttpBinding" contract="EvalServiceLibrary.IEvalService"
listenUriMode="Explicit">
<identity>
<dns value="localhost" />
<certificateReference storeName="My" storeLocation="LocalMachine"
x509FindType="FindBySubjectDistinguishedName" />
</identity>
</endpoint>
<endpoint address="mex" binding="mexHttpBinding" contract="IMetadataExchange"
listenUriMode="Explicit">
<identity>
<dns value="localhost" />
<certificateReference storeName="My" storeLocation="LocalMachine"
x509FindType="FindBySubjectDistinguishedName" />
</identity>
</endpoint>
<endpoint address="basic" binding="basicHttpBinding" contract="EvalServiceLibrary.IEvalService"
listenUriMode="Explicit">
<identity>
<dns value="localhost" />
<certificateReference storeName="My" storeLocation="LocalMachine"
x509FindType="FindBySubjectDistinguishedName" />
</identity>
</endpoint>
<endpoint address="net.tcp://localhost:8888/EvalService" binding="netTcpBinding"
contract="EvalServiceLibrary.IEvalService" listenUriMode="Explicit">
<identity>
<dns value="localhost" />
<certificateReference storeName="My" storeLocation="LocalMachine"
x509FindType="FindBySubjectDistinguishedName" />
</identity>
</endpoint>
<endpoint address="net.pipe://localhost/EvalService" binding="netNamedPipeBinding"
bindingConfiguration="" contract="EvalServiceLibrary.IEvalService" />
<host>
<baseAddresses>
<add baseAddress="http://localhost:8080/EvalService" />
</baseAddresses>
</host>
</service>
</services>
<behaviors>
<serviceBehaviors>
<behavior>
<serviceMetadata httpGetEnabled="True"/>
<serviceDebug includeExceptionDetailInFaults="False" />
</behavior>
</serviceBehaviors>
</behaviors>
</system.serviceModel>
</configuration>
क्या गलत है/कैसे करना है मैंने इसे ठीक किया?
धन्यवाद। ' 'टैग को टिप्पणी करते हुए टैग X.50 9 प्रमाणपत्र त्रुटि से छुटकारा पाता है, लेकिन मुझे अभी भी बाध्यकारी त्रुटि के साथ छोड़ दिया गया है। मुझे लगता है कि '' अनुभागों को विजुअल स्टूडियो (मेरे द्वारा किसी भी विशेष कार्रवाई के बिना) द्वारा स्वचालित रूप से जोड़ा गया था, इसलिए यह इस डेमो के लिए उनसे छुटकारा पाने के लिए अनजान प्रतीत होता है। –
bambams
आपके पास कितने अंक/बाइंडिंग हैं? एक बुनियादी एचटीपी बाइंडिंग के साथ एक एंडपॉइंट के साथ शुरू करें। अन्य अंतराल और बाइंडिंग को हटाएं जिन्हें वे संदर्भित कर रहे हैं। क्या आप वीएस विकास सर्वर या अन्य वेब सर्वर का उपयोग कर रहे हैं? यदि ऐसा है, तो वीएस पोर्ट नंबरों को नियंत्रित करने दें। यदि आप अन्य वेब सर्वर का उपयोग कर रहे हैं, तो अपने डेमो के लिए पोर्ट 80 पर चिपके रहें। यदि आपको, नए अपवादों को पोस्ट करने की आवश्यकता है, तो आपको मिल रहा है। –
ऊपर पोस्ट किया गया पहला लिंक ओपी में पहला लिंक है। ;) यही वह जगह है जहां मुझे वीडियो मिला। : पी – bambams