If your program uses MS Office Application Interop (e.g. Microsoft.Office.Interop.Word.Document) to procedure documents , sometimes you may get this following error:
Call was rejected by callee. (Exception from HRESULT: 0x80010001 (RPC_E_CALL_REJECTED))
It happens only in few documents and the others will not. To solve this problem, we have 2 ways:
Way 1: Turn off all grammar / spelling functions, for example: open MS Word and go to Options, uncheck options:
+Check spelling as you type
+Use contextual spelling
+Mark grammar errors as you type
+Check grammar with spelling
Way 2: if you develop the program, you can add some codes to turn off grammar / spelling functions, for example in C#:
CurrentDocument.ShowGrammaticalErrors = false;
CurrentDocument.ShowRevisions = false;
CurrentDocument.ShowSpellingErrors = false;
Hope you save a tablet for headache.
Tuesday, February 11, 2014
Thursday, January 9, 2014
Joomla: control all types of redirection and http error codes with single component
Does your Joomla website has some links (URLs) needing to redirect? You can use Redirect core component of Joomla. However, it just does 1 type 301 redirection (Moved Permanently) and doesn't support to redirect URLs with Regular Expressions.
Luckily, we have a free component which allows you control almost types of redirection and http error codes. This below inforgraphic of SEOmoz can help you understand them and how they are important in SEO.
So what is the component? It's ReDJ component. You can check out it here. The following is its features:
+Manage redirection URLs, support macros & regular expressions for URLs
+Support to define 404 page quickly
+Support to statistic http error codes which are got and their visited URLs
+Support to statistic referrer URLs
And you can use it to:
+Solve SEO problems
+Create short URLs and use them with your domain (like they are created from bitly.com)
THE END ./.
Luckily, we have a free component which allows you control almost types of redirection and http error codes. This below inforgraphic of SEOmoz can help you understand them and how they are important in SEO.
So what is the component? It's ReDJ component. You can check out it here. The following is its features:
+Manage redirection URLs, support macros & regular expressions for URLs
+Support to define 404 page quickly
+Support to statistic http error codes which are got and their visited URLs
+Support to statistic referrer URLs
And you can use it to:
+Solve SEO problems
+Create short URLs and use them with your domain (like they are created from bitly.com)
THE END ./.
Saturday, January 4, 2014
Oracle: connect as sysdba without db user password
Oracle allows you connect as SYSDBA, if your Windows user is a member of 'ORA_sid_DBA' or 'ORA_DBA' group. Below are steps to do that:
1. Log in Windows as administrator
2. Check if your Windows has 'ORA_DBA' group. If not, let create it
3. Add your Windows user to 'ORA_DBA' group
4. Run TNSPING tool to check where SQLNET.ORA file is located, like the following:
1. Log in Windows as administrator
2. Check if your Windows has 'ORA_DBA' group. If not, let create it
3. Add your Windows user to 'ORA_DBA' group
4. Run TNSPING tool to check where SQLNET.ORA file is located, like the following:
C:\>tnsping orcl TNS Ping Utility for 32-bit Windows: Version 10.2.0.4.0 - Production on 09-JUN-2009 14:50:20 Copyright (c) 1997, 2007, Oracle. All rights reserved. Used parameter files: C:\oracle\product\10.2.0\db_1\NETWORK\ADMIN\sqlnet.ora
5. Add or remove comment for the following line:SQLNET.AUTHENTICATION_SERVICES = (NTS)6. Re-login Windows with the user mentioned above, try this line:C:\>sqlplus / as sysdba
7. Then see if you can login successfully
Wednesday, December 11, 2013
MS SQL: check why the server runs slow and optimize it
Below is the checklist which you should do when your MS SQL server runs slow and you should optimize it.
1. Check MSSQL version
Execute: SELECT @@VERSION;
Then search & update fixes from Microsoft for your version if any.
2. Check problems of hard disk
Free space? enough? speed? cache size? etc
Ref: http://www.sqlusa.com/bestpractices/configureharddisk/
3. Check Server Properties configured
On MS SQL Server Management Studio, right click on the server >> select Properties menu. Should check: Memory (enough? optimize?), Processors (balance? optimize?)
4. Check your maintenance plan
Do you have any maintenance plan? If not, should do it soon (on MS SQL Server Management Studio). If having, check if it runs well (check logs). The maintenance plan should do weekly, including:
+ Check DB Integrity
+ Shrink DB
+ Reorganize indexes
+ Rebuild indexes
Here is an example:
5. Check problems on reports's MS SQL server
+ Check in Activity Monitor (MS SQL Server Management Studio >> right click on the server >> select Activity Monitor). It helps to find out top expensive queries.
+ Check Standard Reports of the server (MS SQL Server Management Studio >> right click on the server >> Reports >> Standard Reports)
+ Check Standard Reports of the running DB (right click on the DB >> Reports >> Standard Reports).
6. Check in SQL Profiler
To find out more info (expensive queries? optimize?)
7. Check Parameter Sniffing
To find out if you have any problem on parameter sniffing
Ref:
http://www.sqlusa.com/bestpractices/parameter-sniffing/
http://blogs.msdn.com/b/turgays/archive/2013/09/10/parameter-sniffing-problem-and-workarounds.aspx
http://sqlblog.com/blogs/ben_nevarez/archive/2009/08/27/the-query-optimizer-and-parameter-sniffing.aspx
8. Feedback to development team or your provider
To optimize/re-engineer queries, stored procedures, etc.
Ref:
http://www.sqlusa.com/articles/query-optimization/
http://www.databasejournal.com/features/mssql/article.php/1565961/SQL-Server-Stored-Procedures-Optimization-Tips.htm
Nice week!
1. Check MSSQL version
Execute: SELECT @@VERSION;
Then search & update fixes from Microsoft for your version if any.
2. Check problems of hard disk
Free space? enough? speed? cache size? etc
Ref: http://www.sqlusa.com/bestpractices/configureharddisk/
3. Check Server Properties configured
On MS SQL Server Management Studio, right click on the server >> select Properties menu. Should check: Memory (enough? optimize?), Processors (balance? optimize?)
4. Check your maintenance plan
Do you have any maintenance plan? If not, should do it soon (on MS SQL Server Management Studio). If having, check if it runs well (check logs). The maintenance plan should do weekly, including:
+ Check DB Integrity
+ Shrink DB
+ Reorganize indexes
+ Rebuild indexes
Here is an example:
5. Check problems on reports's MS SQL server
+ Check in Activity Monitor (MS SQL Server Management Studio >> right click on the server >> select Activity Monitor). It helps to find out top expensive queries.
+ Check Standard Reports of the server (MS SQL Server Management Studio >> right click on the server >> Reports >> Standard Reports)
+ Check Standard Reports of the running DB (right click on the DB >> Reports >> Standard Reports).
6. Check in SQL Profiler
To find out more info (expensive queries? optimize?)
7. Check Parameter Sniffing
To find out if you have any problem on parameter sniffing
Ref:
http://www.sqlusa.com/bestpractices/parameter-sniffing/
http://blogs.msdn.com/b/turgays/archive/2013/09/10/parameter-sniffing-problem-and-workarounds.aspx
http://sqlblog.com/blogs/ben_nevarez/archive/2009/08/27/the-query-optimizer-and-parameter-sniffing.aspx
8. Feedback to development team or your provider
To optimize/re-engineer queries, stored procedures, etc.
Ref:
http://www.sqlusa.com/articles/query-optimization/
http://www.databasejournal.com/features/mssql/article.php/1565961/SQL-Server-Stored-Procedures-Optimization-Tips.htm
Nice week!
Friday, December 6, 2013
Simple tool but strong to test webservice
When you create a web service or you want to study a web service which a third party provides to you, you may need to code a test program to test your web service. It may consume your time.
With Web Service Studio, you won't worry about how to make a test program for testing a web service. Web Service Studio invokes web methods interactively. You just provide a WSDL endpoint then click Get button to fetch the WSDL and displays the list of methods available. After that, you can choose any method and provide the required input parameters then click Invoke button to make the SOAP request to the server and receive the response with returned values.
Here is a picture for demo:
Happy coding!
With Web Service Studio, you won't worry about how to make a test program for testing a web service. Web Service Studio invokes web methods interactively. You just provide a WSDL endpoint then click Get button to fetch the WSDL and displays the list of methods available. After that, you can choose any method and provide the required input parameters then click Invoke button to make the SOAP request to the server and receive the response with returned values.
Here is a picture for demo:
Happy coding!
Subscribe to:
Posts (Atom)






