Crystal Report Engine RunTime Error - asp.net

Hello,
I convert the project visual studio & the crystal reports to Version 10
but the server has the old version so i have to add the old references
IT show the report but i'm having a problem on printing and engine issue
Crystal Report Bar Engine :
Server message :
Local message :
Server Error in '/' Application.
--------------------------------------------------------------------------------
HTTP Error 404 - Not Found.
--------------------------------------------------------------------------------
Version Information: ASP.NET Development Server 10.0.0.0
Tried :
-- Re install the Crystal Report 10 .
-- Delete all Crystal Report references and add it again .
-- Clean the Solution , remove the references and add it again .
(~ latest result (current status):
I realized that i have install CRforVS_13_0_2 that have the package CRRuntime_64bit_13_0_2.msi and my computer is 32-bit operating system .. so i install CRRuntime_32bit_13_0_2.msi and it finished the installation unlike CRRuntime_64bit_13_0_2.msi .. but the problem with Business Objects still there as it shown in the "Crystal Report Bar Engine " image . ~)
Note : If i add the new references of crystal report ,it sure work on the local but not on
the server . So i have to work with the old references.
HELP .

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

I think you miss path of report. Please check report path at loading time. Because i have already fetch same issue. So change path in publish version on server.
May be this help to you....

OK ,
( ~ If the server has the older version, then you have to make your framework &
Crystal Reports References compatible with the server sittings . ~ )
So in my case i changed all of my projects framework to framework 3.5 and all my
Crystal Reports References to version 10.5.3700.0 . And still using the 2010 Visual Studio .
IT is working fine now . Thanks for helping guys .

To avoid copying aspnet_client folder simply add in webconfig:
<businessObjects>
<crystalReports>
<crystalReportViewer>
<add key="resourceURI" value="~/localhost/aspnet_client/system_web/4_0_30319/crystalreportviewers13"/>
</crystalReportViewer>
</crystalReports>
</businessObjects>
Note: aspnet_client folder must be configured as an application in IIS

This worked after adding the section shown in the image, in the webconfig
<configSections>
<sectionGroup name="businessObjects">
<sectionGroup name="crystalReports">
<section name="rptBuildProvider" type="CrystalDecisions.Shared.RptBuildProviderHandler, CrystalDecisions.Shared, Version=13.0.2000.0, Culture=neutral,
PublicKeyToken=692fbea5521e1304, Custom=null"/>
<section name="crystalReportViewer" type="System.Configuration.NameValueSectionHandler"/>
</sectionGroup>
</sectionGroup>
</configSections>
<businessObjects>
<crystalReports>
<rptBuildProvider>
<add embedRptInResource="true"/>
</rptBuildProvider>
<crystalReportViewer>
<add key="ResourceUri" value="/crystalreportviewers13"/>
</crystalReportViewer>
</crystalReports>
</businessObjects>

Related

Conflicting versions of ASP.NET Web Pages detected

I'm receiving the following error when I run my ASP.NET web project:
Conflicting versions of ASP.NET Web Pages detected: specified version is "2.0.0.0", but the version in bin is "3.0.0.0". To continue, remove files from the application's bin directory or remove the version specification in web.config.
The answer on this question solves this problem - in my Web.config, switching
<add key="webpages:Version" value="2.0.0.0"/>
to
<add key="webpages:Version" value="3.0.0.0"/>
allows me to successfully run my site.
Unfortunately, a coworker who recently pulled down a clean copy of the repository is receiving the exact opposite error:
Conflicting versions of ASP.NET Web Pages detected: specified version is "3.0.0.0", but the version in bin is "2.0.0.0".
He can solve the problem by changing the webpages:Version value back to "2.0.0.0".
What is the root cause of this error, and how can my coworker and I use the same version in our Web.config?

Wix setup failing with error 1603

I have written a .NET 4 desktop application and when trying to run the Setup.exe I am getting the following error in the log file.
I am using Visual Studio 2012 with Wix 3.7.
MSI (s) (E8:1C) [16:51:54:890]: Invoking remote custom action. DLL: C:\windows\Installer\MSIFECD.tmp, Entrypoint: EncryptConfig
SFXCA: Extracting custom action to temporary directory: C:\windows\Installer\MSIFECD.tmp-\
SFXCA: Binding to CLR version v4.0.30319
Calling custom action SecureConfig!SecureConfig.CustomActions.EncryptConfig
EncryptConfig: Begin
An error occurred creating the configuration section handler for security: Could not load file or assembly 'Order.Configuration.Net' or one of its dependencies. The system cannot find the file specified. (C:\Program Files (x86)\Orbit Order System\Orbit Order System.exe.config line 6)
CustomAction EncryptConfigurationFile returned actual error code 1603 (note this may not be 100% accurate if translation happened inside sandbox)
Action ended 16:51:55: InstallFinalize. Return value 3.
I can confirm that `Order.Configuration.Net.dll' exists in the target folder as does the application config file.
This is the app.config file:
<?xml version="1.0"?>
<configuration>
<configSections>
<section name="backup"
type="OrderConfiguration.BackupConfig, Order.Configuration.Net"/>
<section name="general"
type="OrderConfiguration.GeneralConfig, Order.Configuration.Net"/>
<section name="security"
type="OrderConfiguration.SecurityConfig, Order.Configuration.Net"/>
<-- ** THIS IS LINE 6 **
</configSections>
<startup>
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.5"/>
</startup>
<backup configSource="config\backup.config"/>
<general configSource="config\general.config"/>
<security configSource="config\security.config"/>
<connectionStrings>
<clear/>
<add name="OrderDb"
connectionString="Data Source=(local);Initial Catalog=OrbitOrder;
User Id=User;Password=Pass;MultipleActiveResultSets=true;"/>
</connectionStrings>
</configuration>
I also confirm that config\security.config exists in the target folder.
I have spent three hours trying to figure out what the error means as all files actually exist in the target folder. I actually copied the WIX set up from a prior solution that I worked on a year ago and that one works fine without any issues.
The custom action that is failing is trying to encrypt the security configuration section.
I am at a loss to explain why MSI is throwing a 1603 error when there doesn't appear to be anything amiss.
I managed to resolve this after adding the following code to the Wix custom action:
AppDomain.CurrentDomain.AssemblyResolve += ( sender, args ) =>
{
return Assembly.LoadFrom( string.Format( #"{0}Order.Configuration.Net.dll", installFolder ) );
};
This basically says to load the assembly when it encounters a reference that needs resolving.
As per the log, the error is returned by the custom action written by you, so please debug the custom action dll during installation. Easiest method of debugging custom action is to add a message box in the code (begin of custom action) and attach to process in visual studio when the message box is displayed. other way is to use MsiBreak environment variable as described in http://msdn.microsoft.com/en-us/library/aa368264%28v=vs.85%29.aspx

need further explanation of "no symbols have been loaded" error

I have seen the posts on this site about the following error:
The breakpoint will not currently be hit. No symbols have been loaded for this document.
But, the problem descriptions and solutions haven't addressed the situation I am experiencing so, I hope to get some clarification.
I am using Visual Studio 2010, and working on a very large, somewhat old ASP.NET web application that targets .NET v2. The first page of the application is Login.aspx. If I put a break point on the first line of code within the Page_Load event of the Login.aspx page. I get the yellowed-out warning icon on the break point, with the message above. If, while in debug mode, I go to Debug >> Windows >> Modules, I see that App_Web_login.aspx.cdcab7d2.DLL has a Symbol Status that reads "No symbols loaded". The Path for the symbols is like this:
C:\Windows\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files...\App_Web_login.aspx.cdcab7d2.DLL. I have checked that path, and a DLL file does exist there. So, if I right-click on this listing in the Modules page, and select "Load symbols from " and "Symbols Path", I get a dialog box, pointing to the path I just listed but, it is asking for a .pdb file! There is no .pdb file in that directory. Actually there is no App_Web_login.aspx.cdcab7d2.pdb file anywhere on my machine.
Also, there is an App_Web_login.aspx.cdcab7d2.DLL file located in the bin folder of my project. I was hoping that Visual Studio would generate a new .dll file there if I rebuilt the project. But, if I remove that .dll file, the project won't build.
Very confusing.
How can I get the symbols file situation straightened out?
Thanks, in advance, for any help you can provide.
Special Note: Here is what is listed in the element of the web.config file:
<compilation defaultLanguage="vb" debug="true">
<compilers>
<compiler language="vb" type="Microsoft.VisualBasic.VBCodeProvider, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089" extension=".VB" compilerOptions="/define:Debug=True /define:Trace=True /imports:Microsoft.VisualBasic,System,System.Collections,System.Configuration,System.Data,System.Drawing,System.Web,System.Web.UI,System.Web.UI.HtmlControls,System.Web.UI.WebControls"/>
</compilers>
<assemblies>...
Thanks again for any help...

asp server error ' Could not load file or assembly ' but the assembly is definitely there.

I am currently getting the following error. On a locahost website.
Could not load file or assembly 'MySql.Data, Version=6.5.4.0, Culture=neutral, PublicKeyToken=c5687fc88969c44d' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)
Though, the reference is definitely there in the references folder and that dll is definitely on my local machine in the place it is pointing to. I have also tried deleting and re-adding the reference.
Does anyone know what would cause this error?
Also what is the assemblys manifest definition?
Thanks in advance for the help, I very much appreciate it.
in visual studio select the reference in the solution explorer then in the properties make sure the Specific Version property is set to false.
If you have an entry for this reference in the web.config, edit the file and remove the version information.
if you close visual studio and open the project file with a text editor, make sure in the project file the version of the assembly is not listed but only the name and type, so just remove the following:
, Version=6.5.4.0, Culture=neutral, PublicKeyToken=c5687fc88969c44d'
then it should work no matter if you are using the 6.5.5 or 6.5.4, as long as the code is using classes and methods available in both.
I have experienced the same situation and managed to fix the problem with these steps,
Read the error information carefully which provides helpful details to rectify the situation.
I wouldn't change the machine.config file.
As it says Application cannot find a reference to the assembly MySql.Web and the version it is trying to reference is Version=6.7.4.0.
Based on path you install MySql you will be able to find the correct assembly files, ex :
C:\Program Files\MySQL\Connector NET 6.7.4\Assemblies\v4.0\MySql.Data.dll
Copy that file to bin folder. (I would copy all the files in C:\Program Files\MySQL\Connector NET 6.7.4\Assemblies\v4.0\ folder to bin folder)
Hope this helps! Thanks
I have encounter the same problem very few days ago , you get this error when you have build your some DLL with earlier version and now you have change the dependent DLL version but had not build the DLL again . Please check if you have any component which was build on the earlier version . While we build any DLL , DLL it self in the manifest add all the dependency information so that it can load all of them when required . So if you remove that version of DLL you need to recompile all the component and then use
This problem persists also in newer version of MySql.Data. Just change the version from App.config file:
<assemblyIdentity name="MySql.Data" publicKeyToken="c5687fc88969c44d" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-6.6.5.0" newVersion="6.6.5.0" />6.7.4.0
to oldVersion="6.6.5.0"
<assemblyIdentity name="MySql.Data" publicKeyToken="c5687fc88969c44d" culture="neutral" />
<bindingRedirect oldVersion="6.6.5.0" newVersion="6.7.4.0" />
I had this in an older asp.net 2.0 website on a new machine. In my case, the MySql assembly from the GAC could not be loaded because it was .Net 4.0. Assembly redirect in web.config did not work. I fixed it as follows:
Download the specific version of MySql.Web and MySql.Data from nuget:
https://www.nuget.org/api/v2/package/MySql.Web/6.5.4
https://www.nuget.org/api/v2/package/MySql.Data/6.5.4
Open the downloaded packages with a zip tool (e.g., 7zip) and extract the .Net 2.0 assemblies into the bin directory of the malfunctioning asp.net site.
I was getting the same error and the file absolutely existed.
If you see a SGEN next to your error, you can try this:
In the project properties window go to Build and in the Output section go to the Generate serialization assembly dropdown. Change the value Auto to Off and Build again.
You can set it back to auto if you need it.
In some situations, it depends on bindingRedirect attributes in web.config file of the project. In my case, I had two version: olderVersion and newVersion. I just switched those values and it solves the problem.
WARNING: Be sure that the newer version is referenced into web.config assemblies' tag file just as :
<add assembly="$AssemblyName", Version=$NewVersion, Culture=neutral, PublicKeyToken=$KeyToken/>

ASP.NET website is working in IIS but not in browser

I have deployed my asp.net 2.0 website on IIS, and I tested there by browsing website in IIS and it's working fine.
But I am getting the below error while browsing the website
Configuration Error
Description: An error occurred during the processing of a configuration file required to service this request. Please review the specific error details below and modify your configuration file appropriately.
Parser Error Message: Unrecognized attribute 'xmlns'.
Source Error:
<?xml version="1.0"?>
<configuration xmlns="http://schemas.microsoft.com/.NetConfiguration/v2.0">
<configSections>
<section name="loggingConfiguration" type="Microsoft.Practices.EnterpriseLibrary.Logging.Configuration.LoggingSettings, Microsoft.Practices.EnterpriseLibrary.Logging, Version=3.1.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"/>
Previously when we used to create a website in IIS, it worked fine. I have checked the website folder in IIS [ By clicking Property > ASP.NET] and the framwework tageted there is 1.1, and it is in read only mode. If the problem is related to this issue than please let me know how to change it.
In the Property > ASP.NET tab you need to select the 2.0 version in the version combo. If not available, it means that .NET 2.0 is not properly installed with IIS.
I had this exact error message on a machine where I installed .NET 2.0 prior to IIS.
You can fix this by opening a .NET 2.0 SDK Command Prompt, and run
aspnet_regiis.exe -ir
This will register .NET 2.0 in IIS, and you will get it available in the version combo.
NOTE:
An alternative to run it in the SDK command prompt, is to open a standard command window and navigate to the .NET Framework 2.0 installed location and run aspnet_regiis.exe -ir from there.
On my installation this is:
C:\WINDOWS\Microsoft.NET\Framework\v2.0.50110>
The error message you're getting is that the attribute xmlns of the element configuration is not recognized. Before anything else, have you tried removing the xmlns attribute?
I've just double checked by looking at a web.config file I have to hand and the start of it looks like this:
<?xml version="1.0"?>
<configuration>
<configSections>
i.e. No xmlns attribute on the configuration element

Resources