0

I have an asp mvc 4.5 web application. I'm using vs community 2017 version 15.8.6. I need to add an aspx webform page in order to use Microsoft.Reporting.WebForms.ReportViewer control as a way to intagrate SSRS reports in the web application. I've followed some tutorials to achieve this integration, installed from nuget these references:

enter image description here:

Created an aspx page with Master page and added the ReportViewer control. All looked fine, but when I attemped to build, I got this strange error:

enter image description here

The error is in the aspx.cs file. When I comment out the call to the control everything is fine, but I can't set the creds of the report. Here's the code:

t1.ServerReport.ReportServerCredentials = new ReportServerCredentials("userName", "password", "domain");
t1.ProcessingMode = ProcessingMode.Remote;

It is very clear that the ReportViewer control exists, when during run time the Watch 1 window display it:

enter image description here

Did anyone had something like this before? Ive treid restarting my local iis as described here, I've closed and open VS, restart the computer, nothing helps.

Thanks you

EDIT

I've simply create a new form. for some reason it is always refreshing, but at list it builds!

Thank you all.

Ehud Grand
  • 3,501
  • 4
  • 33
  • 52
  • Possible duplicate of https://stackoverflow.com/questions/5204445/asp-net-control-does-not-exist-in-current-context –  Dec 31 '18 at 16:27
  • Thanks, I tried all the answers there, nothing helped. – Ehud Grand Dec 31 '18 at 16:31
  • Maybe your designer file for the page got corrupted, can you change the ID in the HTML aspx page, save, and build again? – Seano666 Dec 31 '18 at 16:43
  • You really should avoid Design View when working with Web Forms. It does some crazy stuff sometimes. You're far better off in source view so you have direct control of what's going on with the markup. – mason Dec 31 '18 at 16:50

0 Answers0