Friday, December 28, 2012

Virtual machine taking forever to shut down.

My setup is VMware Workstation 8 host on Windows 7 guest Windows 2008 R2.

 

When trying to shutdown Windows 2008 R2 it goes to a black screen and stay there for up to 1 hour. Cannot leave VMWare. I need to shut down machine or terminate all vmware processes.

 

Found this site with the solution:

http://flakrat.blogspot.com/2011/12/vm-guests-take-forever-to-shutdown-in.html

 

Basically need to add the following changes to the vmware config.ini located in:

C:\ProgramData\VMware\VMware Workstation\config.ini

 

And adding the following settings to it.

prefvmx.minVmMemPct = "100"

mainMem.useNamedFile = "FALSE"

mainMem.partialLazySave = "FALSE"

mainMem.partialLazyRestore = "FALSE"

 

Make sure none of the .VMX files are overriding these changes.

 

I think this is all.

 

God bless,

Bruno

Thursday, December 27, 2012

Installing .Net 3.5 in Windows 8 without internet connection.

This might be useful command found in this article:

We can enable the feature by having the Windows 8 Media and running the following command in a command prompt in administrator mode.

Dism /online /enable-feature /featurename:NetFx3 /All /Source:<drive>:\sources\sxs /LimitAccess

Where <drive> is the drive were the media is found.

This should install .Net 3.5 in your machine without the access to the internet.

Nice trick.

God bless,
Bruno F Valli

Wednesday, December 12, 2012

Null (\0) in column in a grid. Binding AJAX. Using Telerik. Chrome/Firefox fine. IE no so much.

Very strange problem.

When running in Chrome I get the following result:
When I run the same page in IE I get no records:
If I do press F12 in IE. Go to the "Script" tab and press on "Start Debbuging". I get the error



Sys.WebForms.PageRequestManagerServerErrorException: An unknown error occurred while processing the request on the server. The status code returned from the server was: 12029

Got in contact with Telerik and they tell me this is a problem with Microsoft AJAX. The only way around it is to remove the nulls (\0) from my string before I post to the grid.


 if (Request.Browser.Browser == "IE")
{
    encoded1 = encoded1.Replace("\0", " ");
    encoded1 = encoded1.Replace("\n", "<br/>");
}

Now it works fine:





How to check for Browser information in ASP.Net

I needed to run a certain code only when the browser was IE. So I needed a way to check for browser, and here is the line of code:

if (string.Compare(Request.Browser.Browser, "IE", true) == 0)
{
   // your code goes here
}

Monday, December 3, 2012

Getting proxy user name and password to display when Windows Vista/7/8/2008/2012 Update runs.

When you are behind a proxy that needs user name and password that you are not logged into.
To get windows to show you what proxy it has:
netsh winhttp show proxy

If the response is
Direct access (no proxy server).

Then you have no proxies registered.
How to import the Internet Explorer settings for proxy and set it down in the winhttp settings:
Run the Command Prompt as Administrator

netsh
winhttp
import proxy source=ie

How to add a proxy manually:
netsh winhttp set proxy {proxyservername}:{portnumber}

How to wipe the proxy settings:
netsh winhttp reset proxy

Windows Update Error - 80243004

Found this article over here.

If you the error 80243004 I was running the Server under VMWare, not sure if this affects anything, but the article mentioned above has a very strange solution that worked. I am also behind a proxy that is password protected.

1 - Go to Taskbar properties by right-click on the taskbar and selecting properties.
2 - Go to the Customize Tab
3 - Click on the Customize button.
4 - Check mark the "Always show all icons and notifications on the taskbar"
5 - Click OK and try again.

I know very weird that something for displaying would affect the windows update, but it does. It worked for me.

This is all for right now.

God bless,
Bruno

Tuesday, March 20, 2012

How to disable the exception of cross threading.

With the code bellow you cane disable the exception for "Controls created on one thread cannot be parented to a control on a different thread."

It is not good to do this, but when you have a legacy application to covert it is nice to know that you can.

System.Windows.Forms.Control.CheckForIllegalCrossThreadCalls = false;

Kitematic - Self Signed Certificate In Certificate Chain

Found this issue while behind a enterprise proxy. Proxy uses self signed certificate. Windows has the certificate as trusted, docker works f...