Thursday, July 15, 2010

Cannot add duplicate collection entry of type 'add' with unique key attribute 'name' set to 'RewriteModule' - HTTP Error 500.19 - Internal Server Err

When I uploaded the site to the server, I got an HTTP Error 500.19 - Internal Server Error which says "Cannot add duplicate collection entry of type 'add' with unique key attribute 'name' set to 'RewriteModule'". Error was in the following line in web.config


I got the solution to change the application config file from the following link:
http://support.microsoft.com/kb/942055

But, hosting providers won't allow that on server.

I added the following under where the RewriteModule is added

Also, there were some virtual directory issues. Hosting provider
changed that. Now it is working.

Friday, July 9, 2010

Issue when using AsyncFileUpload control

4:14 AM Posted by Unknown , , No comments
I tried to use AsyncFileUpload control in a page. The AsyncFileUpload control was placed inside the first view of a multiview control. The page required a querystring parameter, and if the parameter is not present, the second view of the multiviewcontrol will be shown. This check is made on the Page Load event. This causes issue on the fileupload process. It was giving error, since on the postback, it gets another view. So, I did like this.

on the event "OnClientUploadStarted
", I gave a value to a hidden element, and on page load, a checking is made, to see, if the value is given for the hidden element. If the value is given, the view1 itself will be shown without checking the availability of querystring parameter.

Don't know if that is the correct method. Anyhow, it worked.

Wednesday, July 7, 2010

Tuesday, July 6, 2010

Generate sql script with data from database

11:39 PM Posted by Unknown No comments
How can we copy data as well the structure and schema as sql query? We need database publishing wizard for that.

Download the database publishing wizard.
It will be installed at following location : C:\Program Files\Microsoft SQL Server\90\Tools\Publishing\

run the exe and you can get the sql file with all the data, schema and structure of the database you select.

Thursday, July 1, 2010