Sunday, February 19, 2012

RenderAction and Action

The difference between the two is that Html.RenderAction will render the result directly to the Response (which is more efficient if the action returns a large amount of HTML) whereas Html.Action returns a string with the result.

Thursday, December 22, 2011

Textmode Password set but not loaded

when setting text in the asp:textbox from serverside its not loaded. the workaround is to set like this:

txtPassword.Attributes("value", p@ssword )

umbraco in godaddy securityexcepion and xslt parsing

set requirePermission=" for clientDependency, Examine and ExamineLuceneIndexSets in webconfig. Then delete all the SQLCE files from bin. Delete the sdf in app_data if there is. then you are god to go.



Wednesday, November 30, 2011

The data area passed to a system call is too small

I saw this error in Vb .Net. Its actually passing lots data in the query string like viewstate values. The problem was I defined the webpage form with method to get but it should post. It was confusing because I worked locally but on the server I was getting this error.

Thursday, October 27, 2011

Add Mimetype to IISExpress

  1. Open a windows command prompt
  2. Switch to the directory that IIS Express is installed in (on my 64 bit Windows 7 system, it was installed in C:\Program Files (x86)\IIS Express)
  3. Execute the following command:
appcmd set config /section:staticContent /+[fileExtension='.less',mimeType='text/css']

Thursday, August 4, 2011

DataMember and Virtual Property problem in WCF

Properties dont come along on the serverside when a property is virtual which is required by different ORMs like EF4 and all. So I need to do this to alternate that:

public class CGContext : DbContext{
        public CGContext() {
            this.Configuration.ProxyCreationEnabled = false;
        }

Friday, July 29, 2011

Cannot insert explicit value for identity column in table ‘x' when IDENTITY_INSERT is set to OFF

Almost all the solution suggests to modify the Id column for that error to set IsDbGenerated=true. But I have some other problems. I have to delete my dbml and therefore regenerate to solve this. Another big bug of linq.