+1-888-365-2779
Try Now
More in this section

Forums / Bugs & Issues / Newsletter Module Throws 503 Error.

Newsletter Module Throws 503 Error.

6 posts, 0 answered
  1. Nathan
    Nathan avatar
    7 posts
    Registered:
    25 Jun 2008
    26 Feb 2010
    Link to this post

    Hey Support.

    We're getting the following error when trying to create a Newsletter for our site.  I moved the code back locally to test and make sure it wasn't a permissions issue.  I have included the sitefinity.log section that's getting generated when we try to access this module.  We are planning on utilizing this feature just as soon as we are able to resolve this issue.  We've removed the assembly from the ~/SiteFinity/ServiceAssemblies folder but no other assembly gets created as is mentioned in some of the other posts.  Any help would be appreciated.

    Thanks.
    Nathan

    2/25/2010 9:29:14 PM [UNKNOWN]
    ************************************************************************************
    ID: eff09f0a-e859-4e8e-958c-b194cbc13f50; Code: 3005; Occurrence: 3; Sequence: 218
    ------------------------------------------------------------------------------------

    Application information:
     Machine name: NATHANA-WIN7PC
     OS Version: Microsoft Windows NT 6.1.7600.0
     Product Version: 3.7.2057.3
     Application Path: C:\Projects\SiteFinity\www\
     Debug: True

    Process information:
     Process ID: 7120
     Process Name: WebDev.WebServer

    Request information:
     Request URL: /Sitefinity/Admin/Modules.aspx?module=Newsletters
     Rewrite URL: http://localhost:52793/Sitefinity/Admin/Modules.aspx?module=Newsletters
     Url Referrer: http://localhost:52793/Sitefinity/Admin/Modules.aspx
     Is Authenticated: True
     Authentication Type: Forms
     User: NAbercrombie
     User Agent: Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.1; WOW64; Trident/4.0; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; Media Center PC 6.0; InfoPath.2)
     User Address: 127.0.0.1

    Variables:
     RadControlRandomNumber: 0
     AspSessionIDManagerInitializeRequestCalled: True
     CmsHttpRequest: /Sitefinity/Admin/Modules.aspx?module=Newsletters

    - L0 -------------------------------------------------------------------------------

    Exception Type: System.InvalidOperationException

    Message: There is an error in XML document (3, 11).

    Source: System.Xml

    Stack Trace:
       at System.Xml.Serialization.XmlSerializer.Deserialize(XmlReader xmlReader, String encodingStyle, XmlDeserializationEvents events)
       at System.Xml.Serialization.XmlSerializer.Deserialize(XmlReader xmlReader)
       at System.Web.Services.Description.ServiceDescription.Read(XmlReader reader, Boolean validate)
       at System.Web.Services.Description.ServiceDescription.Read(XmlReader reader)
       at Telerik.WebServices.DynamicProxy.WebServiceDynamicProxy.BuildAssemblyFromWsdl(String strWsdl)
       at Telerik.WebServices.DynamicProxy.WebServiceDynamicProxy.BuildProxy()
       at Telerik.WebServices.DynamicProxy.WebServiceDynamicProxy..ctor(String wsdlLocation, Cookie authCookie)
       at Telerik.Notifications.Services.MailingServiceProxy..ctor(String wsdlUri)
       at Telerik.Notifications.Services.MailingServiceProxy..ctor()
       at Telerik.Notifications.Newsletters.WebControl.Admin.ControlPanel.CreateChildControls()
       at System.Web.UI.Control.EnsureChildControls()
       at System.Web.UI.Control.PreRenderRecursiveInternal()
       at System.Web.UI.Control.PreRenderRecursiveInternal()
       at System.Web.UI.Control.PreRenderRecursiveInternal()
       at System.Web.UI.Control.PreRenderRecursiveInternal()
       at System.Web.UI.Control.PreRenderRecursiveInternal()
       at System.Web.UI.Control.PreRenderRecursiveInternal()
       at System.Web.UI.Control.PreRenderRecursiveInternal()
       at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
    ------------------------------------------------------------------------------------
    - L1 -------------------------------------------------------------------------------

    Exception Type: System.Net.WebException

    Message: The remote server returned an error: (503) Server Unavailable.

    Source: System

    Stack Trace:
       at System.Net.HttpWebRequest.GetResponse()
       at System.Xml.XmlDownloadManager.GetNonFileStream(Uri uri, ICredentials credentials)
       at System.Xml.XmlDownloadManager.GetStream(Uri uri, ICredentials credentials)
       at System.Xml.XmlUrlResolver.GetEntity(Uri absoluteUri, String role, Type ofObjectToReturn)
       at System.Xml.XmlTextReaderImpl.OpenStream(Uri uri)
       at System.Xml.XmlTextReaderImpl.DtdParserProxy_PushExternalSubset(String systemId, String publicId)
       at System.Xml.XmlTextReaderImpl.DtdParserProxy.System.Xml.IDtdParserAdapter.PushExternalSubset(String systemId, String publicId)
       at System.Xml.DtdParser.ParseExternalSubset()
       at System.Xml.DtdParser.ParseInDocumentDtd(Boolean saveInternalSubset)
       at System.Xml.DtdParser.Parse(Boolean saveInternalSubset)
       at System.Xml.XmlTextReaderImpl.DtdParserProxy.Parse(Boolean saveInternalSubset)
       at System.Xml.XmlTextReaderImpl.ParseDoctypeDecl()
       at System.Xml.XmlTextReaderImpl.ParseDocumentContent()
       at System.Xml.XmlTextReaderImpl.Read()
       at System.Xml.XmlTextReader.Read()
       at System.Xml.XmlReader.MoveToContent()
       at System.Web.Services.Description.ServiceDescriptionSerializationReader.Read125_definitions()
       at System.Web.Services.Description.ServiceDescription.ServiceDescriptionSerializer.Deserialize(XmlSerializationReader reader)
       at System.Xml.Serialization.XmlSerializer.Deserialize(XmlReader xmlReader, String encodingStyle, XmlDeserializationEvents events)
    ------------------------------------------------------------------------------------

     

  2. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    Registered:
    25 Nov 2016
    26 Feb 2010
    Link to this post
    Hello Nathan,

    The error seems to be related  to BuildAssemblyFromWsdl method. In the method. XmlTextReader is used  to get the Web Service description. Check whether you have ~/Sitefinity/Admin/Services/MailingWebService.asmx?WSDL in your application and the file looks as shown below

    <%@ WebService Language="C#" Class="Telerik.Notifications.Services.MailingWebService, Telerik.Notifications" %>

    The Newsletter is trying to generate a Service assembly in ~/EmptyProject/Sitefinity/ServiceAssemblies and because of the wrong XML this could not happen.
    Try to return the dll you have removed from ServiceAssemblies back to the same folder.

    Kind regards,
    Ivan Dimitrov
    the Telerik team

    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
  3. Nathan
    Nathan avatar
    7 posts
    Registered:
    25 Jun 2008
    26 Feb 2010
    Link to this post
    Hey Ivan.

    Thanks for the quick response.  I have added the assembly back and we're able to get a little further.  I went to create the newsletter, entered in all of the information, and clicked create and received another error.  I've copied the error below as well as the logfile info for this request.

    Thanks again for your help.
    Nathan

    Server Error in '/' Application.
    --------------------------------------------------------------------------------

    Specified cast is not valid.
    Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

    Exception Details: System.InvalidCastException: Specified cast is not valid.

    Source Error:

    An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below. 

    Stack Trace:

    [InvalidCastException: Specified cast is not valid.]
       Telerik.Notifications.Newsletters.WebControl.CreateNewsletter.OnWriteContent(ControlPanel cntrlPnlObj) +553
       Telerik.Notifications.Newsletters.WebControl.CreateNewsletter.button_Command(Object sender, CommandEventArgs e) +357
       System.Web.UI.WebControls.LinkButton.OnCommand(CommandEventArgs e) +108
       System.Web.UI.WebControls.LinkButton.RaisePostBackEvent(String eventArgument) +135
       System.Web.UI.WebControls.LinkButton.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String eventArgument) +10
       System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument) +13
       System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData) +175
       System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +1565

     

    --------------------------------------------------------------------------------
    Version Information: Microsoft .NET Framework Version:2.0.50727.4927; ASP.NET Version:2.0.50727.4927

    ====================================================================================

    2/26/2010 9:15:01 AM [UNKNOWN]
    ************************************************************************************
    ID: 00a5d5e2-852b-4b25-acb0-fb91d56fe0bf; Code: 3005; Occurrence: 1; Sequence: 34
    ------------------------------------------------------------------------------------

    Application information:
     Machine name: NATHANA-WIN7PC
     OS Version: Microsoft Windows NT 6.1.7600.0
     Product Version: 3.7.2057.3
     Application Path: C:\Projects\SiteFinity\www\
     Debug: True

    Process information:
     Process ID: 4612
     Process Name: WebDev.WebServer

    Request information:
     Request URL: /Sitefinity/Admin/Modules.aspx?module=Newsletters
     Rewrite URL: http://localhost:52793/Sitefinity/Admin/Modules.aspx?module=Newsletters
     Url Referrer: http://localhost:52793/Sitefinity/Admin/Modules.aspx?module=Newsletters
     Is Authenticated: True
     Authentication Type: Forms
     User: NAbercrombie
     User Agent: Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.1; WOW64; Trident/4.0; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; Media Center PC 6.0; InfoPath.2)
     User Address: 127.0.0.1

    Variables:
     RadControlRandomNumber: 0
     AspSessionIDManagerInitializeRequestCalled: True
     CmsHttpRequest: /Sitefinity/Admin/Modules.aspx?module=Newsletters

    - L0 -------------------------------------------------------------------------------

    Exception Type: System.InvalidCastException

    Message: Specified cast is not valid.

    Source: Telerik.Notifications

    Stack Trace:
       at Telerik.Notifications.Newsletters.WebControl.CreateNewsletter.OnWriteContent(ControlPanel cntrlPnlObj)
       at Telerik.Notifications.Newsletters.WebControl.CreateNewsletter.button_Command(Object sender, CommandEventArgs e)
       at System.Web.UI.WebControls.LinkButton.OnCommand(CommandEventArgs e)
       at System.Web.UI.WebControls.LinkButton.RaisePostBackEvent(String eventArgument)
       at System.Web.UI.WebControls.LinkButton.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String eventArgument)
       at System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument)
       at System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData)
       at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
    ------------------------------------------------------------------------------------

  4. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    Registered:
    25 Nov 2016
    26 Feb 2010
    Link to this post
    Hi Nathan,

    The problem is that you use Active Directory and SID for authentication, since the Newsletters module expects Guid. You need to convert SID to GUID or use Guids with AD.

    The solution requires that you should override the ActiveDirectoryMembership classes and make a Guid - SID mapping

    sample code:

    Copy Code
    public class CustomActiveDirectoryMembershipProvider : ActiveDirectoryMembershipProvider
    {
        public override MembershipUser  GetUser(string username, bool userIsOnline)
        {
             return base.GetUser(username, userIsOnline);
        }
     
        public override MembershipUser  GetUser(object providerUserKey, bool userIsOnline)
        {
            // check if providerUserKey is Guid and get its mapped SID
            return base.GetUser(providerUserKey, userIsOnline);
        }
    }
     
    public class CustomMembershipUser : MembershipUser
    {
        public MembershipUserCustom()
        {
        }
     
        public override object ProviderUserKey
        {
            get
            {
                return base.ProviderUserKey;
            }
        }
    }


    Kind regards,
    Ivan Dimitrov
    the Telerik team

    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
  5. Nathan
    Nathan avatar
    7 posts
    Registered:
    25 Jun 2008
    26 Feb 2010
    Link to this post
    Thanks Ivan. 

    We currently use our own Membership Provider that connects back to our own CRM.  I'll take a look at how this is being implemented and see if we can't convert the providerUserKey to a GUID.  Currently, we use their email address as the key so I'll make some changes and let you know if this resolves our problem.

    Thanks again.
    --Nathan
  6. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    Registered:
    25 Nov 2016
    26 Feb 2010
    Link to this post
    Hi Nathan,

    Note that you should use Guids. The providerUserKey for the default provider is GUID. Let us know how it goes.

    Kind regards,
    Ivan Dimitrov
    the Telerik team

    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
Register for webinar
6 posts, 0 answered