Search results for query: *

  • Users: Anonymous
  • Content: Threads
  • Order by date
  1. A

    Question How to secure API?

    I know we have an authorization attribute. [HttpGet("{id}")] [Authorize] public IActionResult Get(int id) In the startup.cs services.AddAuthentication(JwtBearerDefaults.AuthenticationScheme) .AddJwtBearer(JwtBearerDefaults.AuthenticationScheme, options =>...
  2. A

    Question Asp core does not support multiple apps in the same app pool

    I am trying to learn API development. I am using .net 3.1(my org uses VS 2019 and it is only showing me this framework). I have chosen API template(that has a sample Weatherforecast API). Upon executing it,I can see plain JSON in chrome but I wanted swagger UI). I am getting the following error...
  3. A

    Resolved VS 2019 is not showing .net framework 5.0

    In my organisation. we use VS 2019 version 16.11.21. When I clicked on API template or even ASP.net MVC Core web app, it only shows 3.1(out of support). I know now .net 5.0 is also out of support but in CS 2019, .net 6.0 is not working. When I tried changing the target framework to 5.0 from...
  4. A

    Resolved Questions regarding a project

    Hello, I have to develop an application where i have to access service now tickets. The application should access certain types of tickets and ignore the rest. Is it possible in c# to connect to service now tickets? Secondly, how to connect to the database that resides on AWS or any other...
  5. A

    Question Cannot deserialize the current because the type requires a JSON array (e.g. [1,2,3]) to deserialize correctly

    Hello, I am using the following test API - https://97mm2.sse.codesandbox.io/teachers/200 { "message":"Required Teacher", "data":{ "id":200, "firstName":"Jerold", "lastName":"Britto", "age":28, "email":"britto@xyz.com", "class":10, "students":[...
  6. A

    Question Login link of the Forum is not working

    Hello, When I click on Login, it shows the following message - Same thing happens when I click Register and Contact us. I was finally able to login by stumbling upon the following page when I tried to visit the admin profile.
  7. A

    Resolved Error Creating Window Handle

    I am creating a winform app that accepts a name and position as input and upon clicking the submit button generates a barcode of that name and prints that on the entered position in a pdf file(generates this as well). The app is giving me error on Environment.Exit(1) - Error Creating Window...
  8. A

    Question How to download pdf using link label?

    I am creating a pdf using PDFsharp and saving it automatically on button click- // Save the document... string filename = "Barcode.pdf"; document.Save(@"E:\" + filename); MessageBox.Show("PDF saved successfully!"); Instead of automatically saving it by...
  9. A

    Question Check part of a string in Hashtable Key

    Can we check for a part of string in hashtable key? For example, our key is key = residentnumber +","+ housenumber I know have a function called containskey() but do we have something that could partially check for a string in a hashtable key? For example, if we could search...
  10. A

    Question Save Query Results into Excel and Automatically run it

    I have a very simple query Select * from Employees where company = 'Company A' order by firstName I want to run this query to run automatically on a daily basis and save the results in excel. Is their any way I can achieve this purpose? I tried using SQL server jobs but the output excel file...
  11. A

    Question External table is not in the expected format

    I am trying to upload my excel 2013 file contents to sql server. Here is my code : try { string connectionString = @"data source=DELL\SQLEXPRESS01 ; initial catalog = amen; persist security info = True; Integrated Security = SSPI; "...
  12. A

    Question How to specify the path in File Upload Control?

    Hello, I am trying to upload an excel file into SQL server. The thing is I am stuck here string fileName = Path.Combine(@"C:\", FileUpload1.FileName); FileUpload1.SaveAs(fileName); String excelConnString =...
  13. A

    Resolved Can we render same view from different action methods?

    Hello, I am creating a test website for practice. The homepage looks like this - On clicking test The view is I want that when I click ID, a message should be displayed underneath the text box telling if the id is valid or invalid. Im using MVC architecture and connecting to database...
  14. A

    Resolved Question on Lambda Expressions in LINQ and MVC

    Hello I have always struggled with Lambda expressions in LINQ. I am trying to understand the following code that I found online . I know this might be a stupid question but I did try to read the documentation but couldnt understand much. I would be highly grateful if you could explain in simple...
  15. A

    Resolved Can we use ADO.NET with ASP.Net Core Web App(MVC) ?

    I am learning MVC. I had previously worked on ASP.Net Web Applications(.NET Framework) in which we used webforms, edmx, and ado.net to connect to the database for CRUD operations. But I don't see any edmx option in ASP.Net Core Web App(MVC) . I want to create a login page . I have the following...
  16. A

    Resolved How can we run a view/application in MVC?

    Hello, I am trying to learn MVC. I first created an empty ASP.NET Core application. Then, I added a Controller. namespace website.Controllers { public class HomeController : Controller { public IActionResult Index() { return View(); } } } I...
  17. A

    Resolved Cannot access fileName.exe because this file is being used by some other process

    I am using VS 2019. All my existing applications were working fine but all of a sudden i am getting this strange error. When i open an existing application to edit in debug mode, it works for 2 or 3 times, but then it shows this built in error when i click on run. I then tried working in...
  18. A

    Resolved Notice Board in ASP.NET

    I want to create a notice/circular board like this I want the user to click on any of the notice and then the detailed notice should appear in the next window. From this link Online Notice Board I have figured out that they are using windows.open and popup and they are setting the text in...
  19. A

    Resolved How to display an image from SQL Server?

    I have added a column for photo in my table alter table DailyMsg add Photo varbinary(max); This is my stored procedue create proc sp_viewImage as begin select Photo from DailyMsg end Function to connect to database and return value public byte[] getPhoto() {...
  20. A

    Resolved How to pass data from Controller to WebForm in ASP.NET MVC?

    I am trying to learn ASP.NET MVC and ADO.NET. I am making a demo website in which there would be an admin panel. The admin would update the Daily Messages which will get reflected in the main homepage. I am using ASP.NET MVC. I have created the table in database as create table DailyMsg(Sno int...
Back
Top Bottom