volume_up

A critical vulnerability was discovered in React Server Components (Next.js). Our systems remain protected but we advise to update packages to newest version. Learn More

volume_up

A critical vulnerability was discovered in React Server Components (Next.js). Our systems remain protected but we advise to update packages to newest version. Learn More

Cannot update visitior groups

When trying to update the visitor groups I get 'method not allowed'.

In Startup I clearly allow 'PUT'

services.AddCors(options =>
	{
		options.DefaultPolicyName = defaultPolicyName;
		options.AddDefaultPolicy(policy => policy
			.WithMethods("GET", "PUT", "POST", "DELETE", "OPTIONS")
			.WithHeaders("Origin", "Authorization", "Accept", "Accept-Language", "Accept", "Content-Type")
			.WithExposedContentDeliveryApiHeaders()
			.WithExposedContentDefinitionApiHeaders());
	});

// ... AND ...

app.UseRouting();
app.UseCors();
app.UseAuthentication();
...
app.UseEndpoints...

Is there some configuration that I missed?

#306497
Aug 09, 2023 10:23
Vote:

I think .WithMethods is a bit tricky - it is modifying the CORS policies, not allowing PUT per se. 

Are you using IIS to host your app, or something else?

#306509
Aug 09, 2023 15:36
Carl S - Aug 10, 2023 4:58
- IIS in our test environment
- IIS Express in our local/development environment (F5 or dotnet watch run).
- Azure App Service in production (not released yet).
Carl S - Aug 10, 2023 5:02
I'm going to try removing the 'WebDAVModule' per googles suggestions and see if that have any affect.
Carl S - Aug 10, 2023 5:29
Google is my friend - I was exhausted yesterday and didn't even think of google.
Removing WebDAV worked.
- Aug 10, 2023 9:45
Great to hear. And thanks for coming back with the solution. Yeah I thought of WebDAVModule which is why I asked for IIS. Probably should have spilled the beans at once :)
error This topic was created over six months ago and has been resolved. If you have a similar question, please create a new topic and refer to this one.
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.