Crystal Reports Viewer in ASP.NET3.5 App - crystal-reports

I created a ASP.NET3.5 website having a crystalreportviewer in it, it works fine if I run through visual studio 2008 or on my own machine. But when i deployed project on web server, it started giving me error.
Firstly it was giving error on first page that CrystalDecision.web assembly can't be found, then I installed Crytal Runtime 2008 on my web server. After installation application seems like ok, but when I opened page with CrystalReportViewer it gave me different error, as following:
The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)
Any idea about it??

You probably have slightly different versions of the crystal assemblies on the server and your development machine. Compare the version numbers in c:\windows\assembly on both and see if there is a difference. If there is, either update the server or change the version numbers for the assemblies in web.config.
Also, The located assembly's manifest definition does not match the assembly reference

After spending almost 2hrs I finally found the fix.
Uninstall the Crystal Reports run time from web server.
Check if web server still have \program files\Business object folder, if still exist then delete it. Ensure other applications are not dependent on it.
Give Read and Write access permissions to ASPNET user on \windows\Temp folder
Install Crystal Report run time now.
Restart IIS
Following these steps should fix the crystal report viewer problem.
But then one more problem arises, crystal report viewer doesnt show the icons, the reason is crystal report viewer looks for aspnet_client\system_web\2_0_50727 folder in root folder of the website. In my case I have multiple websites on my server including .NET 1.1, 2.0 and ASP, so I have wwwrootASP2.0 folder for this website. But by default web server created aspnet_client\system_web\2_0_50727 folder under default website (wwwroot). So, the fix is, just copy that aspnet_client\system_web\2_0_50727 folder into your website's root directory. Bingo !!!!!! It works fine now.
I hope it will help,
Cheers.

I just wanted to add that an easier way seems to be creating a virtual directory under you web application called aspnet_client that points to C:\Inetpub\wwwroot\aspnet_client.
This also makes the images on the crystal report viewer show up. It was tested with visual studio 2008 crystal basic on IIS running on server 2003.
I figured this out after reading http://social.msdn.microsoft.com/Forums/en-US/vscrystalreports/thread/e2dc93b3-e594-4ae6-ba92-9440ccc7f6be.

Related

Crystalreport for Visual Studio 2019 and Web Server requirements

can somebody let me know what version of Crystal Report is compatible with Visual Studio 2019 and web server MS-2012 R2? can you please list all requirements?
currently the only way the report works is click on "Report Preview" in opened RPT file in VS-2019.
If I run the project on developer machine it shows blank page.
if I publish the project to web server it show "Connection failed"
if I change the database connection in RPT file to remote SQL sever and publish project to web server it works fine.
any help would be appreciated
The issues resolved when I copy ASPnet_Client folder to the root of my published project and then add the following tag to all my ASPX pages that using RTP file.

Crystal reports with Visual Studio 2012

I'm using crystal reports for creating my reports. I'm using Visual Studio 2012. I use VS2010 to create the reports then I add them to the solution in VS2012. The problem is that I'm getting an exception bobj undefined when I run the report under VS2012. Is is related to the fact that the project is running under VS2012 or is it caused by another thing? Thanks :)
SAP Crystal Reports Developer version for Microsoft Visual Studio is finally avalable, so you can create them in vs 2012.
Download http://scn.sap.com/docs/DOC-35074
By following below URL you may find the perfect answer for your question.
This is not my experience, and I had found this answer while I search for Crystal report integration basics with VS 2012.
http://www.codeproject.com/Tips/695587/Beginners-tutorial-on-how-to-load-Crystal-Reports
Good Luck & Have a nice day
No, it's not VS2012 problem.
Crystal reports runtime is installed but it's files are not reached by browser.
You installed your application in a website different from Default Website.. did you?
Look at the Solution at the end of this post.
Analyze the problem
It's possible to analyze the problem, and find a 403 (Forbidden) error
using client tools (debug window of browser)
GET http://someServer:20080/aspnet_client/system_web/4_0_30319/crystalreportviewers13/js/crviewer/crv.js 403 (Forbidden)
GET http://someServer:20080/aspnet_client/system_web/4_0_30319/crystalreportviewers13/js/crviewer/images/style.css 403 (Forbidden)
or server tool (IIS log , on WIN2003 is placed in %SYSTEMROOT%\System32\LogFiles\W3SVC###\).
2011-03-28 13:00:49 W3SVC701536 95.228.38.41 GET /aspnet_client/system_web/4_0_30319/crystalreportviewers13/js/crviewer/images/style.css - 20080 - 192.168.1.2 Mozilla/5.0+(compatible;+MSIE+9.0;+Windows+NT+6.1;+Trident/5.0) 403 6 64 Errore!
2011-03-28 13:00:49 W3SVC701536 95.228.38.41 GET /aspnet_client/system_web/4_0_30319/crystalreportviewers13/js/crviewer/crv.js - 20080 - 192.168.1.2 Mozilla/5.0+(compatible;+MSIE+9.0;+Windows+NT+6.1;+Trident/5.0) 403 6 64 Errore!
Cause the problem
In both cases i found that crv.js and style.css some files were not served;
these files are placed by CR installer in wwwroot\aspnet_client folder, but for some reasons they cannot be reached;
In my case the reason is that i create a different website (port 20080) and aspnet_client folder is not placed inside that website
I can see that you use different versions of software and different configurations, but i think you have the same problem.
Solution
The solution is to work on IIS this way:
Copy aspnet_client folder from c:\inetpub\wwwroot folder to the new website root folder.
or (this one is better)
Create a virtual directory called aspnet_client that points to c:\inetpub\wwwroot inside the new website

How to deploy ASP.NET MVC4 application with SQL Server CE to Azure website

I deployed a ASP.NET MVC4 app with SQL Server CE database, but I'm getting
Sorry, an error occurred while processing your request
I am using VS2012 to publish this app to azure website. How can I solve this issue? Thanks.
To summarize and so an answer can get marked on this to help the next person that comes by.
When running into issues on azure-web-sites FTP is a handy debugging tool which enables you to:
Verify that the dll exists in your bin directory
Sometimes the .gitignore file blocks directories from being checked in
Verify that your web.config file has the proper version of the assembly configured
NuGet can help, but it's ultimately up to you to verify your dependencies
Here is a good article to follow on the subject: http://www.dotnetcurry.com/showarticle.aspx?ID=883
Unfortunately with VS 2013 Compact edition is not supported any more, so things are somewhat tricky.

deploy mvc2 application in IIS7 in Windows Server 2008 R2

I am trying to deploy my MVC2 application on the IIS7 of my Windows Server 2008 R2 to allow non-developpers to test it.
I deployed through webdeploy, it didn't work.
I just copied the files after a build, didn't work.
I copied the published file, didn't worked...
When I click on the web site link in my IIS, nothing append.
I don't know what I am doing wrong..
Somebody could help me?
Thanks in advance
If you can give some more details on what happens when you try to browse to the site on the server (do you get a yellow screen exception, 404 error, etc) it will help to identify the cause. Without knowing more details, here are some suggestions:
If you don't have MVC 2 installed on your server (which is not a requirement), make sure you are doing the following:
In your Visual Studio project, under References, make sure you set the "Copy Local" property to "True" for System.Web.Mvc. This will deploy the dll to your site bin dir when you do a web deploy.
Make sure the .NET Framework version 4 is installed on the server. See here for more details.
In IIS, make sure the Application Pool that the site is using is set to use v4.0 of the .NET Framework.

ClickOnce deployment with Crystal Reports prerequisite

I have a .NET Winforms app (created in VS2005) that I deploy using ClickOnce. On one of the forms I have a Crystal Reports viewer control for the user to view the reports, but in order to use that in the app I have to include the the Crystal Reports XI Release 2 prereq which they install prior to installing the app. This basically installs a watered down version of Crystal onto the users machine.
It works publishing this way, but it is sort of a hassle for the user to have to wait on Crystal to install and is a huge hassle for me because publishing the app with the prereq takes a long time to finish because it has to upload the large prereq up to the server.
Since the publish takes so long and new installs are not super common I generally don't include the prereq when I publish changes and instead only publish it with the prereq if a new install is needed.
If you've used ClickOnce to publish an app with Crystal Reports, is this how you've published it or is there an easier/better way.
Is there a way to include/GAC the CR dll's needed instead of including and installing the Crystal Report prereq or is there a way that I can configure the OneClick deployment to not have to copy the file up every time. If I could configure the ClickOnce deployment so that I don't have to include the prereq and instead just point the install to a standard location that would help.
Hope this was somewhat clear and that someone can help out. Thanks
When you deploy a ClickOnce app with prerequisites you can specify where the prerequisites are downloaded from, local or the vendor (such as Microsoft). If you specify the vendor it will not include the prerequisite binaries in your deployment package.
If Crystal has not specified a remote location then you can always do your own prerequisite using the Bootstrapper Manifest Generator. You would then upload the Crystal binaries to a location on your deployment server, create your custom prerequisite using your new binary repository as the vendor site, add the custom prerequisite in your clickonce application and set it to download from the vendors site.
I believe that in VS 2010 you have a third option for ClickOnce prerequisites where you can target a specific site removing the need for your custom prerequisite.
From the responses, it seems that this is pretty common so I'll just post what I do to get around the issue for now.
First I'll start that I think Bronumski's response should work, but I've not had success with it in the past when I tried it.
The way that I get around this issue is just to publish the files using ClickOnce to a folder locally and then ftp the files over manually excluding the crystalreport install directory that is created.
I know this is not a good answer for this, but I don't have to deploy very often anymore and so this is my work around to the issue for now. Please read through all of the other answers to find one that might help resolve your issue.
Hope it helps. Thanks
The Crystal 11.5 Merge Modules for .Net are buggered, and that introduces issues when deploying through ClickOnce.
We eventually ditched ClickOnce and went for a self-extractor setup (Nullsoft Install System), and installed the Crystal Redist once-off on the client PC's.
Crystal is a nightmare, you can never 'get it right', but you can mitigate the headaches.
Conceptually, you're doing it the same I did awhile ago. The one thing I did differently was to deploy it from the build server instead of my machine. Quite frankly, I didn't care how long it took to deploy just so long as it didn't interrupt my machine.
I was using CruiseControl.Net for the builds so when it came time to deploy the release build I would just disable the CC build for it, start the publishing process, and check it after awhile.
When I had this problem, I created a seperate installer for Crystal Reports That made sense for me because I had many programs that used it.
That shortened the click once deployments but systems without the prequisite would crash with an exception, so when I migrated everything to Visual Studio 2008 and the newer Crystal Reports I started including them instead.
It takes longer each time they install and update, but in my case it isn't worth the trouble of managing the prequisite versus the ease of deploying.
Sorry to have to admit that I had a similar problem and ended up coming up with similarly arbitrary solution.
I ended up sitting between two stools, if the user didn't want Crystal on their machine, I offered an option to access a webservice hosted on a server with Crystal, so the job could be done remotely. If they had Crystal, the the job was done locally.
It wasn't perfect, but it least it was reasonably reactive.