Showing posts with label windows. Show all posts
Showing posts with label windows. Show all posts

Wednesday, December 3, 2014

Upgrading a 2008R2 to 2012R2 might cause issues for WCF self-hosted service

The following error occurs after upgrading a Windows 2008R2 server to Windows 2012R2:

System.TypeLoadException: Could not load type 'System.Runtime.Diagnostics.ITraceSourceStringProvider' from assembly 'System.ServiceModel.Internals, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35'.
   at System.ServiceModel.Channels.BinaryMessageEncoderFactory..ctor(MessageVersion messageVersion, Int32 maxReadPoolSize, Int32 maxWritePoolSize, Int32 maxSessionSize, XmlDictionaryReaderQuotas readerQuotas, Int64 maxReceivedMessageSize, BinaryVersion version, CompressionFormat compressionFormat)
   at System.ServiceModel.Channels.BinaryMessageEncodingBindingElement.CreateMessageEncoderFactory()
   at System.ServiceModel.Channels.TransportChannelFactory`1..ctor(TransportBindingElement bindingElement, BindingContext context)
   at System.ServiceModel.Channels.ConnectionOrientedTransportChannelFactory`1..ctor(ConnectionOrientedTransportBindingElement bindingElement, BindingContext context, String connectionPoolGroupName, TimeSpan idleTimeout, Int32 maxOutboundConnectionsPerEndpoint, Boolean supportsImpersonationDuringAsyncOpen)
   at System.ServiceModel.Channels.TcpTransportBindingElement.BuildChannelFactory[TChannel](BindingContext context)
   at System.ServiceModel.Channels.Binding.BuildChannelFactory[TChannel](BindingParameterCollection parameters)
   at System.ServiceModel.Channels.ServiceChannelFactory.BuildChannelFactory(ServiceEndpoint serviceEndpoint, Boolean useActiveAutoClose)
   at System.ServiceModel.ChannelFactory.CreateFactory()
   at System.ServiceModel.ChannelFactory.OnOpening()
   at System.ServiceModel.Channels.CommunicationObject.Open(TimeSpan timeout)
   at System.ServiceModel.ChannelFactory.EnsureOpened()
   at System.ServiceModel.DuplexChannelFactory`1.CreateChannel(InstanceContext callbackInstance, EndpointAddress address, Uri via)
   at ChangeAuditor.AgentServiceProxy.CAgentServiceProxy.Open(String ConnName, String ServiceUri, Boolean IsWorkstation, String SpnName, String ForeignDomain, String ForeignUserName, String ForeignPassword)


This is happening only if you upgrading a 2008(R2) server that had .Net Framework 4.5.2 installed prior to the upgrade. After upgrading to 2012, you only see .Net Framework 4.5.1 installed:











If you look at the version of the dlls on the upgraded machine, you see the following:
System.ServiceModel.dll - 4.0.30319.34209
System.ServiceModel.Internals.dll - 4.0.30319.33440

The System.ServiceModel.dll references ITraceSourceStringProvider:













Which does not exist in the System.ServiceModel.Internals.dll after the upgrade:

To solve the issue, .Net Framework should be installed again on the upgraded 2012 server.

When you install 4.5.2 you see both files show 4.0.30319.34209 version and System.ServiceModel.Internals.dll has ITraceSourceStringProvider:



Thursday, April 18, 2013

What is AppPoolIdentity?


IIS 7.5  runs Application pool under AppPoolIdentity.

The Windows operating system provides a feature called "Virtual Accounts" that allows IIS to create unique identities for each of its Application Pools. Click here for more information about Virtual Accounts.

Useful articles:
http://blogs.iis.net/webdevelopertips/archive/2009/10/02/tip-98-did-you-know-the-default-application-pool-identity-in-iis-7-5-windows-7-changed-from-networkservice-to-apppoolidentity.aspx

http://www.iis.net/learn/manage/configuring-security/application-pool-identities

http://technet.microsoft.com/en-us/library/dd548356.aspx

Monday, March 4, 2013

Chrome does not load pages



I came across an issue where Google Chrome would not load any pages on a brand new laptop with Windows 7 but IE worked with no problems.

Initially found solutions with running Chrome with the "-no-sandbox" switch, but it it not recommended,

Finally found this helpful thread

The following solution helped:

This issue may be related to DisplayLink software, which is used with USB video adapters and some laptop port replicators.  I have a DisplayLink UVA+ USB video adapter driving a second monitor.  I was able to completely resolve the issue of Chrome not displaying webpages using the process outlined below.  There was no need to disable the sandbox or change the GPU settings in Chrome.
First, I unplugged the DisplayLink adapter from the USB port on the PC.  Next, I opened the Programs and Features control panel and uninstalled:
 -DisplayLink Core Software
-DisplayLink Graphics
 Unfortunately I did not get the version numbers recorded before they were removed from the Programs and Features control panel.  After rebooting, Chrome functioned properly, but my second monitor was (obviously) not receiving a display signal.  I then plugged the DisplayLink adapter back into the USB port on the PC and let Windows 7 Pro automatically find and install the drivers.  It did.  Now Chrome is functioning properly and the DisplayLink adapter is driving my second monitor.
 In the Programs and Features control panel, only DisplayLink Core Software (6.3.40660.0) shows up now.  DisplayLink Graphics is gone.  It would appear that the DisplayLink Graphics software may be a prime suspect.
 Google Chrome 25.0.1364.97 m
Windows 7 Professional (6.1.7601 SP 1 Build 7601)
DisplayLink UVA+ USB video adapter
DisplayLink Core Software 6.3.40660.0
 Before:

After:



PS. The laptop I'm using does not have a regular dock station but the one that is plugged in via USB that explains why none of my colleagues with regular laptops have this issue.

Tuesday, November 6, 2012

Disable beeping for remote desktop

I have the following environment:
VMware Windows 2008 labs on vSphere. I'm connecting to them using Remote desktop.


One day beeping coming from my remote machines became very annoying. I've tried multiple solutions and only the last one helped. But I'll post all of them as it seems they did help some people.

1. Disable sounds for the Remote Desktop connection:

Remote Sound - Do not play

More details here

2. Device Manager - View - Show hidden Devices - Non-Plug and Play Drivers - Beep – Disable. 
I haven't found this option on my lab.

More details here

3. The final solution that helped me. Change registry keys:

[HKEY_CURRENT_USER\Control Panel\Sound]
"Beep"="no"
"ExtendedSounds"="no"

Did it on the lab and restarted after the change.

Wednesday, October 19, 2011

List of installed updates on the server


Want a quick list of hotfixes and service packs that are installed on your Windows PC or Server? By using the Windows Instrumentation command-line interface (WMIC) you can create a quick list. This Tech-Recipe applies to Windows XP Professional, Windows Vista, Windows Server 2003 and Windows Server 2008.


wmic qfe list


To redirect output to text file:


wmic qfe list > hotfixes.txt




from here

Friday, September 16, 2011

How to install Application server on windows 2003 without CD

During adding an Application server role to Windows 2003 server it asks for Service pack 2 CD. But I don't have the CD. Originally it was a server with clear W2003 installation and SP2 was installed using .exe package.


The following article I've found helpful: 
http://serverfault.com/questions/280971/installing-iis-on-windows-2003-without-the-windows-cd


It will prompt you for SP2 files first -- these are in your Windows\ServicePackFiles\i386. Then it will prompt you for Windows Server 2003 RTM files -- these are on the CD. You can use any CD -- it does not have to be the same key as the one you've used to install with.