Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Using Sitecore.Ship with version 8.1 of sitecore, issue with /services url #52

Open
mmussitsch opened this issue Dec 7, 2015 · 11 comments

Comments

@mmussitsch
Copy link

I had to download the source and build my own sitecore ship because of using sitecore 8.1.
Everything was working fine until our content editors renamed an area of our site to be "services".
So now they need the /services url to refer to their content area. But as you know sitecore ship uses the /services url for fileupload, publishing etc.
They went ahead and removed the entry from the ship.config file without my knowing. So two things

  1. I reverted back their change but it seems the url is still not found or working. When I try to run it via the cmd line, it says exactly that. Since they only changed a config file, I'm surprised putting /services back didn't just fix it.
  2. Is there a way to adjust the url to instead be "scshipservices" so that we can use "services" for their use? If so, can you provide instructions? We're fairly new to .NET.
    I hope it's okay to post this kind of issue here.

Thanks,
Melissa M

@mmussitsch
Copy link
Author

No one has responded yet -- but I need to take a step back. I did build my own and get Sitecore.Ship via the code to work on 8.0. Will it work on 8.1?

@pveller
Copy link
Contributor

pveller commented Dec 8, 2015

The only way is via the code. /services is not configurable in Ship but I know Kevin was going to extract it out. Not sure if it got backlogged with the new Web API / SSC plans. If you ask me - it's ok to run your own custom version of it that fits your needs. Ship is infrastructure and it's hard to have one size fits all. I am using a fork too - the PR with token authentication wasn't merged (yet) and I need that on the instances with Ship exposed out.

Sent from my iPhone

On Dec 8, 2015, at 11:29 AM, mmussitsch [email protected] wrote:

No one has responded yet -- but I need to take a step back. I did build my own and get Sitecore.Ship via the code to work on 8.0. Will it work on 8.1?


Reply to this email directly or view it on GitHub.

@kevinobee
Copy link
Owner

Apologies guys, @pveller was spot on I have been swamped. Must try harder and will get those forked changesets looked at asap.

@peelybird
Copy link

Hi All.

Just a note to say we had a similar issue. Last time I checked (this Tuesday) we were playing with more specific, multiple, nancy httphandler paths to fix it but that was just one of my crazy on the spot ideas before quite literally running for the train. TBH I have to check what fixed it for us in the end but when I'm in the office next week I'll ping the result here. Might help someone!

David

@peelybird
Copy link

Ok so as it turns out, that was the answer. We replaced:
<add name="Nancy" verb="*" type="Nancy.Hosting.Aspnet.NancyHttpRequestHandler" path="/services/*" />
in the <system.webserver><handlers> section with a specific entry for each required method:
<add name="NancyPublish" verb="*" type="Nancy.Hosting.Aspnet.NancyHttpRequestHandler" path="/services/publish/*" /> <add name="NancyPackage" verb="*" type="Nancy.Hosting.Aspnet.NancyHttpRequestHandler" path="/services/package/*" />

I hope that's helpful for some.

David

@mohit511
Copy link

I am having a similar issue with Sitecore 8.1 (latest update) and Ship v0.4. When I add the handler
under <system.webserver> i get the following exception on GET http://sc81/services/about

[FileLoadException: The given assembly name or codebase was invalid. (Exception from HRESULT: 0x80131047)]
System.RuntimeTypeHandle.GetTypeByName(String name, Boolean throwOnError, Boolean ignoreCase, Boolean reflectionOnly, StackCrawlMarkHandle stackMark, IntPtr pPrivHostBinder, Boolean loadTypeFromPartialName, ObjectHandleOnStack type) +0
System.RuntimeTypeHandle.GetTypeByName(String name, Boolean throwOnError, Boolean ignoreCase, Boolean reflectionOnly, StackCrawlMark& stackMark, IntPtr pPrivHostBinder, Boolean loadTypeFromPartialName) +106
System.RuntimeType.GetType(String typeName, Boolean throwOnError, Boolean ignoreCase, Boolean reflectionOnly, StackCrawlMark& stackMark) +62
System.Type.GetType(String typeName) +42
Nancy.Hosting.Aspnet.NancyHttpRequestHandler.GetConfigurationBootstrapper() +112
Nancy.Hosting.Aspnet.NancyHttpRequestHandler.GetBootstrapper() +29
Nancy.Hosting.Aspnet.NancyHttpRequestHandler..cctor() +21

[TypeInitializationException: The type initializer for 'Nancy.Hosting.Aspnet.NancyHttpRequestHandler' threw an exception.]
Nancy.Hosting.Aspnet.NancyHttpRequestHandler..ctor() +0

When I add the same in section under <system.web> it keeps getting back with 404 error.

Any pointers will be really helpful.

Thanks
Mohit

@pveller
Copy link
Contributor

pveller commented Apr 19, 2016

@mohit511, did you try using the classic ASP.NET endpoint?

@mohit511
Copy link

Hi @pveller, yes i tried. added handlers <add name="Nancy" verb="*" type="Nancy.Hosting.Aspnet.NancyHttpRequestHandler" path="/services/*" resourceType="Unspecified" /> under <system.webserver><handlers> - keeps throwing the exception

@pveller
Copy link
Contributor

pveller commented Apr 19, 2016

I actually meant:

<add verb="*" 
     name="Sitecore.Ship"  
     type="Sitecore.Ship.AspNet.SitecoreShipHttpHandler, Sitecore.Ship.AspNet"
     path="/services/*" />

@mohit511
Copy link

Thank you @pveller. This works.

@kevinobee
Copy link
Owner

Sorry guys, I missed this email trail as I have been away travelling.

Thanks @pavel for responding :)

-----Original Message-----
From: "mohit511" [email protected]
Sent: ‎20/‎04/‎2016 10:20
To: "kevinobee/Sitecore.Ship" [email protected]
Cc: "Kevin Obee" [email protected]; "Comment" [email protected]
Subject: Re: [kevinobee/Sitecore.Ship] Using Sitecore.Ship with version 8.1 ofsitecore, issue with /services url (#52)

Thank you @pveller. This works.

You are receiving this because you commented.
Reply to this email directly or view it on GitHub

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants