I have created a REST Report Service in my .Net 8 MVC Project in Visual Studio. I can set Multiple Startup Projects and launch the debugger in Visual Studio, and everything works fine.
I will eventually need to have this REST service running on my IIS Server in production, but for now, I am attempting to get it working on IIS on my Windows 11 machine.
I created a new REST Service using the Telerik template:
After creating the project, I launched the debugger, and the project launched a browser to http://localhost:59655/index.html with the message Telerik Reporting REST Service is up and running.
Still in Visual Studio, I have published the REST Service to a folder using the following settings:
In IIS, I create a new Site and App Pool with No Managed Code like my other .Net Core apps. I set the bindings to Port 59655 as it does in Visual Studio (not sure if this is necessary, or the wrong thing to do) but when I try to browse to http://localhost:59655/index.html, it gives the error: No webpage was found for the web address: https://localhost:59655.
If I bind to HTTP instead of HTTPS, then I get the error: This site can’t provide a secure connection.
So my question is, should I be using this port on IIS? What other settings must I change when publishing the app to a folder? There are settings in the launchSettings.json file that apply to IIS Express, so I don't think those apply.
I really have to figure this out before I attempt to deploy this to production, but I'm not really sure how to run the service with IIS.
Thanks for any help in advance.
UPDATE 2: Now I get this eror with the REST Service running on my local IIS, and my app running in Visual Studio:
Unable to get report parameters. <report name> Report cannot be resolved.
If I have the Service running in Visual Studio, it works. The Reports folder is in the REST App. When I deploy this, do the reports compile to a DLL?
Hi Kevin, thank you for sharing those details, it helps us investigate more thoroughly.
I think the problem you're having is indeed what you allude to... the TRDP files do not get compiled into an assembly. They are like any other content file, and if it is part of the source code project, you need to make sure that Visual Studio is going to deploy those "non-code" files.
The easiest way to do this is to click on the file in the solution Explorer, then view the Properties panel. The Build Action should be none, and the Copy to Output should be "Always" (or 'if newer' if you don't like always copying).
You can confirm is they are being included with the REST API project by using Windows File Explorer and navigating to the build's output folder... then look into the your "Reports" folder. You should see the trdp files in there.
Remember that the ReportViewer is going to ask the REST service to look for a report, only by its name... but it is the responsibility or the REST service to know what folder to look in for those trdp files. You have already set this up when you configured the storage for the REST service:
One more follow up for clarification... if you are using the old school TypeReport (where they are C# classes, and not trdp files), then yes they get compiled to an assembly.
For this kind of C# Report, you need to use the TypeReportSource and not UriReportSource when setting up the REST service, because it is going to look at an assembly for a compiled type... rather than the newer XML based report (a trdp file)
Please visit the following documentation to understand the difference between those two out-of-the-box resolvers Reporting REST Service ReportSource Resolver at a Glance - Telerik Reporting