Rahul Kansara's profileRahulBlogLists Tools Help

Rahul

July 22

Reducing Size of Virtual Hard Disk on Virtual PC

Following steps shows how to reduce size of the virtual disk on your Virtual PC.

 

1. Disk Defragmenter on guest machine

On your Virtual PC console, go to Start > All Programs > Accessories > System Tools > Disk Defragmenter 

 

1

 

 

 

This utility of windows helps to defrag your virtual disk.  

2. Compacting Virtual Hard Disk at guest machine

From Microsoft Virtual PC IDE, go to CD menu and select Capture ISO image… option

2

 

From file open dialog box select Virtual Disk Precompactor.iso.  This ISO file is generally located under \Program Files\Microsoft Virtual PC\Virtual Machine Additions.

 

The precompactor tool should run automatically. This will take some time to compact your disk.

 

Once done, shut down virtual pc.

 

Note: This tool requires free space equivalent to the virtual hard disk being compacted.

 

3. Run Virtual disk wizard

3.1 Launch Virtual PC console and select the virtual machine.

 

3

 

3.2 Click on Settings button. Select Hard Disk at the left panel and click Virtual Disk Wizard.

 

 

4

 

 

3.3 This will launch Virtual Disk Wizard. On this wizard click Next

 

5

 

3.4 Select Edit an existing virtual disk. Click Next and browse to the virtual disk you want to compact, click Open

 

6

 

3.5 Click Next and select Compact it and click Next

 

7

 

3.6 You have the option whether to replace original virtual disk or save it in another file. Select the option you desire to choose and click Next and then click Finish and start the compaction

 

 

8

 

 

July 21

Known issues with WCF in Dot Net 3.5

 
As mentioned in my last article, here are the known issues with the release that apply to WCF:
 
  • Issue - The WCF (Windows Communication Foundation) service library template in Orcas does not run correctly. 
    Reason - The WCH service librayy template will not run correctly if wcfSvchost.exe is not available. The wcfSvcchost.exe tool requires administrator permissions to run.   
    Solution - Run Orcas under an Administrator account when you author services by using wcfSvchost.exe.

  • Issue - WCF (Windows Communication Foundation) Service Configuration Editor does not exist on the Orcas Tools menu
    Reason
    - The SDK installed does not contain WCF editor.
    Solution - Install the Windows SDK, which includes the editor. The svcConfigEditor.exe is located on the Windows Start menu.

  • Issue - When an ASMX or WCF service is consumed on remote desktop the following error occurs :
    "The HTTP request is unauthorized with client authentication scheme 'Anonymous'. The authentication header received from the server was 'NTLM'."
    Reason - Consuming an ASMX or Windows Communication Foundation (WCF) service for a file-based Web site or application requires NTLM credentials when the user is a not an administrator and is using Remote Desktop
    Solution - Follow below steps
    1. Open the property pages for the Web sites.
    2. In the Start Options tab, uncheck NTLM Authentication
    Note: This is only advised for Web sites that exclusively have WCF services. WCF services security is managed through the configuration in the web.config file, which makes NTLM Authentication unnecessary.

  • Visual Basic LINQ in Windows Communication Foundation (WCF) Projects and through MSBuild: Option Infer is not propagated

    LINQ relies on a new feature called Local Variable Type Inference to implicitly infer strongly-typed local variables based on the value of the right-hand side of an assignment. This feature is controlled by a compiler setting, Option Infer, which by default is on for most new projects. In WCF projects and in MSBuild compilations, the setting for Option Infer is not propagated.

    To resolve this issue:

    Put "Option Infer On" at the top of all source files that use LINQ.

  • Windows Communication Foundation (WCF) debugging is not enabled by default

    By default, the debugging of WCF Services is not enabled in Orcas because that would break some important non-debugging scenarios, including partial trust HTTP hosting of services and Workflow-first authored services.

    As a result, the following debugging scenarios are not enabled out of the box:

    • Stepping from a WCF client into a WCF server
    • Stepping back to the WCF client after a server call completes
    • Getting a logical callstack showing the WCF client and WCF service stack
    • Auto-attaching to WCF services invoked by the WCF client.

    To resolve this issue:

    Orcas provides a tool to enable and disable the debugging of WCF client-service applications.

    To enable WCF debugging:

    1. Open a command prompt and navigate to the location where the Orcas executable is located, typically %ProgramFiles%\Microsoft Visual Studio 9.0\Common7\IDE.
    2. Run vsdiag_regwcf.exe –i
    3. The command will output "Command completed successfully." if WCF debugging was successfully enabled.

    To disable WCF debugging:

    1. Open a command prompt and navigate to the location where the Orcas executable is located, typically %ProgramFiles%\Microsoft Visual Studio 9.0\Common7\IDE.
    2. Run vsdiag_regwcf.exe –u
    3. The command will output "Command completed successfully." if WCF debugging was successfully disabled.

    To determine whether WCF debugging is enabled:

    1. Open a command prompt and navigate to the location where the Orcas executable is located, typically %ProgramFiles%\Microsoft Visual Studio 9.0\Common7\IDE.
    2. Run vsdiag_regwcf.exe –s
      This is a sample of the command's output:

      Microsoft (R) Visual Studio (R) Diagnostics WCF Registration tool - Version 9.0.20104.0
      (C) Microsoft Corporation. All rights reserved.

      Current status .NET Framework configuration file

      Registered D:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\config\machine.config

      Command completed successfully.
  • Some WCF samples that ship with the .NET Framework 3.5 SDK (Orcas Beta 1) are broken and will not run

    The following WCF samples will not work on Orcas:

    • TechnologySamples\Basic\Binding\Net\Msmq\Batching
    • TechnologySamples\Basic\Binding\WS\DualHttp
    • TechnologySamples\Basic\Contract\Service\Duplex
    • TechnologySamples\Basic\Service\Hosting\WASHost\NamedPipeActivation
    • TechnologySamples\Scenario\RestPox (issues on Windows Vista)
    • TechnologySamples\Scenario\DataBinding\WPF
    • TechnologySamples\Scenario\RichClient
    • TechnologySamples\Extensibility\ErrorHandling
    • TechnologySamples\Extensibility\Metadata\Custom WSDL publication
    • TechnologySamples\Extensibility\Channels\CustomChannelDispatcher

    To resolve this issue:

    To run these samples, use .NET Framework 3.0.

  • The WebScriptServiceHostFactory class does not work with HTTP GET operations

    The WebScriptServiceHostFactory class is designed to enable Windows Communication Foundation services to be used to serve data to AJAX-enabled Web pages without having to write WCF configuration settings. In this Orcas release, the WebScriptServiceHostFactory class does not work with WCF operations that have been configured so that the HttpTransferContractAttribute attribute uses the HTTP GET verb. You may get an error about an AddressFilter mismatch if you attempt to use it with such operations.

    To resolve this issue:

    Avoid using HTTP GET operations and use HTTP POST instead. If this is impossible, then instead of using the WebScriptServiceHostFactory, create a WCF configuration section in web.config or another configuration file as appropriate and then use it to enable an AJAX endpoint. (Also see note 2.4.15 about endpoint URLs that end directly with ".svc".)

  • Windows Communication Foundation (WCF) AJAX endpoints at URLs immediately ending with ".svc" do not work with HTTP GET operations

    In this release, it is possible to use the Windows Communication Foundation to write IIS-hosted services that can be consumed from AJAX-enabled Web pages. These services can be hosted at endpoints with URLs that end directly with ".svc" (for example, "http://example.com/myService.svc") or at endpoints with URLs that end with an additional suffix (for example, "http://example.com/myService.svc/myEndpoint"). In this release, the URLs without a suffix do not work with WCF operations that have been configured with the HttpTransferContractAttribute attribute to use the HTTP GET verb, unless a workaround is applied. You may get an error about an AddressFilter mismatch if you try to use such URLs with GET operations.

    To resolve this issue:

    There are three ways to resolve this issue.

    • Use URLs with suffixes, and remember to include the suffix if you are using such a URL in the ASP.NET AJAX Script Manager control.
    • Avoid using HTTP GET operations and use HTTP POST instead.
    • Disable the service help page to resolve the issue. This can be accomplished by adding the following service behavior to the <behaviors> section of WCF config:
      <serviceBehaviors>
          <behavior name="noHelpPage">
              <serviceDebug httpHelpPageEnabled="false"/>
          </behavior>
      </serviceBehaviors>
      Add it to your service (i.e. <service behaviorConfiguration="noHelpPage" …>) in the <services> section).
  • Adding a Windows Communication Foundation (WCF) service to the ASP.NET AJAX Script Manager Control does not work in Script Inlining mode

    In this release, it is possible to use the Windows Communication Foundation to write services that can be consumed from AJAX-enabled pages. To work with the ASP.NET AJAX framework, references to such WCF services must be added to the Script Manager control. The Script Manager control enables you to inline service references by setting the InlineScript property to "true" on a particular service reference in the Services collection. In this release, WCF services are incompatible with the InlineScript="true" mode. You may get an InvalidCastException if you attempt to use this mode.

    To resolve this issue:

    Set the InlineScript property for all WCF services in the Script Manager control to "false".

  • Modifications required to support 64bit applications that use WF or WCF

    To support native 64bit applications that use WF or WCF, manual modifications to the configuration are required.

    To resolve this issue:

    For selfhosted applications, the following modification to machine.config is required:

    1. Navigate to: %windir%\Microsoft.NET\Framework64\v2.0.50727\CONFIG\machine.config in any text editor, such as Notepad.exe
    2. Add the following content at the end of the file just before </configuration>
      <system.serviceModel> 
          <extensions> 
              <behaviorExtensions> 
                  <add name="persistenceProvider" type="System.ServiceModel.Configuration.PersistenceProviderElement, System.WorkflowServices, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/> 
                  <add name="workflowRuntime" type="System.ServiceModel.Configuration.WorkflowRuntimeElement, System.WorkflowServices, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/> 
                  <add name="enableWebScript" type="System.ServiceModel.Configuration.WebScriptEnablingElement, System.ServiceModel.Web, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/> 
                  <add name="syndication" type="System.ServiceModel.Configuration.SyndicationElement, System.ServiceModel.Web, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/> 
              </behaviorExtensions> 
              <bindingElementExtensions> 
                  <add name="jsonMessageEncoding" type="System.ServiceModel.Configuration.JsonMessageEncodingElement, System.ServiceModel.Web, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/> 
                  <add name="context" type="System.ServiceModel.Configuration.ContextBindingElementExtensionElement, System.WorkflowServices, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/> 
              </bindingElementExtensions> 
              <bindingExtensions> 
                  <add name="wsHttpContextBinding" type="System.ServiceModel.Configuration.WSHttpContextBindingCollectionElement, System.WorkflowServices, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/> 
                  <add name="netTcpContextBinding" type="System.ServiceModel.Configuration.NetTcpContextBindingCollectionElement, System.WorkflowServices, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/> 
                  <add name="webHttpBinding" type="System.ServiceModel.Configuration.WebHttpBindingCollectionElement, System.ServiceModel.Web, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/> 
              </bindingExtensions> 
          </extensions> 
          <client> 
              <metadata> 
                  <policyImporters> 
                      <extension type="System.ServiceModel.Channels.ContextBindingElementImporter, system.workflowservices, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL"/> 
                  </policyImporters> 
                  <wsdlImporters> 
                      <extension type="System.ServiceModel.Channels.ContextBindingElementImporter, system.workflowservices, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL"/> 
                  </wsdlImporters> 
              </metadata> 
          </client>
      </system.serviceModel>

    For applications hosted within IIS, there are two possible workarounds:

    A. Configure IIS to run in WOW mode:
    cscript %SYSTEMDRIVE%\inetpub\adminscripts\adsutil.vbs SET W3SVC/AppPools/Enable32bitAppOnWin64 1

    Windows XP, Windows 2003

    1. Open a command prompt and navigate to the %systemdrive%\Inetpub\AdminScripts directory.
    2. Type the following command: cscript.exe adsutil.vbs set W3SVC/AppPools/Enable32BitAppOnWin64 "true"
    3. Press ENTER
    4. Enable 32-bit aspnet by using %windir%\Microsoft.NET\Framework\v2.0.50727\aspnet_regiis.exe –i –enable
    5. Reset iis by using iisreset

    Windows Vista

    1. Open a command prompt and navigate to the %systemdrive%\Inetpub\AdminScripts directory.
    2. Type the following command: cscript.exe adsutil.vbs set W3SVC/AppPools/Enable32BitAppOnWin64 true
      Note: If this script is not already available, turn on Internet Information Services, Web Management Tools, IIS 6 Management Compatibility, IIS 6 Scripting Tools. This will place the scripts in the above mentioned location.
    3. Press ENTER

    B. Update %windir%\Microsoft.NET\Framework64\v2.0.50727\CONFIG\web.config by adding the following:

    1. Add the following to the end of the Xml element "system.web/compilation/assemblies":
      <add assembly="System.ServiceModel.Web, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>
      <add assembly="System.WorkflowServices, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>
    2. Add the following to the end of the xml element "system.web/compilation/buildProviders":
      <add extension=".xoml" type="System.ServiceModel.Activation.WorkflowServiceBuildProvider, System.WorkflowServices, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>
    3. Add the following to the beginning to the xml element "system.web/httpHandlers":
      <add path="*.rules" verb="*" type="System.Web.HttpForbiddenHandler" validate="true"/>
      <add path="*.xoml" verb="*" type="System.ServiceModel.Activation.HttpHandler, System.ServiceModel, Version=3.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" validate="false"/>
  • Windows Communication Foundation (WCF) Samples setup script Setupvroot.bat will not work on Windows Vista if the NetMsmqActivator service is enabled and Message Queuing (MSMQ) is not installed

    The iisreset utility does not work unless MSMQ is installed or the NetMsmqActivator service is disabled. The WCF Samples setup script Setupvroot.bat will not run unless MSMQ is installed or the NetMsmqActivator service is disabled.

    To resolve this issue:

    Make sure that MSMQ is installed or disable the NetMsmqActivator service on Windows Vista before you run the WCF Samples setup script Setupvroot.bat.

  • Only the online version of the Windows Communication Foundation (WCF) and Workflow Foundation (WF) samples for .NET Framework 3.5 will compile and run

    The offline WCF and WF samples that are included with Orcas Beta 1 do not compile or run.

    To resolve this issue:

    Download the online versions of the Orcas Beta 1 samples for .NET Framework 3.5.

  • Service Model Metadata Utility Tool (SvcUtil.exe) Can Throw InvalidChannelBindingException when importing WSDL from certain endpoints

    Although Windows Communication Foundation (WCF) allows the setting of the ReliableSession Binding Element InactivityTimeout or AcknowledgementInterval properties to TimeSpan.MaxValue, WCF will not consume WSDL generated by an endpoint with such settings. Instead, the import will fail and SvcUtil.exe will throw an InvalidChannelBindingException.

    To resolve this issue:

    After you download the WSDL, manually change the TimeSpan.MaxValue to 2147483647 (Int32.MaxValue). Then, in the generated configuration file, change the inactivityTimeout or acknowledgementInterval attribute from "24.20:31:23.6470000" to "Infinite".

 
September 09

Dot Net 3.5 "Orcas" Beta - Whats in

Microsoft has once again hit in the news of new releases. This time with "Orcas".

What is Orcas?

Its a new version of Microsoft .NET Framwork - "The Microsoft .NET Framework 3.5 Beta 1".  The .NET Framework 3.5 which is cent percent backward compatible, adds many new exciting features in several major technology areas; including:

  • Deep integration of Language Integrated Query (LINQ) and data awareness
  • ASP.NET AJAX for quickly creating more efficient, more interactive and highly-personalized Web experiences that work across all the most popular browsers
  • New web protocol support for building WCF services including AJAX, JSON, REST, POX, RSS, ATOM and several new WS-* standards
  • Full tooling support for WF, WCF and WPF including the new workflow-enabled services technology
  • New classes in the base class library (BCL) for the .NET Framework 3.5 address the most common customer requests.

.NET Framework 3.5 is planned to release at the end of 2007 and will ship with Visual Studio code name ”Orcas” and will also continue to be available for separate download from MSDN.

For more detail about the features being introduced in .NET Framework 3.5 and Visual Studio code name “Orcas”, click here http://msdn2.microsoft.com/en-us/vstudio/aa700830.aspx.

Here are the downloads to get:

However their are few known issues with the release. which I will list in my next article. 

Thanks

 

 

 
December 08

Forgotten Heroes

Just saw a news on one of the site about Sanjubaba's (Sanjay Dutt, Indian Film Actor) visiting some known personalities to thank them for helping him out in his bad times. In recent past its everywhere in Indian news channel how things were with Sanju baba and his family.
 
And then many experts like Salman khan saying 'He is a good person. We knew he will come out clean' Mr. Big B 'Datt family and our family have relations for years he's a good kid. He is like elder brother to abhishek'. 
 
Surfing through some news site, one news startled me, it read, Hisbul Mujahidin's Most wanted terrorist 'Sohel Faisal' killed in anantnag, India. Indian Major leading the operation lost his life in the process. Four others are injured.
 
Did these experts (mentioned above) uttered a word for Major????
 
Sure Sanjubaba has a daughter; sure sanjubaba did not do any terrorist thing as in bombing some place or hijacking an airplane etc. Possessing an AK47 is considered too elementary in terrorist community and also one who possesses an AK47 has a right to possess a pistol so that again is not such a big crime; Sure sanjubaba went to all the temples; Sure he did a lot of gandhigiri but then..., people. please read on...
 
Major Manish H Pitambare got the information from his sources about the terrorists' whereabouts. Wasting no time he attacked the camp killed the Hisbul mujahidin's suprimo and in the process lost his life... To the bullets fired from an AK47..

He has a wife and a daughter (just like sanjubaba), age ...18 months. Major Manish never said 'I have a daughter' .before he took the decision to attack the terrorist hide out in the darkest of nights?
 
He never thought about having a family and he being the bread earner.
 
No news channel covered this since they were too busy hyping a former drug addict, an actor in real and reel life, a suspect who's linked to
bomb blasts which killed hundreds. Their aim was to show how he defied the TADA charges and they were so successful that his conviction in possession of armory had no meaning. They also concluded that his parents in heaven must be happy and proud of him.. BULL SHIT
 
Parents of Major Pitambare are still on this earth and they have to live rest of their lives without their beloved son. His daughter won't ever
see her papa again.
 
But today no body knows what Major's family will be going through. No news channel is bothered about that, simply because that doesnt ment money for them.
 
It is most unfortunate that the real stars(unsung heroes) rarely get acknowledgement.
 
We need a thorough introspection and stock taking of the events that unfold and have to give support to the right cause.
 
Only when people become discerning and voice their concern about cheap publicity and improper reporting, will the new order take shape. I feel we all have to play a better role in society if real heroes like Major Pitambar deserve credit.
 
Salute to you Major...
 
*Vande mataram. Jai Jawan. Jai Hind.*




 
 

Rahul Kansara

Occupation
Location

Quote of the Day

Loading...