Lakhey_Wala
Lakhey_Wala
CC#
Created by Lakhey_Wala on 7/12/2023 in #help
❔ Need help implementing CORS and IP-based access control in ASP.NET Core Web API
I'm currently working on an ASP.NET Core Web API project and I need assistance with implementing CORS (Cross-Origin Resource Sharing) and IP-based access control. Here's the scenario: I have a requirement to allow access to the API only from devices whose IP addresses are registered in a database. If the IP address of the device making the request doesn't match any of the registered IP addresses, the content should not be accessible. To achieve this, I'm planning to use custom middleware. I would greatly appreciate any guidance or code examples on how to accomplish this in ASP.NET Core. Specifically, I'm looking for help with: Setting up CORS to allow cross-origin requests. Retrieving the IP address of the device making the request. Validating the IP address against the database records. Blocking access if the IP address is not found in the database. Any insights, best practices, or code snippets you can provide would be highly appreciated. Thank you in advance for your help!
11 replies
CC#
Created by Lakhey_Wala on 7/5/2023 in #help
✅ Seeking Alternative jQuery Plugin for Exporting ASP.NET Web Form HTML Table to Excel and PDF
I am currently working on an ASP.NET Web Forms project and need your assistance in finding a suitable jQuery plugin for exporting an HTML table to both Excel and PDF formats. I have already explored the popular DataTable plugin, but I am open to exploring alternative solutions that offer similar functionality. Specifically, I am looking for a jQuery plugin that allows me to export the contents of an HTML table to Excel and PDF files when a button is clicked. The plugin should be compatible with ASP.NET Web Forms and provide customizable options for exporting, such as defining column headers, excluding certain columns, and formatting the exported data. If you have any recommendations or suggestions for such a plugin, I would greatly appreciate your insights. Additionally, if you have any experience or tips on implementing and integrating the suggested plugin within an ASP.NET Web Forms application, your guidance would be invaluable. Thank you in advance for your help and support!
5 replies
CC#
Created by Lakhey_Wala on 6/29/2023 in #help
✅ Seeking Guidance on Migrating ASP.NET MVC to ASP.NET Core MVC and EF to EF Core
I'm currently in the process of migrating an old ASP.NET MVC project to ASP.NET Core MVC, and I could use some guidance from the community. In my research for migration, I came across the Visual Studio Upgrade Assistant extension, which has been helpful in migrating most of the code to the new project. However, I've encountered some challenges with migrating Entity Framework (EF). I'm specifically looking for advice on how to migrate EF to EF Core and ensure that all the necessary files, including EF, are successfully migrated. What would be the best approach for migrating projects from ASP.NET MVC to ASP.NET Core? Additionally, I'm planning to create an API for this project so that it can be used in a Single Page Application (SPA). Any insights or recommendations on this topic would be highly appreciated. Thank you in advance for your help!
5 replies