Exposing a custom .svc stored in /Sitefinty/Services
Is it at all possible to expose a .svc file that I made living in /Sitefinity/Services?
I've tried combinations in the web.config with the location tag, but nothing seems to work...
<location path="Sitefinity/Services/X/X.svc"> <system.web> <authorization> <allow users="*" /> </authorization> </system.web></location>I could be totally wrong about this, but I believe you need to register the service using ObjectFactory with something like:
ObjectFactory.RegisterWebService(typeof(MyService), "Sitefinity/Services/MyServices/MyService.svc");Well I mean the service WORKS...when I'm logged in, but not at all for anon, wont let me to that url b/c it's blocked behind /Sitefinity/
Registering it makes it public?
Hello Steve,
Yeah, this directory is protected for security reasons. If you want to expose a custom service, you should place the service here:
SitefinityRoot/Sitefinity/Public/Services
If you want to store it in the protected services folder, I'd suggest you using
SystemManager.RegisterWebService(serviceType, appRelativeUrl);Hope this helps.
Regards,