so Hi everyone, struggling to solve this almost for a day, i haven't used crystal reports much, so please point me in the right direction.
Here is the problem, we have an asp.net web site using crystal reports. All the reports seems to work fine except one. The Report is opening when it is running in local, but when deployed to the server it is throwing "System.Runtime.InteropServices.COMException (0x8004100F)" error.
when i searched for it, it is a logon error, if thats the case it shouldnt work from local either, and other reports using the same connection also working well when deployed in server.
Taken from SAP:
If it's only certain reports, the compare the reports:
Connection type (OLE DB, ODBC, etc.).
Is it reports with subreports only? If so, check the above and log on to the subreports.
Check other differences. parameters? Tables vs. Stored Proc, etc., etc.
You may also want to troubleshoot by trying out the 32 bit runtime
Okay, currently the report is working, maybe of help to someone else facing the same problem.
In the report database properties, the Locale Identifier of the connection was set to 17417 which is English-Malaysia(dont know why and how), i changed the connection Locale Identifier to 1033 English-United States and now it is working in the server.
Database -> Set Datasource Location -> report -> properties -> Locale Identifer
If someone could reply how the locale identifier got set to 17417, it would be a great help.
Roy, I believe you set local identifier when you create database connection.
enter image description here
Related
I'm coming across this error when I run my web app. The error is given only when the code is run on my web server. I can run the exact same code on my local machine and it works just fine. The the only way that I see the error when running the app on my webserver is if I press f12 when I try to run a given page. The page is trying to SFTP a file to another server, but like I said, I can run the exact same code on my local machine with no errors so I know that the code will work. There are no message or error boxes that popup. I've gone over the code over and over as well as looking at the difference of the configuration and programs that are installed on my local machine as opposed to what is on my web server. There is nothing that I see that is different. Here is the whole error message I see:
Sys.WebForms.PageRequestManagerServerErrorException: The source was
not found, but some or all event logs could not be searched. To
create the source, you need permission to read all event logs to make
sure that the new source name is unique. Inaccessible logs: Security.
I've found quite a few questions about this error, most of them talk about giving access to all users in this registry key:
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\EventLog\Security
or adding a user called Network Service to the above key and giving it full access or granting read permissions for the Network Service user to the whole EventLog branch. Another path I've explored is to change the identity of the app pool in IIS and then change it back. I've tried just about everything listed on SO and other places. Like I said, most of them involve writing new keys and changing permissions on keys in the registry. Another one I've tried is creating a registry key named HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\services\eventlog\Application\#MY APP# and then creating a string value inside it called EventMessageFile with the value of C:\Windows\Microsoft.NET\Framework\v4.0.30319\EventLogMessages.dll in it. Another suggestion is to open the the app as an Administrator. That didn't work either. I could go on and on and on but for the sake of not turning this into a novel I won't, but I hope I've shown enough examples to let everyone know that I've done due diligence in trying other solutions first before asking my question. Will someone please help me out with this very frustrating error?
I have used Dynamics AX Traceparser on a number of occasions and usually without issues. This time however I can't seem to manage to generate and AX ETW trace that will show SQL in my TraceParser.
I can confirm it's not because I didn't load a server session, so it's not this question.
Things I have tried:
I looked in the traceparser database, there is not a single query in there
I did the whole run as administrator thing
I verified registry settings
I started tracing from both server config and client config.
I tried converting the .trc file to an xml file using tracerpt but the resulting xml doesn't make much sense.
I tried deactivating the DATAAREAIDLITERALS in SQLSYSTEMSETTINGS
Things that are different/uncommon about this environment
I can't install the client and traceparser on the AOS itself
AX Build 5.0.1600.2967 has been installed (incorporating the DATAAREAIDLITERALS change) because this customer has a lot of parameter sniffing issues.
Does anybody have an idea what could be the issue?
Has anyone tested traces on an AX with that specific patch (as I can imagine the query generation change could affect the trace .mof configuration)
If anyone can suggest me of a way to verify if the trace actually contains SQL information that would be of help too, because now I have no clue if the tracing fails or the importing.
I have an asp.NET MVC 3 application which uses nHibernate and SQL Server Standard Edition. The production-environment works fine, and was developed by someone else.
I'm trying to set up a test-environment on my local PC, and restored a backup from the live Db to my local SQL Express. Changed the connection strings, and got the sessionfactory running. (I'm still learning the different aspects of asp.NET MVC, so I'm not totally confident I've checked everything that needs to be checked).
Unfortunately, now when the index.cshtml is loaded, it fails with the mentioned error (SqlException (0x80131904): Invalid object name 'PlanningRow'). It fails on the line:
planningRows = Planner.GetCurrentSession().QueryOver<PlanningRow>().List();
I've seen similar problems posted on StackOverflow and elsewhere, and I know the error means it can't find the table- but the Db and the table are on my local SQL Express. But it is very well possible the database or table is not in the right schema or the schema does not exist. Unfortunately, I don't know what that actually means, let alone how to fix it, and I can't really find hints about how to do this.
(f.i. SqlException (0x80131904): Invalid object name 'dbo.Categories' gives some interesting options- especially option 2- but no way how to check or fix this).
Can anyone point me in the right direction?
double check the connection string points to the correct database
enable SQL-logging with "NHibernate.Sql" in DEBUG mode
check the mapped schema in PlanningRow mapping and default schema in hibernate.cfg file or config code
I have a legacy ASP application that I support. By support I mean that I haven't touched it since about 2005 because its just worked.
However there were a couple of data issues in the Access database that the ASP application uses. So like a fool I opened the database directly over a fileshare (using MS Access 2007), fixed the data and saved it down (in Access 2000 format).
Now the application will retrieve and display the data OK, but any updates fail with the error 3705: Operation is not allowed when the object is open. I have not changed the code in any way, the only change was the data update and database save.
I've found plenty of examples of this error, but they all relate to fairly simple issues like ensuring the recordset is closed before opening it, changing the CursorLocation enum, etc. I've tried most of these in the vain hope that something will work, but nothing has.
Any ideas how can I fix this?
Thanks.
UPDATE
I've installed a web based access database management system, and have tried to compact and repair the database. I received the error:
The Microsoft Jet database engine cannot open the file '<snip>'. It is
already opened exclusively by another user, or you need permission to view
its data. (-2147217911)
I have run the macro detailed here to determine who is logged onto the database, and just showed the admin user (which was me - while running it)
Those errors mean one thing: the database file is opened by some other process and thus is being locked.
Most likely that "web based access database management system" is the culprit, try to find how you can configure it to not lock the file, or get rid of it.
As a work around or way to verify the real problem, you can copy the .mdb file into different location and change the classic ASP connection string to check if you can update the database in its new location.
#Remou's comment above about checking the file and folder permissions was correct.
I had our server admin check the permissions, and it seems that the write access had dropped off the folder (and the files also inherit their permissions from the folder). He said that this has happened before when saving directly over the fileshare.
(accepting in lieu of an answer from #Remou)
Currently I'm working on a piece of code that involves using the Crystal Reports Viewer to export .RPT files to PDF. My problem is that the code works on literally everything except the website I'm planning to eventually put it on.
When placed on the website it throws back the error "Failed to open the connection." which I believe is connected to the SQL Server connection that's formed in order to read data for the report itself.
The code itself is solid and works when used in a separate console application I built to test it whether said code is run on my local machine or on the server itself. It even runs when I test the website in Visual Studio's virtual host.
I've narrowed it down to being some sort of permissions issue, but I am not knowledgeable enough in the various permissions settings to figure out which ones specifically apply to this situation. It's worth mentioning that other pages on the website are directly connecting to the same database, but they are doing so directly through Linq instead of going through the Crystal Report Viewer.
So does anybody know which settings I need to modify in order to fix the connection error.
An added note: One of the other suggestions is to make sure there's an ODBC DNS in place that matches the one being used by the code. I have created such a DNS already.
Application Pool dictates how your application runs in many ways. You can probably configure the web.config to run under the credentials, or access level of your choice.
Solution for people who didn't read the comments:
Change the identity under the advanced setting's of your application pool to the desired level of access.
Glad I could help.- J