Monthly Archives: March 2013

[FIX] Validation of View State Mac Failed….

Everyone thinks configuring a website on web farm is easy, just needs to follow below steps

  1. Ensure the website ID is same on all servers
  2. Ensure machinekey is same on all servers
  3. Ensure session mode is state server
  4. If required add < Pages enableviewstatemac=”false” /> in web.config

Even I was also thinking the same and for some extends it is perfectly fine.

We had one 4.0 application developed using spring and one ajax webpage clients were getting below error only in CHROME while in IE it was working perfectly fine.

When I reported this issue I re-checked above 4 things and it was in place, its now a challenging task to make the application compatible to all browsers.

Started studying of <Pages /> attributes for web.config (why only pages attribute because website it was working fine for all pages except one )

And after lot of readings and compatibility check for web farm added below attributes in <Pages /> tab

<pages controlRenderingCompatibilityVersion=”3.5″ clientIDMode=”AutoID” enableEventValidation=”false” viewStateEncryptionMode=”Never” />    

In this tag every attribute has different meaning .

controlRenderingCompatibilityVersion=”3.5″ :- means consider every control as framework 2.0
while rendering it on page

clientIDMode=”AutoID” :- is used for ajax filtering

enableEventValidation=”false” :- If you browse to the page from another page via link inside a gridview and response.redirecting in the RowCommand event to the page passing an ID in the querystring. The page throws errors from controls inside the panel stating

therefore recommended that you set it to false only on the individual AJAX pages where it causes problems, while leaving it true in web.config.

As you would expect, in this mode ASP.NET will not encrypt the ViewState, even if the application is set for encryption and controls on the page have requested it. If you know that no data involved in the page needs to be encrypted, then it may be safe to set the mode to Never. However, at this point it is rare for the documentation about a control to disclose what is being saved in ViewState, so you will want to be careful if there is a chance that sensitive data could be exposed.

After adding the above tag in web.config , magic worked and it started working in all browsers including CHROME . It was the happiest moment for me after receiving call from client that it is working smoothly.



Prashant Deshpande









Leave a comment

Filed under Uncategorized

Resolve Hidden Devices issue.

Resolve hidden network adapters Issue from virtual machines


Today morning I came through an incidence as , on one of server when I tried to open TCP/IP properties and without any change clicked on OK button it has given below error message


This is a Virtual System and this happens when we load an image from your backup. This will sometime cause network connectivity issues, due to the fact that other network adapters will still be configured (hidden) in the device manager which still lock your IP address. This will also cause the issue whereby although you configure the current network adapter (as seen in the Device Manager), no network activity can be achieved. Unfortunately these devices will not show directly in your device manager, so the following steps must be taken.

This can easily be removed by opening the command prompt with administrative access and typing the following command:

set devmgr_show_nonpresent_devices=1
start devmgmt.msc

It will open Device manager window but we need to click à View à Show hidden devices option

This will start the Device Manager. It is important to start the Device Manager from the same command prompt, since it will lose the setting to show the non-present devices. If you open the Device Manager from the Control panel, the hidden devices will not show.

When the Device Manager loads, from the File menu, expand the View and select the Show Hidden Devices option. This will enable and show any old un-used devices in the window. From here, expand the Network Adapters node and you can right click on the devices which are extra and UNINSTALL them accordingly.

After this is done, your network adapter will be free and you can set up the correct network settings. This method of hidden device removal can be used for any type of device. Since this option may come in handy in your daily job.


Prashant Deshpande

Leave a comment

Filed under Uncategorized

[SOLVED]:MSDB size grown huge

MSBD Size getting increased in GBs

On one day morning I seen c:\ drive of SQL SERVER got reduced to 10 MB free space and after using disk space fan free tool found it was MSDB which has used 19 GB .

As msdb is a system database its very risky to work with this database as it keep all information about database server users/SQL jobs and result sets of all jobs …etc

To identify which table used huge size executed the TSQL command

select object_name(p.object_id), p.index_id,, sum(total_pages)/128, convert(varchar(10), getdate(), 101), count(*) as partitions

from sys.partitions p join

sys.allocation_units a on p.partition_id = a.container_id join

sys.filegroups f on a.data_space_id = f.data_space_id

group by p.object_id, p.index_id,

order by sum(total_pages)/128 desc


the above query shown that the major space is used by table BACKUPSET ( 14 GB ).


This is table which will get used by SQL jobs created by Maintenance Plan for backup of databases so decided to delete all record from this table


But when delete from backupset command fired, SQL server given error of FK constraint for backupfile table and then for backupfilegroup table


So followed below steps

  1. Stopped SQL Agent service
  2. As c:\ was not having space first I need to move LDF file on different drive so used command


  3. Restarted SQL server
  4. Then execute command in sequence as below

    Delete from backupfile

    Delete from backupfilegroup

    delete from restorefile

    delete from restorefilegroup

    delete from restorehistory

    Delete from backupset

    delete from backupmediafamily

    delete from backupmediaset

  5. The msdb database size come to 7 GB after all above process. J



Prashant Deshpande

Leave a comment

Filed under Uncategorized