November Happy Hour will be moved to Thursday December 5th.
November Happy Hour will be moved to Thursday December 5th.
Ok I managed to figure out that the web.config setting didn't allow Anonymous access to the Webservices folder (might be an idea to set that as a default since it seems to be required) but now I'm getting another error which I have no idea how to solve:
Service1 Message 3 Error:
System.ServiceModel.FaultException: System.Web.Services.Protocols.SoapException: Server was unable to process request. ---> System.InvalidOperationException: Unable to generate a temporary class (result=1).
error CS0272: The property or indexer 'EPiServer.Core.LanguageSelector.SelectionSource' cannot be used in this context because the set accessor is inaccessible
at System.Xml.Serialization.Compiler.Compile(Assembly parent, String ns, XmlSerializerCompilerParameters xmlParameters, Evidence evidence)
at System.Xml.Serialization.TempAssembly.GenerateAssembly(XmlMapping[] xmlMappings, Type[] types, String defaultNamespace, Evidence evidence, XmlSerializerCompilerParameters parameters, Assembly assembly, Hashtable assemblies)
at System.Xml.Serialization.TempAssembly..ctor(XmlMapping[] xmlMappings, Type[] types, String defaultNamespace, String location, Evidence evidence)
at System.Xml.Serialization.XmlSerializer.FromMappings(XmlMapping[] mappings, Type type)
at System.Web.Services.Protocols.SoapServerType..ctor(Type type, WebServiceProtocols protocolsSupported)
at System.Web.Services.Protocols.SoapServerProtocol.Initialize()
at System.Web.Services.Protocols.ServerProtocolFactory.Create(Type type, HttpContext context, HttpRequest request, HttpResponse response, Boolean& abortProcessing)
--- End of inner exception stack trace ---
Server stack trace:
at System.ServiceModel.Channels.ServiceChannel.HandleReply(ProxyOperationRuntime operation, ProxyRpc& rpc)
at System.ServiceModel.Channels.ServiceChannel.Call(String action, Boolean oneway, ProxyOperationRuntime operation, Object[] ins, Object[] outs, TimeSpan timeout)
at System.ServiceModel.Channels.ServiceChannelProxy.InvokeService(IMethodCallMessage methodCall, ProxyOperationRuntime operation)
at System.ServiceModel.Channels.ServiceChannelProxy.Invoke(IMessage message)
Exception rethrown at [0]:
at System.Runtime.Remoting.Proxies.RealProxy.HandleReturnMessage(IMessage reqMsg, IMessage retMsg)
at System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke(MessageData& msgData, Int32 type)
at IntranetMailer.PageStoreService.PageStoreServiceSoap.GetDefaultPageData(GetDefaultPageDataRequest request)
at IntranetMailer.PageStoreService.PageStoreServiceSoapClient.IntranetMailer.PageStoreService.PageStoreServiceSoap.GetDefaultPageData(GetDefaultPageDataRequest request) in C:\Source\PH\Intranet\IntranetMailer\Service References\PageStoreService\Reference.cs:line 2191
at IntranetMailer.PageStoreService.PageStoreServiceSoapClient.GetDefaultPageData(PageReference parentPageLink, Int32 pageTypeID, LanguageSelector selector, AccessLevel access) in C:\Source\PH\Intranet\IntranetMailer\Service References\PageStoreService\Reference.cs:line 2201
at IntranetMailer.IntranetMailerService.ProcessEmails() in C:\Source\PH\Intranet\IntranetMailer\IntranetMailerService.cs:line 94
Any ideas at all would be most welcome
This is the code:
PageStoreServiceSoapClient pageStoreService = new PageStoreServiceSoapClient();
pageStoreService.ClientCredentials.UserName.UserName = "user";
pageStoreService.ClientCredentials.UserName.Password = "password";
PageReference reference = new PageReference { ID = 24 };
LanguageSelector selector = new LanguageSelector { LanguageBranch = "en-GB" };
RawPage rawPage = pageStoreService.GetDefaultPageData(reference, 6, selector, AccessLevel.Create);
It fails on trying to create the RawPage
Try changing security mode to "TransportCredentialOnly" if you have not fixed it yet.
<security mode="TransportCredentialOnly">
<transport clientCredentialType="Basic" proxyCredentialType="None"
realm="" />
</security>
I think we have a bug for this one:
Bug #72114: Runtime compiler error CS0272 when using the PageStoreService
I am having this problem with CMS 6 R2, the bug should be fixed in that version right? I am just trying to retrieve a page by ID. Has anyone found a workaround for this?
Kevin: It should be fixed in the general hotfix. Do you have that installed?
I'm not sure on that (I didn't set up the server), but I will check. Where is this hotfix available, in case that is the problem?
The EPiServer CMS 6 R2 release on world is the general hotfix. See this blog for more details (how to upgrade to it):
http://world.episerver.com/Blogs/Shahid-Nawaz/Dates/2012/1/General-Hotfix-CMS-6-R2/
I get this error message:
Service1 Message 17 Error:
System.ServiceModel.Security.MessageSecurityException: The HTTP request is unauthorized with client authentication scheme 'Anonymous'. The authentication header received from the server was 'Basic realm=""'. ---> System.Net.WebException: The remote server returned an error: (401) Unauthorized.
at System.Net.HttpWebRequest.GetResponse()
at System.ServiceModel.Channels.HttpChannelFactory.HttpRequestChannel.HttpChannelRequest.WaitForReply(TimeSpan timeout)
--- End of inner exception stack trace ---
Server stack trace:
at System.ServiceModel.Channels.HttpChannelUtilities.ValidateAuthentication(HttpWebRequest request, HttpWebResponse response, WebException responseException, HttpChannelFactory factory)
at System.ServiceModel.Channels.HttpChannelUtilities.ValidateRequestReplyResponse(HttpWebRequest request, HttpWebResponse response, HttpChannelFactory factory, WebException responseException, ChannelBinding channelBinding)
at System.ServiceModel.Channels.HttpChannelFactory.HttpRequestChannel.HttpChannelRequest.WaitForReply(TimeSpan timeout)
at System.ServiceModel.Channels.RequestChannel.Request(Message message, TimeSpan timeout)
at System.ServiceModel.Dispatcher.RequestChannelBinder.Request(Message message, TimeSpan timeout)
at System.ServiceModel.Channels.ServiceChannel.Call(String action, Boolean oneway, ProxyOperationRuntime operation, Object[] ins, Object[] outs, TimeSpan timeout)
at System.ServiceModel.Channels.ServiceChannelProxy.InvokeService(IMethodCallMessage methodCall, ProxyOperationRuntime operation)
at System.ServiceModel.Channels.ServiceChannelProxy.Invoke(IMessage message)
Exception rethrown at [0]:
at System.Runtime.Remoting.Proxies.RealProxy.HandleReturnMessage(IMessage reqMsg, IMessage retMsg)
at System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke(MessageData& msgData, Int32 type)
at IntranetMailer.PageStoreService.PageStoreServiceSoap.GetDefaultPageData(GetDefaultPageDataRequest request)
at IntranetMailer.PageStoreService.PageStoreServiceSoapClient.IntranetMailer.PageStoreService.PageStoreServiceSoap.GetDefaultPageData(GetDefaultPageDataRequest request) in C:\Source\PH\Intranet\IntranetMailer\Service References\PageStoreService\Reference.cs:line 2191
at IntranetMailer.PageStoreService.PageStoreServiceSoapClient.GetDefaultPageData(PageReference parentPageLink, Int32 pageTypeID, LanguageSelector selector, AccessLevel access) in C:\Source\PH\Intranet\IntranetMailer\Service References\PageStoreService\Reference.cs:line 2201
at IntranetMailer.IntranetMailerService.ProcessEmails() in C:\Source\PH\Intranet\IntranetMailer\IntranetMailerService.cs:line 93
I've configured basic authentication as per the instructions and I am supplying a userrname and password in the code but for some reason the web service thinks I'm trying to log on anonymously.
What have I missed?