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.
Related
I'm working with WSO2 Identity Server and I'm curious if there is a way to run the product in developer mode without building each component of identity server. I found a way to start the "My Account" component in dev mode by following this tutorial ( https://is.docs.wso2.com/en/5.11.0/develop/setting-up-my-account-in-a-dev-environment/ )
but I want to be able to modify different components such as recovery-portal and authentication-portal by forking and cloning the required github repositories and starting the entire app in developer mode in order to see the code changes in real-time.
AFAIK the developer mode will work only for the MyAccount and Console. You can refer to the doc for more details on that.
The recovery portal, the authentication portal etc. cannot be tried with the developer mode. However, there are two ways that you can try this.
Build the war files manually and add them to the WebApps directory. If the server is running, war file changes will automatically get deployed. If the server is not running, you have to delete the existing directory and restart the server.
You can do the changes to the JSPs that are deployed inside the pack. Once the changes are done, you can save the changes and the changes will automatically get deployed.
I have a staging server where I want the designers to be able to preview the email design.
I have used rails 4 feature and I am able to access the mailer preview in localhost on path
http://localhost:3000/rails/mailers
Can I do the same on the staging server ?
this is all about configuration
first thing that you should do is to environment for staging.
by default rails give you development, production, and test
then I would set up something like mailcatcher this way emails dont go out to real people that dont need to see them.
last step is to configure the server environment to be staging
You can also edit config vars on your app’s settings tab on Dashboard
Heroku manifests config vars as environment variables to the
application. These environment variables are persistent – they will
remain in place across deploys and app restarts – so unless you need
to change values, you only need to set them once. Whenever you set or
remove a config var, your app will be restarted.
but here is were you need to change production to staging
I hope that this helps
I am hosting a Django site on the Heroku. However, Heroku does not allow databases with over 10 000 records stored for free. Can I store my database locally on a computer I have direct access to and still host the site on Heroku?
It is possible to use external database in Heroku by adding configuration:
heroku config:add DATABASE_URL=mysql://user:pass#server:port/database_name
But the question is what to I write for server in this case?
This is possible, but you will have to open up some ports on your local computer. Please look into port fowarding if you are into this. You are even able to post your whole website on your computer.
Personally I wouldn't recommend doing this, because you computer could become more vulnerable and you have to rely on your own home network and computer speed. Scaling is not easy with this setup.
However, there is (some kind of) an alternative. Django uses SQLite as the default database. You are able to use SQLite on Heroku. Please note that SQLite is not build for websites that interact a lot with your database and you cannot push a new build as easily as you would normally do. You will have to export the database first and then rebuild it later as Heroku creates a fresh website each time it builds (and the new database entries will be gone with that).
In other words: I would recommend to just pay for an upgrade of the database or move to another hosting company. I am sorry.
Is there a way in C++ to set the Windows system proxy with authentication credentials so it would affect all running programs(browsers, etc...) immediatly but:
Not requiring restarting any browser
Not requiring browser-reauthentication
I am looking really for a system level pre-authenticated proxy.
Thank you for any help. Ask any questions if something is unclear.
Using: c++11, Windows 7
EDIT 1: I need to set this programmatically, so please do not suggest any manual actions.
EDIT 2: Partially acceptable is a way how to set proxy programmatically without pre-authentication but still keeping 1. requirement (Not requiring restarting any browser)
System-level proxy settings are located in registry under \Software\Microsoft\Windows\CurrentVersion\Internet Settings hive in HKLM for all users and HKCU hive for current user.
There is an official instruction how to change it via REG file, you does not need to write any code.
But the main problem is: any application may have its own proxy settings, where it 1) can prefer system level settings but allow to override it by user, 2) not using system settings at all.
In corporate environments this problem solves as:
Internet gateway not allowed directly access to external network any computer except proxy server (Microsoft ISA/Forefront Web Proxy)
Proxy settings in registry are forced to all computers via Group Policies
If user need to run application which can not use system-wide proxy settings - it need to install ISA Firewall Client which intercepts all traffic and authenticate it on the ISA proxy.
So when you use full Microsoft software stack - you still not need to write any code :-)
Moreover, ISA Firewall Client uses undocumented Windows features and it will be too hard to write something to replace it with your own "C++11" skills.
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