Microsoft Q&A

.NET

12,960 questions

Microsoft Technologies based on the .NET software framework.

Browse all .NET tags

12,960 questions with .NET-related tags

Sort by: Updated
1 answer

Ajax server method call not working.

I am using this code to call the server side method using Ajax. <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.8.3/jquery.min.js" type="text/javascript"></script> <script…

ASP.NET
ASP.NET
A set of technologies in the .NET Framework for building web applications and XML web services.
1,190 questions
asked 2023-01-31T09:24:28.8533333+00:00
Adeel Mirza 1 Reputation point
answered 2023-01-31T09:59:08.08+00:00
Lan Huang-MSFT 9,126 Reputation points Microsoft Employee
1 answer One of the answers was accepted by the question author.

Implementing SignalR in ASP.NET Core Web App (MVC) for real-time database updates

Hi All, I am still a bit green with C# and ASP.NET however I have created a ASP.NET Core Web App (MVC) .NET6, that displays an IOT temperature sensor reading summary dashboard and another page that displays the readings and other information about each…

ASP.NET Core
ASP.NET Core
A set of technologies in the .NET Framework for building web applications and XML web services.
2,552 questions
Azure SignalR Service
Azure SignalR Service
An Azure service that is used for adding real-time communications to web applications.
72 questions
asked 2023-01-11T13:00:50.5266667+00:00
ChrisU 111 Reputation points
accepted 2023-01-31T09:58:08.98+00:00
ChrisU 111 Reputation points
1 answer

How to fix canonical issues with WordPress on App Services

I need to redirect www.example.com to example.com. I have a custom domain with SSL, https enforced. Http requests are being redirected to https and working as expected. Where, or how, do I configure a redirect to get the www.example to redirect to…

ASP.NET Core
ASP.NET Core
A set of technologies in the .NET Framework for building web applications and XML web services.
2,552 questions
Azure Web Apps
Azure Web Apps
A feature of Azure App Service used to create and deploy scalable, mission-critical web apps.
4,320 questions
Azure Application Gateway
Azure Application Gateway
An Azure service that provides a platform-managed, scalable, and highly available application delivery controller as a service.
559 questions
Windows Server PowerShell
Windows Server PowerShell
Windows Server: A family of Microsoft server operating systems that support enterprise-level management, data storage, applications, and communications.PowerShell: A family of Microsoft task automation and configuration management frameworks consisting of a command-line shell and associated scripting language.
4,623 questions
asked 2023-01-28T13:29:04.7433333+00:00
Joe O 0 Reputation points
commented 2023-01-31T09:56:58.4733333+00:00
SnehaAgrawal-MSFT 11,176 Reputation points Microsoft Employee
2 answers

EF Core 6 Adding a table manually?

Hello friends, I am working on a web API project that I implemented with the code-first approach. I wonder if there is a problem creating tables manually without using migrations. Does it cause any problems? Thank you.

Entity Framework Core
Entity Framework Core
A lightweight, extensible, open-source, and cross-platform version of the Entity Framework data access technology.
422 questions
asked 2023-01-17T14:19:19.31+00:00
Cenk 666 Reputation points
commented 2023-01-31T09:49:26.6633333+00:00
Cenk 666 Reputation points
1 answer

Executing Stored Procedures based on condition in Razor Pages

Hi, I have a function that executes two stored procedures based on a condition. Stored procedure for the first condition works fine, but stored procedure for the second condition fails. public async Task<JsonResult>…

Entity Framework Core
Entity Framework Core
A lightweight, extensible, open-source, and cross-platform version of the Entity Framework data access technology.
422 questions
ASP.NET Core
ASP.NET Core
A set of technologies in the .NET Framework for building web applications and XML web services.
2,552 questions
asked 2023-01-27T05:38:24.0033333+00:00
Blooming Developer 196 Reputation points
answered 2023-01-31T09:42:26.0866667+00:00
Blooming Developer 196 Reputation points
1 answer

JSON Format WebAPI Entity Framework

Currently the JSON I'm using looks like this: The JSON file is huge so I'm only showing the first few rows in the file so not all data is shown. I'd like to get this JSON structured so I can use in a TreeView menu so I'd like to see get the out put to…

C#
C#
An object-oriented and type-safe programming language that has its roots in the C family of languages and includes support for component-oriented programming.
6,963 questions
Entity Framework Core
Entity Framework Core
A lightweight, extensible, open-source, and cross-platform version of the Entity Framework data access technology.
422 questions
ASP.NET API
ASP.NET API
ASP.NET: A set of technologies in the .NET Framework for building web applications and XML web services.API: A software intermediary that allows two applications to interact with each other.
147 questions
asked 2023-01-19T16:31:09.4066667+00:00
TheCoder 91 Reputation points
commented 2023-01-31T09:34:35.88+00:00
Lan Huang-MSFT 9,126 Reputation points Microsoft Employee
1 answer

How to System.BadImageFormatException (No string associated with token) error solved

Our Web Application build in .NET 4.8 and hosted as an azure app service throws this exception in some views. Here is the stack trace for one of these exceptions. We have run out of options to try certain things but it is stuck like that. We have tried…

C#
C#
An object-oriented and type-safe programming language that has its roots in the C family of languages and includes support for component-oriented programming.
6,963 questions
ASP.NET MVC
ASP.NET MVC
A Microsoft web application framework that implements the model-view-controller (MVC) design pattern.
596 questions
.NET Runtime
.NET Runtime
.NET: Microsoft Technologies based on the .NET software framework.Runtime: The period of time during which a program is being executed in a computer.
956 questions
Internet Information Services
asked 2023-01-28T13:47:57.62+00:00
Tabish Ashraf 0 Reputation points
commented 2023-01-31T09:33:10.1533333+00:00
JasonPan - MSFT 1,146 Reputation points Microsoft Employee
2 answers

.net core 7 web api very slow first call more that 32s

Hi, I have a problem in EF7 with core 7 web api. The first call take more that 30s and the second call take 60ms what is good. Any solution for that? Thanks

ASP.NET Core
ASP.NET Core
A set of technologies in the .NET Framework for building web applications and XML web services.
2,552 questions
asked 2023-01-23T10:36:52.5+00:00
Pedro Manuel Moço Ramalho 1 Reputation point
answered 2023-01-31T09:31:49.22+00:00
Srivastava, Prashant 1 Reputation point
2 answers One of the answers was accepted by the question author.

.NET Core API Framework Warning

Hi All, I am developing an application using .NET Core with angular client. I am exporting the data to excel and generating the file in C# .NET Core. I am using a nuget package for the same. After installing the nuget package in the project I am getting…

ASP.NET Core
ASP.NET Core
A set of technologies in the .NET Framework for building web applications and XML web services.
2,552 questions
asked 2023-01-27T14:03:43.83+00:00
Pratham Jain 81 Reputation points
answered 2023-01-31T09:27:25.62+00:00
Srivastava, Prashant 1 Reputation point
2 answers

Referencing multiple projects with top-level statements

I have two projects A and B. Each project has a single top-level statement Program.cs file. I made the Program class visible from each project by enabling internals: <InternalsVisibleTo Include="MyTargetProject" /> The problem is that…

C#
C#
An object-oriented and type-safe programming language that has its roots in the C family of languages and includes support for component-oriented programming.
6,963 questions
.NET
.NET
Microsoft Technologies based on the .NET software framework.
620 questions
asked 2023-01-30T16:34:45.33+00:00
Ernest 1 Reputation point
answered 2023-01-31T09:13:23.57+00:00
Ernest 1 Reputation point
0 answers

Upload a File One drive using MS Graph API in C#

when I am Uploading a File using Onedrive MS graph API in C# the file get Uploaded but every time i got a mail to that one drive account. I have set all notifications off from the one drive settings but still i am getting an email on every time file…

Microsoft Graph Files API
Microsoft Graph Files API
A Microsoft API to create an app that connects with files across OneDrive, OneDrive for Business, and SharePoint document libraries.
302 questions
ASP.NET
ASP.NET
A set of technologies in the .NET Framework for building web applications and XML web services.
1,190 questions
Microsoft Graph
Microsoft Graph
A Microsoft programmability model that exposes REST APIs and client libraries to access data on Microsoft 365 services.
576 questions
asked 2023-01-26T18:56:59.4+00:00
Pradyut Sinha 11 Reputation points
edited the question 2023-01-31T09:05:23.63+00:00
Zehui Yao_MSFT 3,431 Reputation points Microsoft Employee
0 answers

Maui customise Entry elements for android issue

Hi all This code work but 1 Why I forced to add the using directive 2 Why its not working when I put it in content page constructor My Entry elements background color is lost why so. From the internet solutions the same …

.NET MAUI
.NET MAUI
A Microsoft open-source framework for building native device applications spanning mobile, tablet, and desktop.
898 questions
asked 2023-01-03T11:17:45.68+00:00
Haviv Elbsz 481 Reputation points
commented 2023-01-31T09:05:13.88+00:00
Leon Lu (Shanghai Wicresoft Co,.Ltd.) 41,496 Reputation points Microsoft Employee
0 answers

asp.net c# news and details

hello everyone, I have a news page on my website, but when I add news, the image title and text appear. How can I add news as seen in the example I would appreciate your help

ASP.NET
ASP.NET
A set of technologies in the .NET Framework for building web applications and XML web services.
1,190 questions
C#
C#
An object-oriented and type-safe programming language that has its roots in the C family of languages and includes support for component-oriented programming.
6,963 questions
asked 2023-01-18T08:05:26.5866667+00:00
kadir koçaslan 0 Reputation points
edited a comment 2023-01-31T09:04:56.4066667+00:00
Lan Huang-MSFT 9,126 Reputation points Microsoft Employee
0 answers

Hoe to share a document link for external user using one drive API

I am using Onedrive api for sharle a document link to extenal user in c# it is not working

Microsoft Graph Files API
Microsoft Graph Files API
A Microsoft API to create an app that connects with files across OneDrive, OneDrive for Business, and SharePoint document libraries.
302 questions
ASP.NET
ASP.NET
A set of technologies in the .NET Framework for building web applications and XML web services.
1,190 questions
OneDrive
OneDrive
A Microsoft file hosting and synchronization service.
51 questions
asked 2023-01-30T17:58:08.58+00:00
Pradyut Sinha 11 Reputation points
edited the question 2023-01-31T09:04:37.6066667+00:00
Zehui Yao_MSFT 3,431 Reputation points Microsoft Employee
1 answer

Publicly declare Contacts

Hi, How can I publicly declare the following: var contacts = await Microsoft.Maui.ApplicationModel.Communication.Contacts.GetAllAsync(); something like this: Contacts contacts; contacts = await…

.NET MAUI
.NET MAUI
A Microsoft open-source framework for building native device applications spanning mobile, tablet, and desktop.
898 questions
asked 2023-01-19T22:42:25.9966667+00:00
Jassim Al Rahma 1,086 Reputation points
commented 2023-01-31T09:00:05.4933333+00:00
Wenyan Zhang (Shanghai Wicresoft Co,.Ltd.) 15,741 Reputation points Microsoft Employee
1 answer

How to implement a customized splash screen in .iOS(.Net MAUI)?

Hi .Net MAUI team, I want to create customized splash screen images instead of a simple logo icon. Similar to Xamarin Form, we can able to customise the splash screen using "LaunchScreen.storyboard". but .Net MAUI we don't have an option. I…

.NET MAUI
.NET MAUI
A Microsoft open-source framework for building native device applications spanning mobile, tablet, and desktop.
898 questions
asked 2023-01-19T09:40:01.24+00:00
Harshad Patel 0 Reputation points
commented 2023-01-31T08:58:03.0133333+00:00
Wenyan Zhang (Shanghai Wicresoft Co,.Ltd.) 15,741 Reputation points Microsoft Employee
1 answer One of the answers was accepted by the question author.

Check if frame is in specified position .net maui

is it possible to check if there is anything in the specified position of a grid? for example: if (Frame in Grid.Position(1,7)) { Console.Write("Specified position is already in use."); } I am trying to make a map editor for my own custom…

.NET MAUI
.NET MAUI
A Microsoft open-source framework for building native device applications spanning mobile, tablet, and desktop.
898 questions
.NET
.NET
Microsoft Technologies based on the .NET software framework.
620 questions
asked 2023-01-24T08:13:42.0133333+00:00
Mielesplayz 281 Reputation points
edited a comment 2023-01-31T08:57:35.2566667+00:00
Mielesplayz 281 Reputation points
1 answer One of the answers was accepted by the question author.

"Güncelle" button not working

ı dont undestand. Delete's working but update(Güncelle) not working. Where's my mistake ?

ASP.NET Web Forms
ASP.NET Web Forms
A part of the ASP.NET web application framework that can be used to create ASP.NET web applications.
401 questions
ASP.NET MVC
ASP.NET MVC
A Microsoft web application framework that implements the model-view-controller (MVC) design pattern.
596 questions
ASP.NET
ASP.NET
A set of technologies in the .NET Framework for building web applications and XML web services.
1,190 questions
ASP.NET API
ASP.NET API
ASP.NET: A set of technologies in the .NET Framework for building web applications and XML web services.API: A software intermediary that allows two applications to interact with each other.
147 questions
asked 2023-01-31T06:19:44.85+00:00
Harun Ergün 100 Reputation points
edited a comment 2023-01-31T08:53:25.92+00:00
Viorel 82,661 Reputation points
2 answers

fileupload emty error !!!

Hello friends, if the file upload is empty SqlConnection con = new SqlConnection(ConfigurationManager.ConnectionStrings["Holding_DB"].ConnectionString); con.Open(); SqlCommand cmdSelect = new…

C#
C#
An object-oriented and type-safe programming language that has its roots in the C family of languages and includes support for component-oriented programming.
6,963 questions
ASP.NET
ASP.NET
A set of technologies in the .NET Framework for building web applications and XML web services.
1,190 questions
ASP.NET Web Forms
ASP.NET Web Forms
A part of the ASP.NET web application framework that can be used to create ASP.NET web applications.
401 questions
asked 2023-01-30T11:57:08.06+00:00
kadir koçaslan 0 Reputation points
edited a comment 2023-01-31T08:45:16.1833333+00:00
QiYou-MSFT 851 Reputation points Microsoft Employee
0 answers

Session is not clearing after signing out from application razor pages

Hi, I want to clear my sessions,once i logout from my application. Now when i logout from application and click the back button,its navigating to the previous page. My logout button is given as a menu in _Layout page like this <li…

ASP.NET Core
ASP.NET Core
A set of technologies in the .NET Framework for building web applications and XML web services.
2,552 questions
asked 2023-01-31T04:04:24.65+00:00
Blooming Developer 196 Reputation points
commented 2023-01-31T08:16:19.9533333+00:00
Blooming Developer 196 Reputation points