Questions tagged [asp.net-4.6]
38 questions
11
votes
3 answers
ASP.NET Core Image Upload and Resize
How do you get the file stream of an uploaded image (IFormFile) and resize it?
public ActionResult Upload(IFormFile file)
{
using (var reader = new StreamReader(file.OpenReadStream()))
{
var fileContent = reader.ReadToEnd();
…

Nick De Beer
- 5,232
- 6
- 35
- 50
3
votes
1 answer
ASP.Net HTTP2 PushPromise is slow
I'm trying to implement the Http2 push server functionality using "PushPromise" .NET 4.6.1, for this I have a "html extension" with Razor (we did not implement MVC only used the Razor engine to build the pages).
public static IHtmlString…

Jorgelig
- 184
- 2
- 9
3
votes
1 answer
What is the default ServicePointManager.SecurityProtocol value in .NET 4.6.1?
In .NET 4.0 and 4.5, the default value for ServicePointManager.SecurityProtocol was SecurityProtocolType.Tls|SecurityProtocolType.Ssl3 in .NET 4.0/4.5 according to this post.
What is the default value in .NET 4.6.1? I can't find it anywhere

Alex Kibler
- 4,674
- 9
- 44
- 74
3
votes
0 answers
Is there an upgrade path from ASP.NET 4 to ASP.NET 5
From what I gather, ASP.NET 5 is vastly different from previous versions in that most everything runs through the OWIN pipeline. Where does that leave apps written using ASP.NET 4.6 and before? Is there an upgrade path from ASP.NET 4.x to 5? Is this…

Rafe
- 8,467
- 8
- 47
- 67
2
votes
1 answer
ASP.NET can't download PDF using itext7 (but can save to disk)
I'm using itext7 (7.1.16) to produce PDF. When i try to write to disk all is ok.
When i'm trying to send back client (without saving on disk) nothing happens.
I associated this piece of code to Asp button but nothing happens (no errors and no…

Franco
- 101
- 9
2
votes
1 answer
SignalR Not Using Websocket Transport with ASPNET 4.6
We are trying to use a standalone SignalR server and have a couple of hubs built that we are utilizing. They are working correctly, but I have been unable to get SignalR to utilize the WebSockets transport.
In general, I've had trouble finding…

Steve B
- 161
- 2
- 13
1
vote
1 answer
Need to receive Azure Service Bus Messages on a .NET Framework 4.6.1 application
I Have an Azure Cloud Function that pushes messages to a queue under a Azure Service Bus namespace. The receiver for this queue is a .NET Framework 4.6.1 application which has the Service Bus SDK[Azure.Messaging.ServiceBus] installed. Problem is…

Karan Rao
- 295
- 2
- 4
- 7
1
vote
2 answers
Will calling Task.Result cause a deadlock if ConfigureAwait(false) is used?
I found this method:
public override void OnActionExecuting(HttpActionContext actionContext)
{
var body = Task.Run(async()
=> await actionContext.Request.Content.ReadAsStringAsync()
.ConfigureAwait(false)).Result;
//rest of code…

David Klempfner
- 8,700
- 20
- 73
- 153
1
vote
2 answers
How to view model binding exceptions locally
I have an ASP.NET web app running in an Azure app service.
After doing a profiler trace, I noticed these three .NET exceptions:
Requested value 'Asc' was not found.
Asc is not a valid value for SortOrder.
The parameter conversion from type…

David Klempfner
- 8,700
- 20
- 73
- 153
1
vote
2 answers
ASP.NET download PDF feature in UpdatePanel unable to refresh UpdateProgress control
I've two UpdatePanel in a page. The second one has UpdateMode="Conditional" and here there's a link button to produce PDF file.
My goal is to allow the PDF download and in the meantime make a waiting image appear (like an hourglass).
After a few…

Franco
- 101
- 9
1
vote
0 answers
How to implement a scatter-gather pattern in an ASP.NET web application?
Suppose an ASP.NET WebAPI request arrives at a controller method.
Suppose the request represents an 'event' which needs processed. The event has multiple operations associated with it that should be performed in parallel. For example, each…

Triynko
- 18,766
- 21
- 107
- 173
1
vote
1 answer
The await operator has a different behavior on ASP.NET than on ASP.NET CORE?
In ASP.NET CORE 2.0 I have this behavior:
I send two AJAX requests from the browser, the first request to one action (action1 this is an async action) and the second request to other action (action2).
While the server is processing the first…

Jose Emilio Cabana
- 13
- 3
1
vote
2 answers
Page_ClientValidate prevents subsequent (unrelated) LinkButton client click from posting back
TL;DR: If the Edit button is clicked without a ListBox selection, triggering a validation failure, why does the Delete link need to be clicked twice before the browser responds?
Using the source code below for a very simple menu, I have three…

EvilDr
- 8,943
- 14
- 73
- 133
1
vote
1 answer
ToshortDateString() and CultureInfo.InvariantCulture
I want to convert persia date to Gregorian Date. I use this code.
public static void GetDate()
{
String persianDate="1384/03/15"
Datetime dt= GetComponentDate(persianDate);
}
DateTime GetComponentDate(string fdate)
{
DateTime edate;
int…

Ftm
- 99
- 1
- 11
1
vote
1 answer
ASP.NET menu control with bootstrap
ASP.NET menu control with bootstrap does not show DynamicPopOutImage.
I tried to show the default image or my custom one. It does not render. The menu is built from a database.

user3285061
- 23
- 8