Does anyone know how to produce an excel pie graph in excel through MVC C+, Jquery or even SQL? I have the pie graph with rows 1 to 10 and would like to produce a pie excel graph with data in it when the excel is downloaded through a website.Any links would be appreciated, many thanks and remember to sneeze into your elbow!!

As far as I know the graph details need to be embedded in the Excel worksheet. I guess it may be possible if you know the worksheet layout to add the details through the use of the ACE Excel driver. But I am not 100% sure that that is what you are asking.

Not quite, but I guess close. Someone is going to be drawing a report from a website. Inside the excel spreadsheet is various data. I want this data (when opened in excel) to also have a pie graph attributed to it. Thanks!

Microsoft does not currently recommend, and does not support, Automation of Microsoft Office applications from any unattended, non-interactive client application or component (including ASP, ASP.NET, DCOM, and NT Services), because Office may exhibit unstable behavior and/or deadlock when Office is run in this environment.

The same would apply to automating it from SQL.

Javascript will not be able to automate it at all. Even if the user had Excel installed, Javascript is not allowed to access or automate applications on the user's computer for security reasons.

Sounds like you need to investigate each issue one at a time and test it.

Like how to write the JWT token to local storage, or the view bag or something.
Then how to get the controller to expect the JWT token [Authorize]
And how to send the token to the controller in the HTTP header. Do some reverse engineering.

I looked around on the interwebs and just basically saw nothing of value.
Just a bunch of forum post saying look at this by people who have never worked with JWT.
most talk were for core.

you are right and that is why I posted here to see if someone has done it.

I have a legacy system that is written in dot net 4 and MVC4

were currently trying to strangle it as it is used by the whole company. With the new stuff we are using JWT and have a single sign on API which works and works well. BUT the MD wants to me see if it is possible

I think it's possible to do personally, although I haven't done it nor put any day long research into it. Or perhaps at least just start with a piece of JWT, such as picking up the token from the other modern project to background validate in the old MVC4 system so you don't have to sign in again, and then the old system just runs as normal. That is very plausible to do. It's even plausible to me at least, to modify the old system so when you sign in, it writes a JWT token to local storage as well so you don't don't have to sign in to the new system.

JWT tokens stored in local storage have to use the client to read and write them, and I did see some source code concepts to get a view page to store the token in a hidden textbox, and then use Vanilla JavaScript to read that textbox and write it to Local storage. Or the other way around, use Vanilla JavaScript to read that token in Local Storage and write it to a hidden textbox. Then when the view page post back, the token will post as well and can be retrieved.

I pretty sure I can write a hack of AttributeUsageAttribute and call it [Authorize] that I can decorate the controller ActionResult with that will validate a token. Basically a hack of System.Identity but in a smaller package. Store the token in a cookie and can read and write it.

On SPA apps, well Angular at least, you don't have to store the token in Local Storage, but it can be stored in a cookie as well. But the cookie has to be a real single value cookie, and not the asp.net cookie that can store an array of values.

I'm implementing asp.net core project. I published my project into a package and set it on a main server, but, the database was set on another server. To do that, in the part of connection string of appsetting file, I just changed the server name and database name and when running the project I confront with the following error:

َError.
An error occurred while processing your request.

Request ID: |6baffbe3-48f1cf1e3a28ac47.
Development Mode

Swapping to Development environment will display more detailed information about the error that occurred.

The Development environment shouldn't be enabled for deployed applications. It can result in displaying sensitive information from exceptions to end users. For local debugging, enable the Development environment by setting the ASPNETCORE_ENVIRONMENT environment variable to Development and restarting the app

You are assuming a database connection error, the production system has hit an error but will not tell you about it because of security concerns - it could be any error, not necessarily the DB connection. You need to get more information about the error either from the logs or turn on development mode.

Never underestimate the power of human stupidity -
RAH
I'm old. I know stuff - JSOP

Part of learning .Net Core requires you to take a deep dive into how to setup the environment using the Program.cs and Startup.cs, and how to use environment variables. For my database setup, I ran a database on my workstation to develop on, and one on the production server, and used the appSettings file to switch between production and development. If you can contact the database server from your workstation, then all is good.

So using the development mode to run off the production database server would be a good way to figure out what's happening. Then maybe take a step back and setup your environment.

appSettings.Development.jsonappSettings.Production.json

and load the correct one in Programs.cs, this is just a sample of what you can do within the environment.

I need to display one image that is made up of multiple images with each a transparency.

So image one has a bike on the left and the rest of the image is transparent and the second image has a car on the right (again the rest is transparent), then I would need to display one image with a bike on the left and a car on the right.

How can I accomplish this in MVC Core 3.1?

As the user can select the images that build the total image I cannot prebuild this image.

I'm implementing an asp.net core project and I'm trying to authenticate the user login via ldap to active directory. I'm using the below link https://www.brechtbaekelandt.net/blog/post/authenticating-against-active-directory-with-aspnet-core-2-and-managing-users in order to implement the authentication against active directory with asp.net core. What I've tried in appsettings is like below:

Now my problem is after running the project and entering the user: koli-h and pass: asdq/1998 the system shows me invalid username or password. My real username and password in the server are koli-h and asdq/1998. However, if I change my user in the code to for example koli-ha (adding a character in order to make the usernam incorrect) after running the project, the system shows me "Invalid Credentials" error. I appreciate if anyone could suggest me what is the problem that I can't logging in to the system.

But can say like the article said, .Net Core is designed to run in many environments including Linux, Mac OS, and has no idea or really doesn't care what the environment is. With that being said, I really think using Active Directory to store credentials is a bad idea in the first place. You can fix and figure it out now, but the problem will come up again when you deploy it in a production environment.

Issues like this, is really dependent upon you setting up your development environment exactly like your production environment, so when you write code, it works. I develop on a Win10 computer, but I run my program on a Linux server running in a Docker Container. I had to write code to detect a Linux environment and make adjustments to it such as file names. Plus had to write code to detect that I'm running in a Docker Container as well.

The AppSettings file is a place to store parameters. So your logging level is just a parameter. Then you have to write code to detect the error, pickup the logging parameters, and then write code to log the error in the Windows Server logging system. But for this to work, you have to be running in Windows Server. I suggest focusing on the authentication first, and find another way to capture the error so you can examine it.

I have been trying to develop a .Net Core version of an app, but as soon as it hits the non-core dll, it throws an error loading one of it's dependencies.

Quote:

System.BadImageFormatException: 'Could not load file or assembly 'System.Web.Services, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'. Reference assemblies should not be loaded for execution. They can only be loaded in the Reflection-only loader context. (0x80131058)'

I have no control of the webservice source, so I can't develop a core library.

With all the push for Core, I find it hard to believe nobody has found a fix for this. There are a ton of third party libraries out there.

System.Web.Services predate even WCF, and WCF is now being deprecated in favor of .NET Core, gRPC and ASP.NET Core. Microsoft is no longer interested in maintaining legacy technology like Web Services, Web Forms, Web Pages, etc.

If you use one of them, at least maintain an instance of legacy code as a bridge between .NET Core and other frameworks.