Posts

Showing posts with the label ASP.NET

Fix: Digital signature on Local IIS vs IIS Express. XAdES

 Digital signatures, especially XAdES (XML Advanced Electronic Signatures), are typically applied to documents, messages, or data to provide a high level of security and authenticity. Whether you are using a local IIS (Internet Information Services) server or IIS Express, the process of applying digital signatures should be similar. However, there might be some differences in the setup and configuration. Here's a comparison: 1. **Local IIS**:    - Local IIS refers to a full-fledged, standalone IIS server that you may have installed on your machine. It is similar to a production IIS server and is suitable for hosting web applications.    - To apply XAdES digital signatures in a local IIS environment, you would typically follow the standard process for implementing digital signatures in your web application. This may involve using libraries or frameworks like .NET's System.Security.Cryptography or third-party libraries for signing XML or documents.    - You would configure your w

ASP.NET Core - Fetch API doesn't post data

 If you're encountering issues where a Fetch API call in an ASP.NET Core application is not successfully posting data, here are some steps to troubleshoot and resolve the problem: 1. **Check the API Endpoint**:    Ensure that the URL provided in your Fetch API call is correct and points to the intended API endpoint. Make sure that the endpoint is properly defined in your ASP.NET Core application. 2. **Check HTTP Method**:    Verify that you are using the correct HTTP method. For posting data, you should use the `POST` method in your Fetch API call. 3. **Request Headers**:    Make sure that any required headers, such as authentication tokens or content type headers, are included in your Fetch API request. The `Content-Type` header should be set to specify the data format being sent. 4. **Check JSON Data**:    If you are sending JSON data, ensure that your data is properly formatted and serialized as a JSON string using `JSON.stringify()`. 5. **Request Body**:    Include the data you