|
I finally figured it out.
Diving into ReactJS.net is confusing, until you get a complete understanding of how it works on the server side.
So the ReactJS.Net package seems to be something that was working a couple of years ago, but has been upgraded with new packages or DLL's that are more refined. So it's one thing to do the tutorial to get the client side working, and a whole different story to get the server side working.
What it boiled down to, as far as it not working on my server was the Chakra Engine or simply server side rendering. I'm running server core with no browser, and the Javascript rendering engine needs Internet Explorer or Edge to render server side (That's why it worked on my desktop). If you don't have it loaded, then you have to build your project with an JavacriptEngineBuilder which comes in many flavors, and create a JavascriptEngineSwitcher configuration.
Last but not least, is the Remarkable. This is what ran me through the hoops for hours. Loading ReactJS files n ReactSiteConfiguration is not required, you just need remarkable and your jsx scripts.
This deems an article to be written on the subject.
If it ain't broke don't fix it
Discover my world at jkirkerx.com
|
|
|
|
|
Hi,
Am working on Converstion of html to pdf using Html2pdf.bundle.js but am getting Blurry Pdf Output.Can anyone suggest me to overcome this error.
Thanks in advance.
|
|
|
|
|
I had the same issue when working with that library. I ultimately opted to render my pdfs on the server side; I didn't find a good resolution.
"There are three kinds of lies: lies, damned lies and statistics."
- Benjamin Disraeli
|
|
|
|
|
Hi,
Iam working on asp.net application that converts Html to pdf using JsPdf.debug.js and Html2Pdf.js. When the page is loaded in iframe loosing the style for table border.
Please Check the below link for screenshot.
https:
<script src='scripts/jspdf.debug.js'></script>
<script src='scripts/html2pdf.js'></script>
<script>
var pdf = new jsPDF('p', 'pt', 'letter');
var canvas = pdf.canvas;
canvas.height = 72 * 11;
canvas.width = 72 * 8.5;;
html2pdf(document.body, pdf, function (pdf) {
var iframe = document.createElement('iframe');
iframe.setAttribute('style', 'position:absolute;right:0; top:0; frameborder=1; bottom:0; height:100%; width:500px');
document.body.appendChild(iframe);
iframe.src = pdf.output('datauristring');
}
);
</script>
Thanks in Advance.
|
|
|
|
|
|
Html2Pdf.js is not showing the table borders in iframe.
Thanks in Advance
|
|
|
|
|
Hi,
In my ASP.NET Webform page, I have a fileuploader and a div. On single selection of image, the selected image is added to the div. All works fine. Now, I would like to add a checkbox or some sort of selection and then save the selected images to the server folder. Please can someone help on how to do it?
Thanks
|
|
|
|
|
I'm not exactly sure if I follow your correctly. Do you want to implement multiple image uploads?
|
|
|
|
|
Wher did you stuck exactly to add checkbox on each uploaded image or to save them when selected. You have to share your code so anyone can help to resolve error. No one will be writting it for you.
modified 20-Sep-20 21:01pm.
|
|
|
|
|
I need to control the execution sequence of a suite of specflow tests.
I know this is not advised because each test should be completely independent.
But each test involves a common ETL step that takes from 5 to 30 minutes depending on data volumes.
So I need to split each test in two, run all the pre ETL steps then do the ETL once and finally complete the tests.
How do I implement that?
Ger
|
|
|
|
|
I am working on a MVC application and I am starting to work on a STIG finding. This finding is "Insuring that an application does not maintain a valid state on initialization, shutdown failure.". Basically, what this requires is that if the MVC application failures on startup or shutdown it must not allow for a hacker to read valid application data or information during the failure. I have spent hours looking at how this is prevented in an ASP MVC application and can't find anything. Does anyone know how this is handled in MVC?
|
|
|
|
|
After talking to a couple of people the idea of Application_Error and Authentication logic was discussed but would this really prevent the STIG from being displayed. A great link for Application_Error is below but is this the real solution? Has anyone had experience with this?
https://msdn.microsoft.com/en-us/library/bb397417.aspx
modified 5-Jun-18 7:34am.
|
|
|
|
|
Assuming Rule SRG-APP-000225 from the Application Security and Development Security Technical Implementation Guide (which is really an SRG, silly cybersec people), the current version dated 27APR2018 has a lot of example detail in it. https://iasecontent.disa.mil/stigs/zip/U_ASD_V4R6_STIG.zip
The general idea is that it should not be left "half-open" on failure, so something like a no-op sled cannot push an instruction into the application and bypass authentication. If you are running a basic CRUD app, then IIS will handle this stuff for you, providing you dispose of database connections which you're supposed to do anyway if you're using EF in the Repository/Unit of Work pattern.
By and large, in an MVC.NET application all you can really do is make sure that any operational statics are cleared (or reset as part of an application restart/correction process) and that un-managed resources are properly disposed as part of the failure. You can wrap all of this into a failure handler that can attempt to self-correct and, failing that, fail closed.
This all said, if an auditor declared it a finding then they should have given you some sort of finding detail.
If you need detailed support or code review, I'm in the GAL.
"There are three kinds of lies: lies, damned lies and statistics."
- Benjamin Disraeli
|
|
|
|
|
Hello,
Anyone knows how to create a text file in client machine using asp.net code behind ??
Please suggest me any solution...
Thanks in advance...
|
|
|
|
|
Your code-behind runs on the server. It has no access to the client's file system.
The only way you can "create" a file on the client's computer is to write it to the response with the appropriate headers. The user will then be able to save the file wherever they want. They will also be able to choose not to save the file.
And to pre-empt your next question: no, you can't force them to save the file, and you can't influence where the file is saved. You can provide a default file name, but it's only a suggestion, and the user is free to change it.
Response.ContentType = "text/plain";
Response.AppendHeader("Content-Disposition", "attachment;filename=TheSuggestedFileName.txt");
string sourcePath = Server.MapPath("~/path/to/the/file.txt");
Response.TransmitFile(sourcePath);
Response.End();
"These people looked deep within my soul and assigned me a number based on the order in which I joined."
- Homer
|
|
|
|
|
I working on an ASP .NET project and am have serious problems with TFS source control mapping. First what was happening is that because nuget or no other dll third party folder was setup when the project was downloaded to a new work space all the dll's were missing. We'll to solve this problem I did created a shared source control folder and moved all of the needed third party dll's to this source control folder and had each project reference them from there. Now, this is the problem I'm left with. It seems that there are certain files and folders of various type (i.e. print.txt, showChart.pdf) that are in project folders which are missing after the project has been fixed on one machine's workspace, checked-in, and get latest to another machine's workspace. They disappear after the source code is downloaded to a new mapping on a different machine. It seems that these folders and files will only stay in the workspace's mapping that they were fixed in. Does anyone have any suggestions?
modified 28-May-18 9:20am.
|
|
|
|
|
I spent an hour today looking at the Miniblog project and was quite impressed. I had no idea that you can do some of the things he did with MVC. What he did with robots.txt and the sitemap seems pretty cool and the rewrite section in web.config was an eye opener for me.
So this Segways into a couple of questions for me.
I see how he created views with almost a single file, but how did he do this without a controller?
I ask this because I think MVC really needs a CMS package so it can be more like Wordpress, in which website owners can create new pages. I can write a view, but I can't figure out how to handle the controller part.
I can't compete with Wordpress, and these Wordpress guys that are very low skilled, who just copy and paste code and html are really grabbing a large chuck of market share.
If my little Project Indigo Personal edition had CMS features It would be a game changer for me.
If it ain't broke don't fix it
|
|
|
|
|
Good day friends! Please I need help in this issue.
I have a database made up of
<br />
Name Section Day of Duty<br />
John U. Fishery Monday<br />
Andrew S. HR Tuesday<br />
Chow C. Mgr Monday<br />
Bian H. Coord. Tuesday<br /><br />
Hui Zhao APC Wednesday<br />
My request is that; if I retrieved the records from database, they should be grouped by Day of Duty and display in this format:
<br />
Name Section Day of Duty<br />
John U. HR Monday<br />
Chow C. Mgr Monday<br />
Andrew S. HR Tuesday<br />
Bian H. Coord. Tuesday<br /><br />
Hui Zhao APC Wednesday<br />
I tried using Group By SQL statement but to didn't work and I don't know the right keywords to use while searching on google though I have tried.
Please can this be achieved?
Help please!
Am using ASP.Net (VB.Net)
|
|
|
|
|
|
This is also possible with the linq by using the same order by query.
|
|
|
|
|
You should tell OP, not me.
|
|
|
|
|
This is a product of poor design and improper use of TFS but I have started on a new project with big problems. A little background first. This is an ASP .NET MVC 3 EntityFramework multiple project application. Now, when development first began several years ago the application had a production branch of TFS source control and no other branches. Two programmers started and worked on creating this application. Now, as each did work they would download directly from the production branch and check-in directly into the production branch. This went on until two weeks before I started work on the application.
Three weeks ago a three separate named user branch tree, named for each developer, was created off of the production branch for each new developer to work on so now checkout/check-in is no longer directly off of the production branch. What we have is a main production branch as the root and three sub branches right off of the production branch. What a mess!
Now to the problem we are currently having. When they downloaded source control application code from the production branch to each person's named branch all of the asp project and third party dll's are gone along with the bin and bin/debug directories. Each of the new branches won't build their projects and the main Web project won't build. What I have done is pulled all of the asp project and third party dll's into my branch from production created a working branch. Than I checked my branch back into MY named branch of source control. Now, after doing this another developer has downloaded the new updated, MY named branch, branch to their machine and again the bin and bin\debug directories and all of the dll's are missing. Based on my confusing description of the problem can someone provide guidance on how we can fix this problem?
modified 24-May-18 20:55pm.
|
|
|
|
|
Not sure I fully understand the issue and it depends what these third party dlls are, but you usually solve this problem with nuget packages. So if your project needs, for example, Entity Framework, you add that to your project as a nuget package. What that does is create a folder under a "packages" folder and that folder contains xml that describes the package. When you check the code in you also check in the packages folder. When the next developer gets the project they will have the packages but not the dlls, however when they compile VS will realise this and use the data in the nuget package to download the dlls itself. So rather than manage third party dlls you manage nuget packages and VS sorts it out for you.
|
|
|
|
|
One problem with nuget is the application is on an intranet. What I have done is to create a root level folder and checked it in. With the new folder I have added all of the needed third party dll's and referenced them in each of the application project's references. Is this the correct way to do it or is nuget still possible?
|
|
|
|
|
You can host your own nuget server and even make your own nuget packages, so yes it's possible. It'll take some learning and trial and error, but I know it's possible.
|
|
|
|