How to publish multiple projects in ASP.NET Core 3.1 - asp.net-core

I have a question. I created a web application using ASP.NET Core 3.1 in Visual Studio 2022. In the solution, I have three projects, the first is my main project, the second is the admin panel and the third is the repository where I created the models and connected to the database, as well as here all migrations are located.
The question is how to publish these projects on a server or hosting. For example, on smarterŠ°sp. Screenshot of the projects is attached here:
Also I need to load the database.
Please provide a detailed instruction if possible.

Related

ASP.NET Core 6 updating files without full publish on server?

In my case, I just made some changes on startup of my ASP.NET Core 6 project and wanted to update the published files on the server (without full publish again), but unfortunately I couldn't find any answer for this.

ASP.NET Core Crystal Reports integration

I developed a web application using ASP.NET webforms technology and it contains lots of reports designed by Crystal Reports.
I want to convert my project to ASP.NET Core technology, but I have a problem that's ASP.NET Core does not support Crystal Reports. I searched Google for any help, but did not find any.
I have almost 300 reports. Can you please suggest how to integrate these Crystal Reports with an ASP.NET Core web application?
Crystal Reports does not support .net core, .net 5 or 6, and does not have any immediate plans to support .net core. They offer a couple solutions:
switch to java
hosts the reports it a 4.8 web application, and reverse proxy to it from you asp.net core application.
option 2 is probably your best.
note: .net core applications, nor .net standard libraries, can not call a 4.8 dll.
see thread:
https://answers.sap.com/questions/13029137/crystal-reports-for-visual-studio-and-net-core-5-a.html
One way around this is to decouple the report generation process from the .NET Core process.
For example, the .NET Core process can insert a record into a Report_Job table. That table can include information about not just the rpt file but also parameters and processing options.
Another process can monitor that table, trigger the reports, and remove/update the job records.
There are 3rd-party Crystal Reports tools that can do that (including the ability to update the database based on success/failure of the report job. So no need to reinvent the wheel.
Searched and as you say there is no hope for asp.net core (ref:-https://stackoverflow.com/questions/62057447/how-to-call-reference-crystal-reports-from-net-core ).
But you can do this by achieving :
Add a .net project which supports Crystal report (framework 4.7.1 or read the article - https://answers.sap.com/questions/318288/crystal-reports-in-asp-net-core-20.html) and add all reports in this project. You can add, modify, preview (or test) etc.
Now give the reference in your main application and call report from your code, so this way you can do this.
I have done the same with Telerik report. Good thing that it supports .net core. but having issues to add directly, so add in another project, give reference and then call from main project. Another good thing with this approach is when we go in live/production, as reports having in the different project, we can modify report(s) in designer and publish the report project dll only (not required to publish all projects).

Can one use Reportviewer Control in ASP.net Core

I want to make use of the Reporting Services ReportViewer control in an ASP.NET Core MVC project.
The solution as proposed in other answers it to add a webform to the project.
However since ASP.NET Core doesn't support webforms I cannot add the control to a webform.
Is there any other workaround that might possibly assist me in using the ReportViewer control in an ASP.NET Core Web application?
Update 2019
I have ReportViewer working on ASP.NET Core on Windows, and most features (not PDF and Images/PowerPoint) also work on ASP.NET Core on Linux.
There's still some bugs to weed out, though.
You can learn more about it in this github issue.
I can't release it publicly, because ReportViewer has a rather constricting license...
It is based on the AspNetCore.Reporting nuget by amh1979.
You might try the wrapper nuget around ReportExecution.asmx, also by amh1979, this has no licensing issues, but it's no real ReportViewer.
Original post:
No, you can't.
Microsoft is only just evaluating creating a .NET Core ReportViewer control.
Which means there isn't any at present (05/2017).
There also isn't any ReportViewer "control" for ASP.NET MVC.
There is only alanjuden's wrapper around MS-ReportServer's ReportExecution.asmx.
But that isn't the same. That will still require Windows Authentication on the report server (along with user-must-be-member-of-specific-ad-group), and a SSRS server running on Windows.
If you anyway have an SSRS-ReportServer on Windows, you're much better of embedding SSRS ReportViewer.aspx in an iframe. You might want to add forms-authentication to your reportserver. Also, if it needs to be cross-platform (=cross-browser = non-IE), you need SSRS >= 2016 (cross-browser not available in SSRS 2005/2008R1/2008R2/2012/2014).
If you're on Windows and don't want (your customer) to have to install a specific version of SSRS (which means you have to license a MS-SQL-Server), you can create a .NET non-core web application on IIS (on the same domain), and share the auth-cookie. Then you embed that ReportViewer from the IIS .NET non-core application via iframe (or link with target=_blank) in your .NET Core Web-Application. That way you don't require an SQL-Server license, and no MS-SQL-Server if you, for example, use MySQL/PostgreSQL/Oracle.
Other than wait, you can bundle Apache Tomcat with BIRT into your application, and use Launch4J to redistribute it with the JRE. Then you'll just have to use the Eclipse-BIRT ReportDesigner to create BIRT reports (non-SSRS-reports).
Or you can embed JasperReports with JasperServer.
This would be far more difficult to bin-deploy than BIRT.
But I guess docker to the rescue.
Jasper and BIRT have the advantage that they also run on Linux/Mac.
However, that means you either need the JRE installed on the server, or bin-deploy the JRE along with your application.
Jasper's advantage over BIRT is that it is faster, and that it supports vertical text (not just in the web, and vertical-text is not rendered as image).
There usually are always issues with the BIRT releases downloaded from their website that prevent running BIRT at first. Be that a missing JAVA_HOME environment variable, a missing .jar-dependency or an invalid signature in a .jar file. For information on what it will be on your machine at your time, consult the TOMCAT logfiles, and then google the problem.
The nice thing about BIRT is, that it's comparatively easy to bin-deploy.
Another option would be jsReports, if you like nodeJS.
However, Bin-Deploy that without installation and complications will be even harder (PhantomJS, Webkit, wkHtmlToPdf - for example with an ARM-processor on Raspberry PI).
If you have a few years to spare, you can also just wait until the SSRS team ports to .NET Core - if that happens at all, that is.
Here is a report viewer works on both ASP.NET MVC and ASP.NET Core.
MVC .NET Core Report Viewer

Trying to load opserver

I downloaded opserver that I saw at SQLPass. I can't seem to do anything with it. I tried opening it with VS 2008, VS 2010 and keep getting incompatible errors. What version of VS should I be using? I am a newbie so am in real unfamiliar territory. What do I do after I download it? Are there step by step instructions anywhere?
Opserver targets ASP.NET 4.5 for concurrency features, which I believe requires 2012 or better.
The official Opserver documentation assumes that you know how to build and publish and ASP.NET MVC 4 application. Typically the challenge in building MVC is getting the right dependencies/config setup on IIS the first time. Very easy to update after that. There are many blog posts and good answers on this site on that general subject.
If you want directions specific to Opserver, currently you are limited to third party blog posts such as the following:
Patrick Hyatt: Setting Up StackExchange's Opserver (very useful for the config files)
Danny Sorensen: Using Opserver Will It Build? (my own experience so far)
If this is not familiar territory, I recommend the following:
Use Visual Studio 2012 or 2013 on a machine with ASP.NET 4.5
Only enable the Opserver security file. Modify it for your IP address, or use "alladmin" to start.
Build it. If it doesn't work, use StackOverflow to solve your issue. You're having trouble with ASP.NET MVC 4, not Opserver at this point.
Now enable one additional config file at a time and build it again until you are done. Note, that you will not need to enable all of the config files unless your setup matches that of StackOverflow. Most of the config files are intended to be optional and left disabled.
You should be good with 2010, but you need to have ASP.NET MVC installed before opening the solution and building.

Two Project Visual Studio Solution MVC and Web

Is it possible to have a visual studio solution arranged such that there is a:
x.sln
x.Web.csproj -pure html/js/css
x.MVC.csproj -routes and standard webapi
Where the MVC site runs and hosts the web project i.e. out of the Views/Static. on the same server. Perhaps as a virtual directory? That way they can be developed and tested separately but deployed and with the option to run them together.