Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Heather Floyd 610 posts 1032 karma points MVP 6x c-trib
    Feb 22, 2019 @ 17:59
    Heather Floyd
    0

    Error: System.Web.Services.Protocols.SoapException: Value cannot be null or whitespace. Parameter name: token

    I am setting up Courier 3.1.6 for use with an Umbraco 7.10.4 site.

    Following the directions in https://our.umbraco.com/documentation/Add-ons/UmbracoCourier/Installing/ I set up the "token" with a 12-character string. I also added the three locations to the courier.config file. I copied the exact same courier.config file to all three sites.

    When I right-click on a content node on site 1 and select "Courier" from the menu, I get an erorr in red text in the "Deploy" flyout:

    Application Error
    System.Web.Services.Protocols.SoapException: Server was unable to process request. ---> System.ArgumentException: Value cannot be null or whitespace. Parameter name: token at Umbraco.Courier.RepositoryProviders.Webservices.Repository.AuthorizeByToken(String token) at Umbraco.Courier.RepositoryProviders.Webservices.Repository.AuthorizeAndLog(String memberName) at Umbraco.Courier.RepositoryProviders.Webservices.Repository.CloseSession(String sessionKey) --- End of inner exception stack trace ---
    
    Error details
    
    System.Web.Services.Protocols.SoapException: System.Web.Services.Protocols.SoapException: Server was unable to process request. ---> System.ArgumentException: Value cannot be null or whitespace.
    Parameter name: token
    at Umbraco.Courier.RepositoryProviders.Webservices.Repository.AuthorizeByToken(String token)
    at Umbraco.Courier.RepositoryProviders.Webservices.Repository.AuthorizeAndLog(String memberName)
    at Umbraco.Courier.RepositoryProviders.Webservices.Repository.CloseSession(String sessionKey)
    --- End of inner exception stack trace ---
    at System.Web.Services.Protocols.SoapHttpClientProtocol.ReadResponse(SoapClientMessage message, WebResponse response, Stream responseStream, Boolean asyncCall)
    at System.Web.Services.Protocols.SoapHttpClientProtocol.Invoke(String methodName, Object[] parameters)
    at Umbraco.Courier.RepositoryProviders.CourierWebserviceRepositoryProvider.CloseSession(String sessionKey)
    at Umbraco.Courier.RepositoryProviders.CourierWebserviceRepositoryProvider.Dispose(Boolean disposing)
    at Umbraco.Courier.RepositoryProviders.CourierWebserviceRepositoryProvider.Dispose()
    at Umbraco.Courier.Core.Repository.Dispose(Boolean disposing)
    at Umbraco.Courier.Core.Repository.Dispose()
    at Umbraco.Courier.UI.Dialogs.CommitItem.OnInit(EventArgs e)
    at System.Web.UI.Control.InitRecursive(Control namingContainer)
    at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
    

    Considering that I have set the token api key in the config, I'm not sure what else to do here.

  • Eric Frost 5 posts 88 karma points admin hq
    Feb 22, 2019 @ 18:25
    Eric Frost
    1

    Hi Heather!

    You wouldn't per chance be running the repositories with https right?

    When connecting to the different repositories in the courier.config file, the endpoints / domains have to be in http.

    That is one the errors I can remember on the top of my head.

    Let me know if you have further questions :D

  • Heather Floyd 610 posts 1032 karma points MVP 6x c-trib
    Feb 22, 2019 @ 18:27
    Heather Floyd
    0

    Thanks, Eric.

    The live site IS on HTTPS... How do we work around that? There is a rewrite rule to force https in the web.config.

  • Eric Frost 5 posts 88 karma points admin hq
    Feb 22, 2019 @ 18:34
    Eric Frost
    0

    Well courier works in such a way that, the package itself does not need the https domain.

    It should like this in the courier.config file:

    <repository name="Live" alias="1" type="CourierWebserviceRepositoryProvider" visible="true">
    <url>http://mylivesite.com</url>;
    <user>0</user>  
    

    Courier just wants the http domain and you don't need to worry about rewrite rules, that is all something courier figures out

  • Heather Floyd 610 posts 1032 karma points MVP 6x c-trib
    Feb 22, 2019 @ 18:43
    Heather Floyd
    0

    Well, now I get the error:

    Cannot connect to the destination http://www.mylivesite.com//umbraco/plugins/courier/webservices/repository.asmx
    

    That file DOES exist on disk...

    Also, all the sites are on the same server box, so access shouldn't be an issue.

  • Eric Frost 5 posts 88 karma points admin hq
    Feb 22, 2019 @ 18:45
    Eric Frost
    0

    You need to use your domain and not the one I posted. The domain I gave you was just an example to show you how the repository should look like :)

  • Heather Floyd 610 posts 1032 karma points MVP 6x c-trib
    Feb 22, 2019 @ 18:46
    Heather Floyd
    0

    I am using my actual domain in the config. I obscured it here for client privacy.

  • Eric Frost 5 posts 88 karma points admin hq
    Feb 22, 2019 @ 18:48
    Eric Frost
    0

    Aaaah but of course!

    is there a trailing backslash on the domain?

  • Heather Floyd 610 posts 1032 karma points MVP 6x c-trib
    Feb 22, 2019 @ 18:50
    Heather Floyd
    0

    No trailing backslashes. (C'mon, Eric, give me a LITTLE credit here... ;-) )

  • Heather Floyd 610 posts 1032 karma points MVP 6x c-trib
    Feb 22, 2019 @ 20:30
    Heather Floyd
    100

    After taking the conversation with Eric into the private Courier Support ticket system, we got the issue resolved.

    I ended up removing the "www" from the live site URL in the courier.config. Also, I followed Eric's suggestion to change it to http rather than https. (My tests indicated that the URL Rewrite rules in the web.config had no effect on anything.)

    The important thing: I noticed that I needed to restart the websites in IIS after updating the courier.configs in order for the changes to be properly recognized by all the sites.

Please Sign in or register to post replies

Write your reply to:

Draft