Questions tagged [asp.net]
ASP.NET is a Microsoft web application development framework that allows programmers to build dynamic web sites, web applications and web services. It is useful to use this tag in conjunction with the project type tag e.g. [asp.net-mvc], [asp.net-webforms], or [asp.net-web-api]. Do NOT use this tag for questions about ASP.NET Core - use [asp.net-core] instead.
asp.net
34,660
questions
539
votes
16
answers
827k
views
How to Deserialize XML document
How do I Deserialize this XML document:
<?xml version="1.0" encoding="utf-8"?>
<Cars>
<Car>
<StockNumber>1020</StockNumber>
<Make>Nissan</Make>
...
2160
votes
42
answers
810k
views
How do I format a Microsoft JSON date?
I'm taking my first crack at Ajax with jQuery. I'm getting my data onto my page, but I'm having some trouble with the JSON data that is returned for Date data types. Basically, I'm getting a string ...
911
votes
43
answers
1.4m
views
Regex for password must contain at least eight characters, at least one number and both lower and uppercase letters and special characters
I want a regular expression to check that:
contains at least eight characters,
including at least one number and
includes both lower and uppercase letters and
include at least one special characters, ...
1592
votes
48
answers
1.2m
views
A potentially dangerous Request.Form value was detected from the client
Every time a user posts something containing < or > in a page in my web application, I get this exception thrown.
I don't want to go into the discussion about the smartness of throwing an ...
736
votes
31
answers
800k
views
Can I set an unlimited length for maxJsonLength in web.config?
I am using the autocomplete feature of jQuery. When I try to retrieve the list of more then 17000 records (each won't have more than 10 char length), it's exceeding the length and throws the error:
...
1180
votes
16
answers
998k
views
Maximum request length exceeded.
I am getting the error Maximum request length exceeded when I am trying to upload a video in my site.
How do I fix this?
-2
votes
1
answer
2k
views
Reach control from another page. ASP.Net
Well, this is the situation...
I have a element (<h2 id="test"></h2>) in Page1.aspx, and I want to change it from Page2.aspx (administration zone for the user...), kind of...
test....
887
votes
23
answers
268k
views
ASP.NET Web Site or ASP.NET Web Application?
When I start a new ASP.NET project in Visual Studio, I can create an ASP.NET Web Application or I can create an ASP.NET Web Site.
What is the difference between ASP.NET Web Application and ASP.NET ...
739
votes
36
answers
446k
views
How do you create a dropdownlist from an enum in ASP.NET MVC?
I'm trying to use the Html.DropDownList extension method but can't figure out how to use it with an enumeration.
Let's say I have an enumeration like this:
public enum ItemTypes
{
Movie = 1,
...
444
votes
9
answers
120k
views
One DbContext per web request... why?
I have been reading a lot of articles explaining how to set up Entity Framework's DbContext so that only one is created and used per HTTP web request using various DI frameworks.
Why is this a good ...
475
votes
4
answers
523k
views
Server.MapPath("."), Server.MapPath("~"), Server.MapPath(@"\"), Server.MapPath("/"). What is the difference?
Can anyone explain the difference between Server.MapPath("."), Server.MapPath("~"), Server.MapPath(@"\") and Server.MapPath("/")?
676
votes
9
answers
229k
views
ASP.NET MVC - Set custom IIdentity or IPrincipal
I need to do something fairly simple: in my ASP.NET MVC application, I want to set a custom IIdentity / IPrincipal. Whichever is easier / more suitable. I want to extend the default so that I can call ...
729
votes
53
answers
1.6m
views
The request was aborted: Could not create SSL/TLS secure channel
We are unable to connect to an HTTPS server using WebRequest because of this error message:
The request was aborted: Could not create SSL/TLS secure channel.
We know that the server doesn't have a ...
301
votes
13
answers
860k
views
How can I connvert a JSON object to a custom C# object?
Is there an easy way to populate my C# object with the JSON object passed via AJAX?
This is the JSON object passed to a C# web method from the page using JSON.stringify:
{
"user": {
...
230
votes
24
answers
669k
views
Deploying website: 500 - Internal server error
I am trying to deploy an ASP.NET application. I have deployed the site to IIS, but when visiting it with the browser, it shows me this:
Server Error
500 - Internal server error.
There is a problem ...