This project has moved. For the latest updates, please go here.

Error: (405) Method Not Allowed when deleting a store using the rest client from visual studio

Oct 15, 2014 at 12:07 PM
I have Brightstar 1.7.1 hosted in IIS and would like to know what I need to do in a visual studio project that would allow the following to work:

IBrightstarService client = BrightstarService.GetRestClient(restEndpoint);
var sid = Guid.NewGuid().ToString();

It currently throws the following exception when the DeleteStore method is called:
"The remote server returned an error: (405) Method Not Allowed."

Do I need to configure some permission on the client? If so how. Or is it set when the store is created?

The web.config on the IIS hosted service contains:
<brightstarService connectionString="Type=embedded;StoresDirectory=C:\BrightstarDB\Data\">
  <fallback authenticated="All" anonymous="All"/>
  <fallback authenticated="All" anonymous="All"/>

    <add type="BrightstarDB.Server.Modules.Authentication.NullAuthenticationProvider, BrightstarDB.Server.Modules"/> *

which would appear to let anything happen. Any help would be appreciated,
Oct 15, 2014 at 2:41 PM

Sounds like an IIS configuration issue. The B* REST client issues an HTTP DELETE request to delete a store and it appears that IIS doesn't like that. It looks like it might be related to WebDAV or just an issue with needing to have the DELETE verb enabled in IIS:

If you can let me know if either of these fix the issue for me I can add it to the docs.


Oct 15, 2014 at 3:57 PM
Hi Kal,

On you advice the delete now works. My updated web.config looks like this:

<modules runAllManagedModulesForAllRequests="true">
<remove name="WebDAVModule" />
<validation validateIntegratedModeConfiguration="false"/><httpErrors existingResponse="PassThrough"/>
  <add name="Nancy" verb="*" type="Nancy.Hosting.Aspnet.NancyHttpRequestHandler" path="*"/>
  <remove name="WebDAV" />

Thank you so much for your help.

Marked as answer by techquila on 10/21/2014 at 5:21 AM
Oct 21, 2014 at 12:21 PM
Thanks for the update. I'll make sure that we add something into the docs about this as I'm sure other people will hit it too.