I have recently seen a web application throwing
System.UriFormatException error with this message: Invalid URI: The format of the URI could not be determined. It is one of the errors that is almost always related to code, not IIS or other components.
Anti-forgery token prevents CSRF (Cross-Site Request Forgery) attacks. The server associates this token with current user’s identity and sends it to the client. In the next request from client, the server expects to see this token. If the token is missing or it is different, then the server rejects the request (Reference).
I have recently worked on some anti-forgery related errors. These are the error messages I saw in Event Viewer:
The provided anti-forgery token was meant for a different claims-based user than the current user.
The provided anti-forgery token was meant for user “”, but the current user is “andre.boucher”.
The anti-forgery cookie token and form field token do not match.
The required anti-forgery cookie “__RequestVerificationToken” is not present.
Many web applications require users to upload files. Whether it’s a photo, document or any other type of file, your application should be able to read it from the client computer and store it in the server.
I have recently worked on a case where the developer were trying to use the functions below to get the full path of the file:
string filePath = Path.Combine(Request.Form["file"].ToString()); string filePath = System.IO.Path.GetFullPath(Request.Form["file"].ToString());
These functions won’t return the full path if “Include local directory path when uploading files to a server” setting is disabled in Internet Explorer.Read More