Recent Posts

Wednesday, January 30, 2013

Fix for An unexpected error occurred while searching for plugins in Wordpress site hosted locally in Wamp server.

I came across unusual error while trying to install the plugins in wordpress development site hosted locally in Wamp server within our company network:

The error said:
“An unexpected error occurred. Something may be wrong with or this server’s configuration. If you continue to have problems, please try the support forums”

It was few hours search which directed me to change the timeout in httpconfig.php and others as well and I tried all of them and finally I found out the blog to fix it which was:

The main culprit of the issue was the “proxy” being used for the connection within our company.

To get around the proxy we need to enter the proxy information in wp-config.php as below as mentioned in above link.

If the problem is happening when you search plugins or themes its probably because your connected to a proxy and you need to configure it on your wp-config.php
/** EXAMPLE - proxy settings */
define('WP_PROXY_HOST', '');
define('WP_PROXY_PORT', '1234');
define('WP_PROXY_USERNAME', '');
define('WP_PROXY_PASSWORD', '');
define('WP_PROXY_BYPASS_HOSTS', 'localhost');
Thanks to mario.andrade

Read more!

Wednesday, January 16, 2013

Using Entity Framework Code First and ASP.NET Membership Together A great article by Imar Spaanjaars

I was stuck when Asp membership tables were being deleted when working on Entity Framework code First approach and by looking around got hold of this great article that explained and fixed the exact problem i was having.

The link is below for the guys who are still searching for the fix. 

Using Entity Framework Code First and ASP.NET Membership Together

Some time ago I was involved as a software designer and developer in an MVC 3 project that used Entity Framework Code First 4.1 in a repository layer. During development we postponed dealing with security as requirements were pretty simple (simple logons with a single Administrators role plus the requirement that users should only be able to see their own data). When we were close to deployment, we ran the aspnet_regsql tool against the database that EF had created for us to create the SQL schema and data that the Application Services such as Membership and Roles require. We also added an additional userName parameter to a Get method in the repository to filter records for the currently logged in user. Finally, we added Authorize attributes to a number of controllers to make sure they are only accessible for users that are logged in. We then deployed the application and database, created a number of users using the MvcMembership section we had added to the site, and announced the presence of the site. All of this worked great, but we ran into issues when started work on the next version of the application.

Read more!