Delete Browser Hijacker “Bing.vc”

Bing.vc is a Search Engine invasion which will take over the home page in the browser. It can be deleted with the following steps.

1.Use command to delete the “IconOverlayEx.dll”;

a. Locate the dll in the folder “Users\youraccount\AppData\Local”;

b. Use command “attrib -r -s -h” to unprotect the dll, because access is normally denied.

c. Use command “del” to delete this dll;

d. Restart the windows;

2. Reset the settings in all Browsers, e.g. Chrome, IE, Firefox, etc.

Advertisements

Show call stack of web part in SharePoint

Correlation Id  as follows is not the useful debug information for developer.

webpart_callstack1

It is possible to use ULS Viewer to trace the log file in the background. (ULS View Download:http://www.microsoft.com/en-us/download/details.aspx?id=44020 )

In order to display the call stack of the web part, we should change the configuration in “web.config” file of the application directory ,e.g. “C:\inetpub\wwwroot\wss\VirtualDirectories\80”.

Set the attribute “CallStack” in Element “SafeMode” to “true”,

Set the attribute “mode” in Element “customErrors” to “Off”.

The better error message will be shown.

webpart_callstack2

Some Tips of Localization MVC5

Some tips of localization on UI of MVC5.

1.Create the resource file(.resx), e.g. “product.resx”, If it is chinese, the file name is “product.zh-CN.resx”.  The initialization of the culture can be called in the overridden method “Application_BeginRequest” of “Global.asax.cs”.

protected void Application_BeginRequest(object sender , EventArgs e)
{
//var culture = CultureInfo.CurrentUICulture;
var culture = new CultureInfo(“zh-CN”);

Thread.CurrentThread.CurrentCulture = culture;
Thread.CurrentThread.CurrentUICulture = culture;

//Use the same culture for any newly created threads
CultureInfo.DefaultThreadCurrentCulture = culture;
CultureInfo.DefaultThreadCurrentUICulture = culture;
}

It is not good to code the culture hard. It can be configured by using “CurrentUICulture”, user can switch the language in the browser settings.

2. For the module class, we can use DataAnnotation to simplize localization by using the annotation class. The display of the attribute of the module will be localized.

[Display(Name="Name", ResourceType = typeof(Resources.Products.Product))]
public string Name { get; set; }

3. For the content of HTML tag, it can be localized by calling Resource class.

<h2>@Smart.Software.Studio.ERP.Resources.Products.Product.ProductTitle</h2>

If the UI in each action is complicated, the directory of resource files should be created as the same structure as the directory “Views” in order to retrieving the variable quickly for each action.

localization

Thinking SharePoint just as Service

I totally agree with “Thinking SharePoint as Service”. Pesonal opinion, this is one of the best article to describe that the “gold time” of SharePoint is gone.

http://www.andrewconnell.com/blog/developers-sharepoint-isn%E2%80%99t-a-platform-sharepoint-is-a-service

http://www.andrewconnell.com/blog/developers-sharepoint-isn-t-a-platform-sharepoint-is-a-service-part-two

It doesn’t mean that SharePoint will not be used in the future but only just be considered as a service. For example, it may be integrated with MVC just because Workflow is required. “Injecting things in the host web or customizing master page is just like cat & mouse game”.

So for developer, it can not be to write some just running code. Just like Andrew Connell said in his blog, “I think that if you’ve hired me to do some work for you, you didn’t hire someone to bang away at a keyboard and give you some running bits in a few days / weeks / months. I think you hired me for my experience.”

SDK for Windows 10 is not installed with Visual Studio 2015?

I have tried with Visual Studio 2015(Community&Enterprise both) in Windows 10, which is updated from my windows 8.1. Before installation, I have selected all the components of Visual Studio. But an universal app can still not be created, it displays the following error.

universalAppError

When I click “Install”, it is redirected to Microsoft home page.

I should install the SDK with following link manuelly again. Then universal app can be created.

https://dev.windows.com/en-us/downloads/windows-10-sdk