|
Apologies for the shouting but this is important.
When answering a question please:
- Read the question carefully
- Understand that English isn't everyone's first language so be lenient of bad spelling and grammar
- If a question is poorly phrased then either ask for clarification, ignore it, or mark it down. Insults are not welcome
- If the question is inappropriate then click the 'vote to remove message' button
Insults, slap-downs and sarcasm aren't welcome. Let's work to help developers, not make them feel stupid.
cheers,
Chris Maunder
The Code Project Co-founder
Microsoft C++ MVP
|
|
|
|
|
For those new to message boards please try to follow a few simple rules when posting your question.- Choose the correct forum for your message. Posting a VB.NET question in the C++ forum will end in tears.
- Be specific! Don't ask "can someone send me the code to create an application that does 'X'. Pinpoint exactly what it is you need help with.
- Keep the subject line brief, but descriptive. eg "File Serialization problem"
- Keep the question as brief as possible. If you have to include code, include the smallest snippet of code you can.
- Be careful when including code that you haven't made a typo. Typing mistakes can become the focal point instead of the actual question you asked.
- Do not remove or empty a message if others have replied. Keep the thread intact and available for others to search and read. If your problem was answered then edit your message and add "[Solved]" to the subject line of the original post, and cast an approval vote to the one or several answers that really helped you.
- If you are posting source code with your question, place it inside <pre></pre> tags. We advise you also check the "Encode "<" (and other HTML) characters when pasting" checkbox before pasting anything inside the PRE block, and make sure "Use HTML in this post" check box is checked.
- Be courteous and DON'T SHOUT. Everyone here helps because they enjoy helping others, not because it's their job.
- Please do not post links to your question into an unrelated forum such as the lounge. It will be deleted. Likewise, do not post the same question in more than one forum.
- Do not be abusive, offensive, inappropriate or harass anyone on the boards. Doing so will get you kicked off and banned. Play nice.
- If you have a school or university assignment, assume that your teacher or lecturer is also reading these forums.
- No advertising or soliciting.
- We reserve the right to move your posts to a more appropriate forum or to delete anything deemed inappropriate or illegal.
cheers,
Chris Maunder
The Code Project Co-founder
Microsoft C++ MVP
|
|
|
|
|
am looking for the difference in performance between .NET Core and .NET Framework for building applications which is best for use?
|
|
|
|
|
When comparing .NET Core and .NET Framework, it is essential to consider various factors such as performance, cross-platform support, deployment options, and future-proofing. Here’s a detailed comparison between the two to help you decide which is best for your needs:
1. Performance
.NET Core:
Generally faster and more efficient than .NET Framework. Microsoft has made significant performance improvements in .NET Core, especially in areas like server-side web applications and microservices.
Kestrel, the web server in .NET Core, is highly optimized for performance, especially in handling asynchronous operations and modern hardware architectures.
Garbage Collection (GC) and JIT (Just-In-Time) compilation have been improved in .NET Core to reduce latency and improve throughput.
Supports tiered compilation, which optimizes hot paths of code over time for better performance.
.NET Framework:
Performance is generally good for most traditional desktop and enterprise applications. However, it lacks many of the modern performance optimizations found in .NET Core.
The web server in .NET Framework, IIS, is more mature but not as optimized for high-performance scenarios, especially compared to Kestrel in .NET Core.
Verdict: .NET Core offers better performance, especially for web applications, cloud-based services, and applications that require scalability.
2. Cross-Platform Support
.NET Core:
Cross-platform, meaning it can run on Windows, Linux, and macOS.
If you are building applications that need to be deployed across multiple operating systems, .NET Core is the clear choice.
.NET Framework:
Only runs on Windows. It is tightly integrated with the Windows operating system and is not portable across other platforms.
Verdict: If you need cross-platform support, .NET Core is the way to go.
3. Application Types
.NET Core:
Ideal for building web applications (ASP.NET Core), microservices, cloud-native apps, console apps, cross-platform libraries, and high-performance APIs.
It supports modern development practices like Docker containers, Kubernetes, and serverless architectures.
Does not fully support desktop applications like Windows Forms or WPF (though .NET Core 3.1 and .NET 5+ added partial support).
.NET Framework:
Best suited for Windows-specific applications, especially legacy desktop applications built with WPF or Windows Forms.
If you are working with older enterprise applications that require compatibility with Windows-only technologies like COM, WCF, or Windows Services, .NET Framework may still be a better choice.
Verdict: For modern, cloud-native apps, .NET Core is better. For Windows desktop applications or legacy support, .NET Framework may be preferred.
4. Deployment and Hosting
.NET Core:
Offers self-contained deployments, meaning you can bundle the runtime with your application. This allows it to run on machines without needing .NET Core pre-installed.
Supports side-by-side versioning, allowing multiple versions of .NET Core to run on the same machine without conflicts.
Supports hosting in modern environments like Docker containers, Linux servers, and Azure cloud services.
.NET Framework:
Relies on the .NET Framework runtime being installed on the machine. This can cause version conflicts or dependency issues.
Primarily hosted on Windows servers and IIS, which is less flexible for modern cloud and container-based deployments.
Verdict: .NET Core offers more flexible and modern deployment options, especially for cloud and containerized environments.
5. Ecosystem and Libraries
.NET Core:
Provides access to most of the same libraries as .NET Framework, but with better support for open-source and modern libraries.
The .NET ecosystem has been shifting toward .NET Core with better support for new features and libraries.
.NET Framework:
Has a larger and more mature ecosystem for Windows-based libraries and tools. However, support for newer technologies and libraries is becoming limited as the focus shifts to .NET Core.
Verdict: While both ecosystems are strong, .NET Core is the future, with most new development efforts focused there.
6. Long-Term Support and Future
.NET Core:
.NET Core has evolved into .NET 5+ (now referred to simply as ".NET"), which is the future of the .NET platform. .NET 6 is the LTS (Long-Term Support) version.
Microsoft is actively developing and improving .NET Core/.NET 5+, making it the strategic choice for future-proofing your application.
.NET Framework:
.NET Framework 4.8 is the last major version of .NET Framework. Microsoft will continue to provide support and bug fixes but will no longer add new features or performance improvements.
Verdict: For long-term projects, .NET Core/.NET 5+ is the recommended choice as .NET Framework is now in maintenance mode.
7. Development and Tooling
.NET Core:
Works well with modern development tools like Visual Studio Code and Visual Studio on Windows, macOS, and Linux.
Supports modern build and CI/CD pipelines with Azure DevOps, GitHub Actions, and other CI/CD tools.
.NET Framework:
Primarily tied to Visual Studio on Windows. It does not have the same cross-platform tooling capabilities as .NET Core.
Verdict: .NET Core provides more modern and flexible tooling options.
Conclusion:
Choose .NET Core (or .NET 5+):
For better performance, cross-platform support, cloud-native apps, microservices, containerization, and future-proofing.
When you need flexible deployment and modern development practices.
Choose .NET Framework:
For legacy Windows desktop applications, or if your application depends on Windows-specific technologies that are not fully supported in .NET Core (like WCF or Windows Services).
For most new projects, .NET Core (or .NET 5+) is the recommended choice due to its performance benefits, modern development practices, and long-term support.
|
|
|
|
|
i want to code whatsapp otp send for totp in asp.net linq operation
|
|
|
|
|
You are going to be MUCH more specific than this. What have you tried so far?
.NET whatsapp OTP[^]
|
|
|
|
|
To implement sending WhatsApp OTP for TOTP (Time-based One-Time Password) in ASP.NET using LINQ operations, you'll need to:
1. Generate TOTP: Use a library that supports TOTP generation.
2. Send the OTP to WhatsApp: You can use services like Twilio, Vonage, or WhatsApp Business API to send messages
via WhatsApp.
3. Verify the OTP: Store and verify the TOTP against the user input.
|
|
|
|
|
I have a Raspberry PI (Linux-arm) with sense sense hat, being accessed on Windows 11 via ssh. The source code is on the Raspberry pi and I have the Visual Studio Code (latest) loaded on the Windows 11 machine. I have the remote SSH and remote SSH editing extensions loaded in VS.
The version of dotnet on the Pi is
.NET SDK:
Version: 7.0.100
Commit: e12b7af219
Runtime Environment:
OS Name: raspbian
OS Version: 11
OS Platform: Linux
RID: linux-arm
Base Path: /home/pi/.dotnet/sdk/7.0.100/
Host:
Version: 7.0.0
Architecture: arm
Commit: d099f075e4
.NET SDKs installed:
7.0.100 [/home/pi/.dotnet/sdk]
.NET runtimes installed:
Microsoft.AspNetCore.App 7.0.0 [/home/pi/.dotnet/shared/Microsoft.AspNetCore.App]
Microsoft.NETCore.App 7.0.0 [/home/pi/.dotnet/shared/Microsoft.NETCore.App]
I can build and run the application on the Raspberry PI, with no problems. The part I am missing is to be able to debug the application remotely.
I have gone through a few examples on the net, but nothing seems to be helpfull.
Any suggestions ?
Thanks
|
|
|
|
|
Jerry Walter 2024 wrote: Any suggestions ?
To start with explain exactly what the following means.
"The part I am missing is to be able to debug the application remotely."
So do you mean that when you attempt to attach the debugger remotely it fails to connect? Or it connects but doesn't step? Or you don't know how to connect? Or when connecting there is an error?
Or perhaps even you are not even running the binary on the PI but are attempting to simulate it on a regular desktop?
And there are potentially other variations.
|
|
|
|
|
hi have a table with email history that when i click on each subject it call external link.
my problem is how can i filter my record per Id, because on same table they are a more than same username but with different value cells.
on
@Html.Raw(rec.MailBodyHtml) on debug mode i see 5 record for username that's fine but i want filter with primary key of the table on sql.
note the primary key on table have no relation with other id .
this is my code on view side :
<div>
<div class="container">
<div class="row">
<div class="col-md-12">
<div class="panel panel-default">
<div style="text-align:right;padding: 5px 5px 0 0;font-size: 14px;">
<a href="#" class="text-decoration-none" onclick="printDivContent();">
Imprimer
</a>
</div>
<div id="printContent">
@foreach (var rec in Model)
{
@Html.Raw(rec.MailBodyHtml)
}
</div>
</div>
</div>
</div>
</div>
</div>
<div class="tab-content">
<!--Start Historique Email-->
<div id="Historique_Email" class="tab-pane active">
<div class="sf-bs-data-table">
<div class="table-responsive">
<table class="table table-striped table-bordered example-dt-table" style="width:100%">
<thead>
<tr>
<th>Date</th>
<th>Sujet</th>
<th>Nombres</th>
<th>Nom</th>
<th>Email</th>
<th>Type</th>
</tr>
</thead>
<tbody>
@{
foreach (var rec in Model)
{
<tr>
<td>@rec.Date.ToString("dd-MM-yyyy hh:ss")</td>
<td>
<a href="@Url.Action("BodyHtml", "Entreprise", new { Id = rec.UserId })" target="_blank"> @rec.MailSubject </a>
</td>
<td>@rec.Nb</td>
<td>@rec.NomAlerte</td>
<td>@rec.Email</td>
<td>@rec.TypeAlerte</td>
</tr>
}
}
</tbody>
</table>
</div>
</div>
</div>
|
|
|
|
|
Chrayet Mahdi wrote: how can i filter my record per Id,
That makes no sense. A record id is unique. You never filter 'on' it. You can either query for it directly or use it, perhaps in a collection to pull records that match each id in that collection.
I can't figure out what you want to do. Instead of throwing code I suggest that you figure out how to ask the question in english and ask for an algorithm (steps) to solve it then write code from that.
For example ...
1. You want to present a list of user names.
2. Then a user picks a name.
3. That name represents a set/collection of emails in the database.
So then how to get from 1 to 3?
|
|
|
|
|
Maybe a little late.
You want to sort your records by ID, not filter them. To sort the records by Id, you can use 'LINQ' to sort the 'Model' before iterating through it in your foreach loop, assuming Id is a property of the objects in your 'Model' - Sorting Operators: OrderBy & OrderByDescending[^]
Your code will look something like -
@foreach (var rec in Model.OrderBy(r => r.Id))
{
<tr>
<td>@rec.Date.ToString("dd-MM-yyyy hh:ss")</td>
<td>
<a href="@Url.Action("BodyHtml", "Entreprise", new { Id = rec.UserId })" target="_blank"> @rec.MailSubject </a>
</td>
<td>@rec.Nb</td>
<td>@rec.NomAlerte</td>
<td>@rec.Email</td>
<td>@rec.TypeAlerte</td>
</tr>
}
|
|
|
|
|
I want to convert PDF files into an image file that can be inserted into the body of an email. SO instead of attaching an email, the images will be in the body.
My question to you is, can you recommend a product for doing this task?
Have you had a negative experience with any product you think I should avoid?
Thank you for your advice.
Phil McG
|
|
|
|
|
Google returns results
convert pdf into image
I would be concerned about the size. Smaller it is then the harder it is to read.
Also when you say files (plural) hopefully you don't want multiples in one image. That would make the size even more relevant.
If large enough you would probably need to zip it.
|
|
|
|
|
IronPdf has a RasterizeToImageFiles method in its PdfDocument object that should do the trick. We've been using IronPdf for several years and have been pleased.
There are no solutions, only trade-offs. - Thomas Sowell
A day can really slip by when you're deliberately avoiding what you're supposed to do. - Calvin (Bill Watterson, Calvin & Hobbes)
|
|
|
|
|
I have Report automation tool created in WPF and the code is written in C# in visual stdudio. I have many reports in my RA tool. Now I want to create Pitchbook from these reports. Say I already have a class called ABC which runs a report called ABC and has 3 slides. I want to create something like to pick 2 slides from this report and 2 slides from another report like xyz and create a book. This process should be automated. Please let me know how can I do this
|
|
|
|
|
Well, for a start, you haven't defined what a "pitchbook" is. The term presumably means something to you, but means nothing to the rest of us.
Then there's the issue that you don't appear to have worked out your precise requirements. You need to work out precisely what you want to do, all the edge case, etc. - some vague hand-waving "do something like ..." statements don't count.
You also haven't told us what reporting tool you are using. If it's a custom tool you've written, then you are the only person who can possibly know how to do this.
"These people looked deep within my soul and assigned me a number based on the order in which I joined."
- Homer
|
|
|
|
|
I guess you need to create "reporting files" that you can query for your "book" instead of going "straight to print".
"Before entering on an understanding, I have meditated for a long time, and have foreseen what might happen. It is not genius which reveals to me suddenly, secretly, what I have to say or to do in a circumstance unexpected by other people; it is reflection, it is meditation." - Napoleon I
|
|
|
|
|
I doubt the solution has anything to do with WPF.
Since you cannot define a page from the report until the report actually runs that means all that matters is how the output of the report is produced.
Then something would need to process that output to pick out the necessary pages.
Member 16211985 wrote: I have many reports in my RA tool
Probably even more true because of this. Probably means the code was written by multiple people without following any modularization that you could take advantage of.
|
|
|
|
|
I decided to "upgrade" my dialog box forms with Accept and Cancel buttons properties! Now my dialog boxes were more user friendly.
A week later I began testing on one of these dialog forms which contained a lot of buttons and content, but I ran into a bit of a pickle. One of the many buttons had a click event coded to open a 2nd level modal dialog and when this 2nd dialog box closed the parent dialog it was invoked from closed as well. I couldn't figure out why for the longest time but luckily found the answer on the www.
When you set a form's "Cancel" property to a button the genius behind VS sets that button's "DialogResult" property to DialogResult.Cancel. When the button is clicked no matter what happens inside the buttons click handler the parent form will close with a DialogResult.Cancel.
If you copy a Cancel button with DialogResult property set to DialogResult.Cancel and paste it on a form the genius behind VS copies the DialogResult property as well, you now have two buttons with DialogResult.Cancel on your form, no warnings of course, it's what you intended to do!
I didn't even know buttons had the "DialogResult" property and that it could be used to automatically close a form, obviously it was there all along but I skimmed past it and never tried to experiment with it.
Funny thing is the form's Accept property does not change the OK button's DialogResult property to OK when that button is selected.
I suppose this feature helps eliminate the need to code Cancel button click events, but I'm so used to doing it anyway I probably won't bother using it in the future.
Any idea when this feature was added? Was it there all along?
|
|
|
|
|
Hello all.
I need to create a gantt chart using data from employee table. It need to display the period of time, start date, end date and the name of the task.
Can someone help me with this?
(Please, i`m in the last year of college and i need to finish it in time )
|
|
|
|
|
If you are looking for someone to write your code, possibly try here Freelancer.com[^]
Otherwise, post what you've tried, where you are stuck, and ask specific questions, you are much more likely to get help that way.
"the debugger doesn't tell me anything because this code compiles just fine" - random QA comment
"Facebook is where you tell lies to your friends. Twitter is where you tell the truth to strangers." - chriselst
"I don't drink any more... then again, I don't drink any less." - Mike Mullikins uncle
|
|
|
|
|
So you want someone else to pass the exam for you ?
In a closed society where everybody's guilty, the only crime is getting caught. In a world of thieves, the only final sin is stupidity. - Hunter S Thompson - RIP
|
|
|
|
|
Sorry, couldn't find a more appropriate forum to post this.
We have a Angular/.NET Core app that we are attempting to upgrade to .NET 8. I have the Angular Language Service installed and working with no problem in VS2019. With VS2022, not so much. Every time I load any project with Angular code I get this error,
"Task Failed - Activating language client Angular Language Service Extension: The JSON-RPC connection with the remote party was lost before the request could complete."
I've tried everything I can think of, including creating a ticket with MS. Surprisingly, they actually attempted to help resolve the problem. We renamed the cache folder, ran VS as admin, reset all options, disabled the extension auto update, repaired VS2022 (appropriate reboots), checked the Microsoft.VisualStudio.Default.err file, checked the log files (%temp%\VSLogs), uninstalled/reinstalled VS2022 (cleared temp files, rebooted), insure Node.js is installed, insure Win11SDK (both) are installed.
I'm at a complete loss as is everyone else. Other devs working on Angular/.NET projects in VS2022 do not have this issue. I was seeing this error before attempting to upgrade anything on the solution. Oddly, break points in TypeScript files work, but viewing the value of TypeScript variables does not work nor does F12 in TypeScript code. I'd rather get this working in VS2022 instead of using VS Code for Angular development and VS2022 for .NET, that's just ugly and messy.
"...JavaScript could teach Dyson how to suck." -- Nagy Vilmos
|
|
|
|
|
Just noticed Angular is "owned" by Google. For me, being a .NET (MS) "person", that would be a non-starter from day 1 in terms of future proofing any mission critical system. I know that doesn't help you; just saying if you have any future say while on the "leading" edge. "VS Code for Angular" it is then.
"Before entering on an understanding, I have meditated for a long time, and have foreseen what might happen. It is not genius which reveals to me suddenly, secretly, what I have to say or to do in a circumstance unexpected by other people; it is reflection, it is meditation." - Napoleon I
|
|
|
|
|