dotnet / dotnet/aspnetcore

AntiforgeryValidationException preventing Blazor app to start on IIS Web App. (case sensitive url)

Open
#57,920 17 comments 0 reactions 0 assignees View on GitHub
area-dataprotection Needs: Attention :wave:
Dominant language
C#
Stars
38.4k
Forks
10.9k
Avg merge
2d 6h
Merged PRs (30d)
290

Description

### Is there an existing issue for this?

- [X] I have searched the existing issues

### Describe the bug

The problem start when deploy my Blazor aspnet core 8 app on IIS like the image below.

![image](https://github.com/user-attachments/assets/605597b0-6811-4792-a0a3-9b33acbecc50)

If I use the url in browser with the same name in the base tag everything works.

![image](https://github.com/user-attachments/assets/26b24cb1-4971-4ad6-96c5-cbf3df53338b)

If the url is correct but with the web app name with different case I receve the error below. For example portal instead of Portal

![image](https://github.com/user-attachments/assets/8714dc81-9709-4188-9953-133d8424406b)

could you help me?
I think the url should be case insentitive in the management of the Antiforgery.

thanks

### Expected Behavior

I think the url should be case insentitive in the management of the Antiforgery.

### Steps To Reproduce

_No response_

### Exceptions (if any)

_No response_

### .NET Version

net 8

### Anything else?

_No response_

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.