ELMAH doesn't insert error logs to SQL DB on production - elmah

I have configured an SQL Server 2008 R2 db for ELMAH as described and works fine on development but not production. Both development and production connection string targets to same db, profiler shows nothing for the insert SP if I run production web site. I do not think its a SQL related problem. I have read some posts like
Elmah not working on IIS7 server
Elmah 1.2 does not log to SQL on Windows 2008 IIS7.5 Integrated mode (but works locally)
but even we have same problem, none of them helped me.
Both websites work on Windows Server 2008 R2 / .net 4.
Any ideas? TIA.
UPDATE : The only difference is my web site works integrated mode on development, and classic on on production. If I change classic to integrated it works fine.
So ELMAH doesn't work on classic mode?

it's probably problem with permissions to stored procedure.
use following script to give execute permission to the user (from connection string in productive system)
GRANT EXECUTE ON ELMAH_GetErrorsXml TO USER_NAME
GRANT EXECUTE ON ELMAH_GetErrorXml TO USER_NAME
GRANT EXECUTE ON ELMAH_LogError TO USER_NAME

Related

ColdFusion Builder Security Code Analyzer will not run because of ColdFusion server error

I'm attempting to run ColdFusion Builder 2016's built-in Security Analyzer. It's not working.
Here's my setup
I installed ColdFusion Builder 2016 along with ColdFusion Server 2016, by using the CF Builder installer on Windows 10. I have a valid registration serial for Builder, so this is not a demo version.
I set up ColdFusion 2016 as a Windows service so that it starts up with Windows on my dev machine, and I connected it to the locally running IIS web server. I added a second registration for a ColdFusion server in my CF Builder servers panel so that I could manage the Windows service from Builder. Both of the servers (one marked as a Windows service, one not) show as running in Builder's "CF Servers" panel.
I've run the Security Analyzer before, and had no errors with it. I don't know why it doesn't work today.
Duplicating the error
When I right-click on my project, a directory, or a file, then navigate to Security Analyzer, and try to run the security analyzer, I receive this message in an alert window:
Server error: Security Code Analyzer is not available in this edition of the ColdFusion Server.
Here's what I've tried
I edited my project properties to choose the service, then to choose the non-service. Both of them produced the same error.
I noticed that CF Builder's server registrations did not have "2016" as the version number. One was blank, the other was set to "11". I changed them both to 2016 and restarted CF Builder. I switched my project to each server, back and forth, with a combination of restarting Eclipse between tests. Same error.
I also tried changing the server's port from 8600 to 80 for the Windows service, but that resulted in an expected 404 error.
I restarted my local ColdFusion server and retried the above items. Same error.
Thought
At first I thought this might be that CF Builder thinks this is a server version error. At this point, I'm wondering if the Security Analyzer does not run on the development CF Server, even though I've had it running locally before. I can't connect it to any other CF2016 servers because we have a very, very large installation of CF11 enterprise servers, and have not begun to make a server infrastructure move to CF2016 yet.
The ColdFusion 2016 Code Securiy Analyzer is only available with an Enterprise edition license. However, the EULA for ColdFusion 2016 appears to allow you to use the same license key from a production server to activate a "development" server, so you should still be able to run the Security Analyzer on your development machine.

How do I properly uninstall and reinstall SharePoint 2013? (Avoiding 503 Error)

I have looked in quite a few places but all the information I have seen does not address my scenario. Please note that I can probably just make a new server for my SharePoint 2013 installation but I think this might be one of those gems for people who do not have that luxury and facing the same problem.
SCENARIO:
I uninstalled a functional SharePoint 2013 setup by
uninstalling SharePoint 2013 on the SharePoint Server and
manually deleting the databases on the remote SQL Server.
When I tried to reinstall SharePoint 2013 though I kept getting a 503 Error on the Central Administration page which appears to be due to the Central Administration AppPool stopping.
SUGGESTIONS I HAVE TRIED:
Check the password of the account running the AppPool service.
I did that and the account have Domain Administrator privileges and is capable of logging into the SQL Server without issue using the same password.
Try uninstalling IIS.
I uninstalled and reinstalled IIS and it made still gave the 503 error.
I read on a blog post (let me know if I can send the link) that "[he] need[ed] to clean up the content db, virtual directory and app pool properly next time."
I believe I did this but I may be missing something and that bit of stuck information is probably what is causing the issue.
Any thoughts?

Connecting ColdFusion 8 to Oracle 11g with JDBC

I created a datasource from my ColdFusion 8 admin using JDBC/Oracle Thin Client. The datasource creation was successful.
When Oracle encryption is configured as "Requested" I can browse my ColdFusion app. and run many functionalities with no problem. But when the Oracle encryption is configured as "Required" the connection fails.
The way I tested and know that it was failed was when I log in to my web app. It won't log me in. But when the Oracle is switched back as "Requested" I can log in successfully and run my tasks.
I have ColdFusion 8 Enterprise version and the operating system is Unix.
From the network dept, I was told they have the correct JAR file in place but not sure what is the correct JAR file.
Currently my web apps are running with datasource created using Oracle Thin Clint but the Oracle encryption needs to be switched back to "Requested" otherwise my users are complaining that they can't log in.
Has anyone ever experienced this situation and found a solution?
What should I do so I can use Oracle encryption set to "Required"?
I believe you are looking for the ojdbc14.jar file in the ColdFusion8/wwwroot/WEB-INF/lib directory (this will work with 11g).
I would give Coldfusion a restart but it might not be unnecessary.
Navigate to your Coldfusion Administrator.
In the ColdFusion Administration under data sources. Add a new data source along with your credentials and choose Other from the Database driver options.
Then enter this: jdbc:oracle:thin:#10.10.10.11:1521:ORCL in the JDBC URL Textarea.
In the Driver Class textfield enter oracle.jdbc.OracleDriver.
If you need a different jar (not sure you will) but if you do you can down load it from here.
http://www.oracle.com/technetwork/indexes/downloads/index.html
Hope this is helpful or at least gets you further along.
Frank, Thank you for the answer but the java version running on my CF server is JAVA1.6 and the ojdbc.jar that's installed in there is ojdbc6.jar
Should the version of ojdbc.jar and java be the same? If I am already in the right track with my ojdbs.jar and java files then I'm back to square one
In addition, my further test using Oracle encryption as "Requested", I can run my apps. just fine except when my CF made a call to a str. procedure, it did not return a result. So I got CF error.
From me googling this issue, I found a blog that says this is a problem on CF standard version when using Oracle Thin Client. My CF is Enterprise edition.
I'm confused...is this related? how can I make this work?

Elmah setup with SQL Server 2008

I am using MVC 3 with SQL Server 2008 R2 DB.
I installed elmah 1.2.2 and SQL Server script.
Might anybody have some detailed information on how to setup Elmah with SQL Server 2008.
I checked online but could not find detailed information.
Since you have already run the SQL Server setup script and installed Elmah in your MVC application, you should just need to add the following to your web.config to have Elmah send its logs to your sql server instance.
<elmah>
...
<errorLog type="Elmah.SqlErrorLog, Elmah"
connectionStringName="<definedConnectionString>"
applicationName="MyAppName"/>
...
</elmah>
Keeping in mind that you will need to replace "<definedConnectionString>" with the name of the connection string that points to your SQl 2008 instance from your <connectionStrings> section of your web.config.
I would also recommend reading through the following 5 part series: Logging Errors with ELMAH and MVC 3, it contains a lot of great recommendations for using ELMAH with MVC. Also you might consider using installing the Elmah.MVC NuGet Package to change the default behavior of Elmah within an MVC application.

Yet another elmah problem ... works everywhere but production

I have elmah setup to use SqlErrorLog and this is running fine on both my local using the developer webserver, and my integration environment under IIS. On my production box elmah is able to log exceptions with XmlFileErrorLog writting to the app_data directory. When I switch back to SqlErrorLog I get nadda. I have ensured that the database exists has the required table and three procedures. I have tested the connectionstring. I have compared the web.configs from my local to prod and the only differences are the database server name in the connection strings.
Any thoughts as to what else can be blocking in a production installation?
~-=Mike=-~
Have you properly setup the permissions on the database for ELMAH? Depending on if you are you using impersonation with your web application, you may have to grant privileges to additional users to the stored procedures/tables.