Code Simplified – Viral Sarvaiya

Code Simplified – Viral Sarvaiya, Web Developer Friends, dot net Developer, Sql Server Developer

Archive for January, 2012

Prevent Silverlight XAP file from caching in your browser.

Posted by Viral Sarvaiya on January 19, 2012

Sometime when we deploy silverlight project, that happen often that when you run website it run older deploy project. because that comes from the cache,

so clear the cache of the Browser and some time that problem occur also after clearing cache.

so for that we have to force website to download new version of xap file every time when it run.

normally we have tag for XAP file, as like below

<param name="source" value="/ClientBin/SilverApp.xap" />

but we have to download our XAP file new at every run of site.

so there so many option for that.

1) changing the Assembly and File version numbers

2) GUID value for the project

but, here is the simple and best solution for that and then it worked like a charm everytime.

<param name="source" value="/ClientBin/SilverApp.xap?ignoreme=<%=System.DateTime.Now.ToUniversalTime()%>" />


Posted in .Net, ASP.NET, Silverlight | Tagged: , , , , , , , , , | 1 Comment »

SQL Reporting Services Error- Maximum request length exceeded

Posted by Viral Sarvaiya on January 16, 2012

Today i upload all report of my project and get error

Error : There was an Exception running the extension specified in the config file –> maximum request length exceeded.

The basic problem here, is that your posting an amount of data to a web app larger than it is configured to accept.  Hence, it is throwing an error, and simply saying “no!”

It’s an easy fix though! You’ve got to tweak the web.config for the web app, which in the case of reporting server, is usually somewhere like this:

C:\Program Files\Microsoft SQL Server\MSRS10_50.SQLEXPRESS\Reporting Services\ReportServer

Find the web.config file for your reporting services instance, open it up, and track down the line that looks something like this

<httpRuntime executionTimeout = "9000" />

Now just add a max request length attribute in there to fix the problem, adjust your size as needed.  This is 5meg.

<httpRuntime executionTimeout = "9000" maxRequestLength="500000" />

And now you’ll need to restart IIS.  start->run->”iisreset”


Posted in Report | Tagged: , , , , , , , , | 1 Comment »

RESEED/Reset Table Identity Value in sql server

Posted by Viral Sarvaiya on January 6, 2012

DBCC CHECKIDENT can reset the identity value of the table,

For example if table has 500 reords and not we want to delete all records or want to start data from 600 then this command will help us.

DBCC CHECKIDENT (Table_name, reseed, 0)


DBCC CHECKIDENT (Table_name, reseed, 600)

Most of our identity we start with 1 so must have to take care that identity set to 0.

If identity is set below values that currently are in table, it will violate the uniqueness constraint as soon as the values start to duplicate and will generate error.


Posted in Sql Server | Tagged: , , , , , , , , , , , | Leave a Comment »

%d bloggers like this: