I am getting this issue... the application works locally completely fine, but when FTPed out to host I get this error:
Could not load type 'DataClassesDataContext'.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: System.Web.HttpException: Could not load type 'DataClassesDataContext'.
Source Error:
An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.
Stack Trace:
[HttpException (0x80004005): Could not load type 'DataClassesDataContext'.]
System.Web.Compilation.BuildManager.GetType(String typeName, Boolean throwOnError, Boolean ignoreCase) +8940107
System.Web.UI.WebControls.LinqDataSourceView.get_ContextType() +107
[InvalidOperationException: Could not find the type specified in the ContextTypeName property of LinqDataSource 'LinqDataSource1'.]
System.Web.UI.WebControls.LinqDataSourceView.get_ContextType() +232
System.Web.UI.WebControls.LinqDataSourceView.CreateContextAndTable(DataSourceOperation operation) +820
System.Web.UI.WebControls.LinqDataSourceView.CreateContextAndTableForSelect() +118
System.Web.UI.WebControls.LinqDataSourceView.CreateContext(DataSourceOperation operation) +12
System.Web.UI.WebControls.ContextDataSourceView.GetSource(QueryContext context) +20
System.Web.UI.WebControls.LinqDataSourceView.GetSource(QueryContext context) +330
System.Web.UI.WebControls.LinqDataSourceView.ExecuteSelect(DataSourceSelectArguments arguments) +69
System.Web.UI.WebControls.BaseDataList.GetData() +56
System.Web.UI.WebControls.DataList.CreateControlHierarchy(Boolean useDataSource) +177
System.Web.UI.WebControls.BaseDataList.OnDataBinding(EventArgs e) +64
System.Web.UI.WebControls.BaseDataList.DataBind() +55
System.Web.UI.WebControls.BaseDataList.EnsureDataBound() +78
System.Web.UI.WebControls.BaseDataList.CreateChildControls() +73
System.Web.UI.Control.EnsureChildControls() +102
System.Web.UI.Control.PreRenderRecursiveInternal() +42
System.Web.UI.Control.PreRenderRecursiveInternal() +175
System.Web.UI.Control.PreRenderRecursiveInternal() +175
System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +2496
I've attempted the following with no success:
Add namespace to Designer, call with namespace in LinqDataSource
Rebuild DBML several times
Rebuild Datasources
Verification of LINQ data class to GAC
Any thoughts? Suggestions? This is really frustrating...
Regards,
Jesse Myer
IT Architect
http://www.jessemyer.com
I'm confused about the Namespace. As this has been mentioned otherwise, however I have no namespace defined particularly, this is in 1 solution. Thoughts?
Regards,
Jesse Myer
IT Architect
http://www.jessemyer.com
JesseMyer
Member
14 Points
11 Posts
System.Web.Compilation.BuildManager.GetType Error? Could not load DataContextName? Help!
Feb 22, 2012 04:13 AM|LINK
I am getting this issue... the application works locally completely fine, but when FTPed out to host I get this error:
Could not load type 'DataClassesDataContext'.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: System.Web.HttpException: Could not load type 'DataClassesDataContext'.
Source Error:
Stack Trace:
I've attempted the following with no success:
Any thoughts? Suggestions? This is really frustrating...
Jesse Myer
IT Architect
http://www.jessemyer.com
shabirhakim1
Star
13496 Points
2145 Posts
Re: System.Web.Compilation.BuildManager.GetType Error? Could not load DataContextName? Help!
Feb 22, 2012 04:28 AM|LINK
Hi , Just try to use fully qualified typename like Namespace.DataClassesDataContext
NOTE:the DataClassesDataContext object's name depends on what YOU named the dbml.
JesseMyer
Member
14 Points
11 Posts
Re: System.Web.Compilation.BuildManager.GetType Error? Could not load DataContextName? Help!
Feb 22, 2012 10:59 PM|LINK
I'm confused about the Namespace. As this has been mentioned otherwise, however I have no namespace defined particularly, this is in 1 solution. Thoughts?
Jesse Myer
IT Architect
http://www.jessemyer.com
Decker Dong ...
All-Star
118619 Points
18779 Posts
Re: System.Web.Compilation.BuildManager.GetType Error? Could not load DataContextName? Help!
Feb 24, 2012 12:34 AM|LINK
Hello JesseMyer:)
Try to move the files of linq model entities out of App_Code,directly put under your proj。
Reguards!