Archive for the ‘Microsoft Related’ Category

Microsoft Bing: Much better than expected | Webware – CNET

Microsoft Bing: Much better than expected | Webware – CNET

Posted using ShareThis


Launching Executables (showing GUI) from Web Services deployed in IIS

October 16, 2008 8 comments

Recently one of my senior colleague was faced with a problem of launching executables from Web Services hosted in IIS. Following is the problem he was faced with (as is email),

“I am working on a dotNet web service that needs to launch an executable (.exe). I have used System.Diagnostics.Process to launch the process. When I run through VS2005 test environment, web service triggers the executable and its UI is displayed (e.g., launching notepad). But when I deploy the web service under IIS, the web service does launch the process but UI does not appear.

Can someone shed some light on what is happening and suggest a solution to this”

After searching on the internet I found the following solution and it worked fine.

According to Microsoft following are the reasons for this

1.    By default, ASP.NET runs its worker process (Aspnet_wp.exe) with a weak account (the local machine account, which is named ASPNET) which don’t have permission to interact with desktop.
2.    By default, IIS Admin Service won’t allow its application to interact with desktop.

These can be resolved by:

1.    Allowing worker process(ASP.NET) to run in SYSTEM account.
This can be done by editing the machine.config file which is located at (C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\CONFIG. Open the machine.config and find the ProcessModel tag and add the following attributes to it,

userName=”SYSTEM” password=”AutoGenerate”

2.    Enable IIS Admin Service to interact with desktop. To configure this, follow this steps.

a)    Open Control Panel and follow these steps:
For Windows NT: click Services.

For Windows 2000, Windows XP, and .NET Server: click Administrative Tools, and then click Services.
b)    Double-click IIS Admin Service.

c)     On the Log On tab, select the Allow Service to Interact with Desktop check box.

d)    Stop and restart the IIS Admin Service.

3.    Sometimes ASP.NET account does not have enough privileges to access certain WMI namespaces. So to resolve this do the following

a)    Open the Computer Management Microsoft Management Console (MMC) snap-in.
b)    Expand Services and Applications, and then select WMI Control.
c)    Right-click WMI Control, and then click Properties.
d)    In the WMI Control Properties dialog box, click the Security tab.
e)    Expand Root, select CIMV2, and then click Security.
f)    In the Security dialog box, click Advanced.
g)    In the Access Control Settings dialog box, click Add. Select localMachineName\ASPNET, and then click OK.
h)    In the Permission Entry dialog box, make sure that Apply Onto is set to This namespace and subnamespaces.
i)    Make sure that the Allow ‘Enable Account’ and Allow ‘Remote Enable’ check boxes are selected.
j)    Click OK in each dialog box until you return to the WMI Control Properties dialog box.
k)    Repeat steps 5 through 10 for other WMI namespaces that your application will access.
l)    Restart IIS. To do this, run IISRESET from the command line.

Information obtained from:;en-us;317012


Folder Options Diasbled, Task Manager Disabled, Registery Editor Disabled

October 16, 2008 2 comments

This post will be about enabling the folder options, taskmanger and registry editor after they are disabled/not visible. These kind of things are usually consequence of viruses specially “Brontok” trojan which can be deleted by anti-virus. I am writing the solutions, but chances are if these things are caused by virus
really then after restart, these options(folder options, task manager) will again be disabled so use a good anti virus like NOD32 (preferable) or AVG and remove the virus. And then enable
the options as I am telling.

For restoring the folder options do the following.

1. Write regedit at run and open the registery editor.
2. Now locate the following key,

HKEY_CURRENT_ USER\Software\ Microsoft\ Windows\CurrentV ersion\Policies\ Explorer


HKEY_LOCAL_MACHINE\ Software\ Microsoft\ Windows\CurrentV ersion\Policies\ Explorer

And in right-side pane, check whether a DWORD value named NoFolderOptions exists or not? If it exists then either change its value to 0 or delete it.

I hope this resolves your problem of Folder Options in tools menus.
Btw we can access it from Control Panel also.

-If registery editor is also disabled or locked do the following.

1. Write gpedit.msc at run and open the groups policy editor.
2. In the left side tree view locate the User Configuration node and expand it. Now locate the Administrative Templates and expand it also. Now locate System. Now don’t expand it and clicking on it look for the
options in the right view. Locate the item “Prevent access to registry editing tools”. Edit it’s properties and change it to disabled.

If task manager is disabled do the following.

1. Write gpedit.msc at run and open the groups policy editor.
2. In the left side tree view locate the User Configuration node and
expand it. Now locate the Administrative Templates and expand it also.
Now locate System and find Ctrl+Alt+Del Options in it. Left click it once and look for the options in the right side list view. Double Click the option Remove Task Manager and change it’s current setting to Disabled. If it’s already disabled you still have to change the setting to any other value and than change it to Disabled just to refresh it. Be sure to refresh the windows and task manager will be enabled.

I hope this much helps. But I will seriously recommend to scan and clean the system completely with some anti-virus.

Windows Live Writer !

August 15, 2006 1 comment

I wrote this post using Windows Live Writer. Yes the Windows Live Writer has been released and can be used to publish posts for any blogging service. Have a look at here for further details.

Categories: General, Microsoft Related

Managed C++ – C++/CLI

July 25, 2006 1 comment

I am working on an interesting image processing and recognition project here in my office and it is a very wonderful work experience. Out of many things I have learnt, the most valuable thing is experience with Managed C++ (C++ for CLI). I have to write some core functionality classes and wrapper dll’s on calling Viisage SDK’s APIs which are written in native C++. To include these header files along with source code I had no other choice than to choose Visual C++.NET. In start I faced a lot of problems in dealing with managed and unmanaged code, conversion of native types to MS.NET types and vice versa and other issues of native C++. With time, extensive effort and lot of search now I am at ease with doing any thing in Managed C++ that I can do in C#. I will be writing some most valuable APIs that were no less than a blessing for me used in conversion of native to managed, managed to unmanaged code and other issues of handling .NET things in C++ the C++ way.

P.S: Having power of native C++ and Microsoft.NET in same language is beautiful.

About MS.NET 3.0 !

The Microsoft .NET Framework 3.0 (formerly known as WinFX), is the new managed-code programming model for Windows. It is the standard set of APIs for Windows Programming and .NET 2.0. I found this very useful artcile on use of MS.NET 3.0. Hope all enjoy readng it too.