A colleague has developed a SharePoint web-part application (which was developed in VS2005), and deployed on MOSS 2007. We use an .ASCX file for deployment.
This application works fine all day, but something happens overnight whereby we need to do an IISRESET every-morning before it starts working again. (It is basically driving us nuts!)
The error we get is:
the type specified in the TypeName property of ObjectDataSource 'ObjectDataSource2' could not be found
The relevant 'ObjectDataSource2' in the ascx file has this code:
<asp:ObjectDataSource ID="ObjectDataSource2" runat="server" InsertMethod="Insert"
OldValuesParameterFormatString="original_{0}" SelectMethod="GetDataByEnquiryType"
TypeName="crmDatasetTableAdapters.Lookup_tableTableAdapter">
<InsertParameters>
<asp:Parameter Name="Domain" Type="String" />
<asp:Parameter Name="code" Type="String" />
<asp:Parameter Name="meaning" Type="String" />
<asp:Parameter Name="enabled" Type="Int32" />
<asp:Parameter Name="Link" Type="String" />
</InsertParameters>
</asp:ObjectDataSource>
The dropdownlist using the above datasource is:
<asp:DropDownList ID="ddlEnquiryType" runat="server" AutoPostBack="True" DataSourceID="ObjectDataSource2"
DataTextField="meaning" DataValueField="meaning" Width="256px">
The TypeName entry is referring to a dataset that was created (.xsd file). We have a web.config connection string that looks like:
<add name="crmConnectionString" connectionString="Data Source=myservername;Initial Catalog=CRM;User Id=xyz123;Password=***************;Integrated Security=False;Connect Timeout=30;" providerName="System.Data.SqlClient" />
As I mentioned, this application works fine in VS2005, VS2008, and also when within SharePoint. - Until overnight, and the sharePoint server 'loses' whatever it needs regarding 'ObjectDataSource2'.
Can anyone shed light on this puzzle? If you need more information, then let me know.
Thanks in advance!