Thursday, November 26, 2009

Mastlog.ldf" is compressed but does not reside in a read-only database or filegroup.

I install a lot of trial & beta softwares to get a first feel of the application. So I usually keep all the services disabled. I had kept the SQL server also disabled for quites some time. Today when i tried to start it again it refused :(.. (it seems that she was angry for leaving her alone).


When i checked the event viewer i saw the following message 



The file "C:\Program Files\Microsoft SQL Server\MSSQL.2\MSSQL\DATA\mastlog.ldf" is compressed but does not reside in a read-only database or filegroup. The file must be decompressed.


For more information, see Help and Support Center at http://go.microsoft.com/fwlink/events.asp.


so the compression was the culprit :) ( to save space windows had compressed these folders )


I opened "c:\Program Files\Microsoft SQL Server\MSSQL.2\MSSQL\DATA\" and uncompressed all the files in it by select the advanced properties of the files & un-checking - compress contents to save disk. Now it works like a brand new BMW :)

Tuesday, November 10, 2009

Viewstate error : 12031


Few days ago I was asked to look into an issue. In our application we have created dynamic grids to show data from database. This ASPX page was Ajax enabled. Moreover all the rows of the grid were in edit mode ie. the normal controls like textbox,dropdowns etc  were displayed in all the rows. This grid was Paginated. But for the past few days the paging was not working.
I executed the page and found that the page was generating an error 12031  with the following message

Sys.webForms.PageRequestManagerServerErrorException:An unknown error occurred while processing the request on the server .the status code returned from the server was:12031.

On my first round of analysis I found the issue with Viewstate. If the viewstate is large then connection is reset (ERROR_INTERNET_CONNECTION_RESET ). In local machine with less load this problem will not occur but as the load & network latency increases this error will come. Once this error is generated the general events of grid is not triggered. So advised my team to minimize the use of viewstate. It will help in to load the page faster & reduce the network traffic. I can increase the maxRequestlength value to allow more data but ideally i shouldn't increase that.

Add Web service reference- Components required to enumerate web references not installed


After playing with Web services for so many years this was a tricky error which kept me thinking for few minutes.
 Today when i tried to add WCF reference to my application it gave the following error,
Error
---------------------------
Microsoft Visual Studio
---------------------------
Failed to update Service Reference 'XXXBusiness.Reference'.
Error:The components required to enumerate Web references are not installed on this computer. Please re-install Visual Studio.(0x80004002)

WCF 8192 issue

This was a simple issue which baffled few brains in my project. For the past few weeks i was seeing the mails about this. What was the exact problem?
 Whenever a large xml stream is passed through WCF it generated the following error. Everything was fins at the ASP.net client side. Almost all the known properties of
 
Problem:
The maximum string content length quota (8192) has been exceeded while reading XML data. This quota may be increased by changing the MaxStringContentLength property on the XmlDictionaryReaderQuotas object used when creating the XML reader.

Cause: 
By default WCF allows a string content of size 8192 (8K) to pass through without any problems. If the size increases above this set limit WCF treats the incoming message as bad message & hence throws an exception. This level was set considering the security aspect of distributed system.

If we have to pass more data we will have to manually override this default setting.

Now here the trick. Everyone looked at the client side but there is a server part also :)

When a WCF client is created  automatically all the properties required to run that service is added by default by visual studio.