Home | Blog | Screencasts | Projects
# Saturday, June 13, 2009

I came across an interesting problem recently deploying an ASP.NET application to the ISV directory in CRM 4, the ASP.NET application was working fine using the Cassini web server inside of Visual Studio, but when it was deployed to the ISV directory on the CRM server it failed to run.

Basically any postback caused the web forms to loose all it’s current data, so things like dropdown lists would end up blank.

It was pretty obvious that this was caused by ViewState being turned off.

The default web.config file of CRM looks like:

 

<pages buffer="true" enableSessionState="false" enableViewState="false" validateRequest="false"/>

 

Since the ISV directory inherits from this web.config file, all the applications in the ISV directory will also have viewstate disabled.

 

So just add the following line to your web.config file in the ISV directory:

 

<pages enableViewState="true"/>

 

Personally I don’t really see the need to enable viewstate, in most cases it isn’t needed if the programmer understands it’s purpose, but sometimes your just trying to deploy code that someone else wrote.

Saturday, June 13, 2009 10:46:28 AM (E. Australia Standard Time, UTC+10:00)  #    Comments [0] - Trackback
CRM | setup
Tracked by:
"call center software" (call center software) [Trackback]
Statistics
Total Posts: 190
This Year: 3
This Month: 0
This Week: 0
Comments: 38