This is a migrated thread and some comments may be shown as answers.

Report giving 404 error when i run in localhost

0 Answers 223 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
victor
Top achievements
Rank 1
victor asked on 24 Jan 2019, 09:17 AM

Hello there ,

 I have a problem to loading the report from localhost , below is the my project environment 

1. Angular 5 , typescript 2.5.3 , ASP.Net Core2.0 , VS 2017 and Telerik Selhost Report service project .

   Issue : I have publish the project one my folder then i create a web site from my IIS  then reference to my published folder .  Then i have tested  from browser like " http://localhost:12345/api/reports "  then formats are loading 

        [{"name":"PDF","localizedName":"Acrobat (PDF) file"},{"name":"CSV","localizedName":"CSV (comma delimited)"},{"name":"XLS","localizedName":"Excel 97-2003"},{"name":"XLSX","localizedName":"Excel Worksheet"},{"name":"PPTX","localizedName":"PowerPoint Presentation"},{"name":"RTF","localizedName":"Rich Text Format"},{"name":"IMAGE","localizedName":"TIFF file"},{"name":"MHTML","localizedName":"Web Archive"},{"name":"DOCX","localizedName":"Word Document"},{"name":"XPS","localizedName":"XPS Document"}]

Then i try to call this report from Angular project using type script like below .

   @Component({
    selector: 'printReport',
    template: `<tr-viewer #viewer1 
    [containerStyle]="viewerContainerStyle"
    [serviceUrl]="'http://localhost:12345/api/reports'"
    [templateUrl]="'node_modules/@progress/telerik-angular-report-viewer/dist/dependencies/telerikReportViewerTemplate-sass.html'"
    [reportSource]="Viewdata"
    [scaleMode]="'SPECIFIC'"
    [scale] = "1.0"
    [renderingEnd]="boundReportRendered"
    [error]="ReportError"
    [viewMode]="'PRINT_PREVIEW'">
    </tr-viewer>
    <button id='btnprint' style="display:none;" name='btnprint' (click)="viewer1.commands.print.exec()">Print</button>`,
   
})

So, report is not loading then i check this in Fiddler it gives error like :

stackTrace=   at Telerik.Reporting.Services.Engine.ReportEngine.ResolveReportSource(String report)
   at Telerik.Reporting.Services.Engine.ReportEngine.GetParameters(String clientID, String report, Dictionary`2 parameterValues)
   at Telerik.Reporting.Services.WebApi.ReportsControllerBase.GetParameters(String clientID, ClientReportSource reportSource)
   at lambda_method(Closure , Object , Object[] )
   at System.Web.Http.Controllers.ReflectedHttpActionDescriptor.ActionExecutor.<>c__DisplayClass10.<GetExecutor>b__9(Object instance, Object[] methodParameters)
   at System.Web.Http.Controllers.ReflectedHttpActionDescriptor.ActionExecutor.Execute(Object instance, Object[] arguments)
   at System.Web.Http.Controllers.ReflectedHttpActionDescriptor.ExecuteAsync(HttpControllerContext controllerContext, IDictionary`2 arguments, CancellationToken cancellationToken)
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Web.Http.Controllers.ApiControllerActionInvoker.<InvokeActionAsyncCore>d__0.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Web.Http.Controllers.ActionFilterResult.<ExecuteAsync>d__2.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Web.Http.Controllers.ExceptionFilterResult.<ExecuteAsync>d__0.MoveNext()

 

I am unable to duplicate this , can please help out to solve this issue .

 

 

 

Thanks

Victor.A

 

        

   

 

 

 

 

No answers yet. Maybe you can help?

Tags
General Discussions
Asked by
victor
Top achievements
Rank 1
Share this question
or