October 13, 2011 at 3:10 pm
Hey Everyone!
I am trying to use the reportviewer control in Visual Studio 2010 with ASP.NET to view a SQL Server 2005 Report. The reportviewer control in VS 2010 isn't backward compatible as it requires SQL Server 2008 or later, so I changed all the assemblies on the web.config & .aspx page to reflect version 8 instead of version 10. Now when I debug, on my localhost I get an error message as Access Is Denied for the report as displayed below [/URL]
But when I deploy the files onto the hosting server the reportviewer header menus show up with blank data & blank filter options. When I try changing the version to version 9, the report works flawlessly on my localhost. But my application errors out completely when I deploy the files onto the server.
Does anyone have any idea on what may be going on?
October 14, 2011 at 5:51 am
I found in my used of VS2010 and the reporting services report viewer that I had to manually add a reference to three dlls. I mark them as copy local so they get deployed with the web site. The dlls are:
Microsoft.ReportViewer.Common
Microsoft.ReportViewer.DataVisualization
Microsoft.ReportViewer.ProcessingObjectModel
If you do some googling on them you will find some posts about it.
October 14, 2011 at 8:11 am
bkubicek (10/14/2011)
I found in my used of VS2010 and the reporting services report viewer that I had to manually add a reference to three dlls. I mark them as copy local so they get deployed with the web site. The dlls are:Microsoft.ReportViewer.Common
Microsoft.ReportViewer.DataVisualization
Microsoft.ReportViewer.ProcessingObjectModel
If you do some googling on them you will find some posts about it.
Hey bkubicek,
Thanks for your response, when I try to add References through the .NET tab, I only see an option to add Microsoft.ReportViewer.Common & Microsoft.ReportViewer.WebForms but not the DataVisualization & ProcessingObjectModel. For the Common dll I set the Copy Local property to True and I manually added the ProcessingObjectModel dll to the bin folder of the application but I am still receiving the same Access is Denied error mentioned above. Any clue where I can find the DataVisualization dll or what I might be doing wrong?
October 14, 2011 at 8:15 am
If you google datavisualization dll you will see that it is in the global assembly cache and you have to copy it from there. Once you copy it from there put it in your bin directory and reference it. That took care of the problem for me.
October 14, 2011 at 8:27 am
But isn't DataVisualization for Charts?
October 14, 2011 at 8:36 am
I am just telling you what worked for me. I am not sure why it is needed, but it is.
October 14, 2011 at 8:48 am
I tried that & that didn't help either. Were you using version 8 or v9/v10. Because version 9 works properly for me on my localhost but when I deploy it to onto the server I get a web.config error.
October 14, 2011 at 9:00 am
Rank1_nj (10/14/2011)
I tried that & that didn't help either. Were you using version 8 or v9/v10. Because version 9 works properly for me on my localhost but when I deploy it to onto the server I get a web.config error.
I am using version 10. You know looking at your error again, it is possible your aspnet user doesn't have access to the aspnet temp directory.
On your web server in the framework folder there is an aspnet temporary directory. So for .net 2.0 framework it would be:
C:\Windows\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files
I give modify rights to IIS_Usrs group and to the users group. This will usually cover your application pool identity which is the context your web site is running under.
October 14, 2011 at 9:18 am
Yeah that doesn't seem to help either 🙂 I am beginning to think this might be something on the SQL side. I just don't understand why it would work with v9. What is more frustrating that the v9 control won't work on the server.
October 14, 2011 at 9:33 am
If you are getting a web.config error with version 9 is there a chance that you are pointing to the wrong version in your web.config file?
October 14, 2011 at 9:42 am
wrong version as in referencing v8 when it is v9 ? if that's what you mean I highly doubt it, because it wouldn't compile on my local machine then in the first place. the web.config error only happens when I deploy the file onto the hosting server.
October 14, 2011 at 9:57 am
Would you post the web.config error?
October 14, 2011 at 1:08 pm
October 14, 2011 at 1:15 pm
So your viewer is version 9, what about the rdl file?
October 14, 2011 at 1:18 pm
my .rdlc is pointing towards version 9. The report was created in SQL Server 2005, I don't have the rdl's in the project itself.
Viewing 15 posts - 1 through 14 (of 14 total)
You must be logged in to reply to this topic. Login to reply