WCF 8192 issue

November 10, 2009 at 6:27 pm | Posted in Uncategorized | Leave a comment
Tags: ,

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.

 

http://thetechjungle.blogspot.com/2009/11/wcf-8192-issue.html

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

November 10, 2009 at 6:25 pm | Posted in Uncategorized | Leave a comment
Tags: , , ,

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.(0×80004002)

http://thetechjungle.blogspot.com/2009/11/add-web-service-reference-components.html

Viewstate error : 12031

November 10, 2009 at 6:23 pm | Posted in Uncategorized | Leave a comment
Tags: , , ,
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.

Read more » http://thetechjungle.blogspot.com/2009/11/viewstate-error-12031.html

SQL Server Management Studio query template

November 23, 2008 at 4:56 pm | Posted in Uncategorized | Leave a comment
Tags: ,

Last day I was working on SQL server and I got this strange error

—————————
Microsoft SQL Server Management Studio
—————————
Cannot find template file for the new query (‘C:\Program Files\Microsoft SQL Server\90\Tools\Binn\VSShell\Common7\IDE\SqlWorkbenchProjectItems\SQL\SQLFile.sql’).
—————————
OK

At first I thought my SQl server installation was corrupt. I changed few settings, tried to repair but no use.

Solution:
Actually the solution was very simple. I just created an empty file SQLFile.sql in the designated folder and then it started working. Now this gave me a new idea. I could add my own template and every time I open SSMS I will get this template. Phew


Blog at WordPress.com. | Theme: Pool by Borja Fernandez.
Entries and comments feeds.

Follow

Get every new post delivered to your Inbox.