.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Top 5 Contributors of the Month
david stephan
Gaurav Pal
Post New Web Links

Could not find the OSpace type for...

Posted By:      Posted Date: September 11, 2010    Points: 0   Category :ASP.Net
Hi,I'm trying to use the Entity Framework Model for the first time and am getting the following error when trying to use an gridview and Entity Data Source. Could not find the OSpace type for 'TestModel.test'. 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.ArgumentException: Could not find the OSpace type for 'TestModel.test'.There's not much else around on this error but I found another couple of posts relating to Sharepoint but have found nothing else that helps.I already have the following references in the Web.Config: System.Data.Entity, System.Data.Entity.Design, System.Web.Entity. Additional to this I've also tried unchecking the "Allow this precompiled site to be updatable" in the compilation of Web Deployment project's Properties.Can anybody help?ThanksM

View Complete Post

More Related Resource Links

Help Troubleshoot "Could not find Type in assembly"

I am attempting to create a CLR Procedure.  I was able to create the assembly, but I am unable to create a procedure on the assembly.  This is the error I receive: Msg 6505, Level 16, State 1, Procedure DINEServiceProc, Line 2 Could not find Type 'DINEServiceProc' in assembly 'DINEService' Here is the VB code to create the class: <code> Imports System Imports System.Data Imports System.Data.Sql Imports System.Data.SqlClient Imports System.Data.SqlTypes Imports Microsoft.SqlServer.Server Partial Public Class DINEServiceProc <Microsoft.SqlServer.Server.SqlProcedure()> _ Public Shared Sub ServiceProc(ByVal iMsg As String, ByVal iMsgType As String) Dim conn As SqlConnection 'Create an in-process connection to the instance of SQL Server conn = New SqlConnection("Context Connection=True") Dim DINEService As New DINEService Try conn.Open() DINEService.ProcessStartRequest(iMsg, iMsgType) Catch sqe As SqlException 'Console.WriteLine(sqe.Message) Return Finally conn.Close() End Try End Sub End Class </code> And here is the code to create the assembly and the procedure: <code> USE [ServiceBrokerTest] GO /****** Object: SqlAssembly [DINEService] Script Date: 01/03/2006 10:38:00 ******/ CREATE ASSEMBLY [DINEServiceProc] AUTHORIZATION [dbo] FROM 'D:\EHIT\ServiceBroker\DINEService\DINEService\bin\Debug\DINEService.dll' WITH PERMISSION_SET = SAFE

Could not find service of type 'TrainingApprovalSiteWorkflow.ITrainingSiteCreationService

System.InvalidOperationException] = {"Could not find service of type 'TrainingApprovalSiteWorkflow.ITrainingSiteCreationService' through the currently configured services. Consider adding the service to ExternalDataExchangeService."} According to the book I had to add, this to web.config < WorkflowService Assembly = "TrainingApprovalSiteWorkFlow, Version=, Culture=neutral, PublicKeyToken=ec95eb8ee603c598" Class = "TrainingApprovalSiteWorkflow.TrainingSiteCreationService" >   </ WorkflowService > However I am not sure if I did to the correct web.config there are so many I added to inetpub\80\web.config Is it there or some other web.config?www.sharepoint2010blogger.com Follow me on Twitter <<<

How to find specific nested object type in Gridview

Dears, I have a gridview with a nested placeholder in each rows. I nested some checkboxes in each placeholders in each rows dynamically, so their ServerIDs are not the same (I dont want to use nested gridview). at the end in a button event I want to count checked checkboxes in gridview while I can not use findcontrol() method in each rows to find checkboxes due to their different ServerIDs. How can I do this?

External Content Type - Read List Operation - "Cannot find a collection element of a supported type.


I'm trying to define External Content Type Operations for an External Content Type. I can add a Connection, Type "WCF Service" no problem. And I can define a "New Read Item Operation" using that connection.

But I can't define a "Read List Operation". I get the following error message, in the Return Parameter Configuration: "Cannot find a collection element of a supported type..." it goes on to say - see the help documentation for supported types. I can't find any help documentation on this.

I've tried returning different types in the provider web service but keep getting the same error. What are the supported types the web service can return?

The reading I've done suggests that you can connect to a non-MS web service using a connection type of "WCF Service". Is this correct? If it is what's the best soap format the web service provider should use - Doc/Literal?



In which namespace we can find The type or namespace name 'webBrowser'


i received an error showing


Error    27    The type or namespace name 'IgnoreDataMember' could not be found (are you missing a using directive or an assembly reference?)    F:\Main project\downloaded facebook applications\Facebook\Types\Facebook.Types.auth.cs    24    10    Facebook

hop any one can help me out immediatly

Find Scale and Precision in Float data type

Is there any way that i can find the scale and precision in float data type column. The table has around 1000 records and for each record, i need to find what is the scale and precision for the column which has float data type.

find amounts with more than 2 decimal places in a float type column

I was trying to use charindex but that didnt work.  Also what happens if i change the column to money data type? does it round or truncate?

Find all child controls of a type



Given a normal WPF Window object, I want to walk the list of all controls contained in that Window and find all objects of a specific type...i.e. all of my UserControl objects that were placed in the XAML definition of that Window.  What's the best way to do that?


User Control Lib + ComponentResourceKey + StyleDictionary = Cannot Find Public Type

I'm trying to create a style resource dictionary file that can be used across all applications that use a user control defined in a user control lib. 

I added a resource dictionary called StyledUserControlLibDictionary.xaml to the StyledUserControlLib.
<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" 

Is there anyway to find what is using a specific content type?


I have two site content types that I no longer need.  I have changed the pages that were using these content types, to another content type and also changed the page layouts that were using these.

Each time I go to remove the content types, I get an error message which reads "The content type is in use.   at Microsoft.SharePoint.SPContentTypeCollection.DeleteFromWeb(SPContentTypeId id, String strName)
   at Microsoft.SharePoint.SPContentTypeCollection.Delete(SPContentTypeId id)
   at Microsoft.SharePoint.SPContentType.Delete()
   at Microsoft.SharePoint.ApplicationPages.ManageContentTypePage.DeleteContentType()
   at Microsoft.SharePoint.ApplicationPages.ManageContentTypePage.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String eventArgument)
   at System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument)
   at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)

Is there any way to find out what is using this content type?  I'm absolutely sure that I've changed or deleted everything that was using these content types but can't work out wha

Could not find a property on the type specified by the DataObjectTypeName property


Hi - I need some help:

1. I'm using a ListView using an ObjectDataSource which has CRUD operations implemented by a biz objects layer sitting between the UI and the SQL DB. 

2. The Biz Objects layer consists of partial classes which extend the functionality of a series of entity objects created by Linq2SQL. 

3. The ObjectDataSource makes use of DataObjectTypeName which is set to the resume_school entity object generated by Linq2SQL.

4. The resume_school object has a property - "school" which is a child entity - also created by Linq2SQL.  The school object has it's own properties and is related to the resume_school object via a relationship created by their common "school_id" fields.

5. I am successfully using, as an example <%# Eval("school.school1") %> to bind to a label control embedded in the Select Template.

6. Similarly, I am successfully using <%# Bind("school.school1") %> to bind to a textbox control embedded in the Edit Template.

7. Both of these find and return the correct data from the DB.

8.  When I click on "Update" while in Edit Mode, I get the following error msg:

Could not find a property named 'school.school1' on the type specified by the DataObjectTypeName property in ObjectDataSource 'ObjectResumeEducationData'.


TreeSelector : playing with generics and type inference

create a generic way to define a selection starting from a tree of objects, the most simpler way as possible.

Let's start with the beginning...
Here is a very simple little interface defining a node of the tree, basically, a value and the references to the child nodes.

UnTyped DataSets and Strongly Type DataSets

We all are use datasets as a means of carrier of data from one layer to another. Most of the time we are using weakly typed datasets. In this article I will explain the differences between weakly typed datasets and strongly type datasets

Gmail style multiple Sign-in type combo...is it possible in asp.net?


I am developing a multi-company application and want my users to give the functionality like the following to switch companies.


Is this possible? then how?

Please help


find a Control inside a GridView using jQuery


I have databound GridView in my page and I have a hidden DIV in all rows. Each row contains a Button that I want it to make the DIV visible for me! how can I use that with jQuery?!

here is the code page: 

<asp:GridView ID="GridView2" runat="server" AutoGenerateColumns="False" 
                                EnableModelValidation="True" GridLines="None" ShowHeader="False" Width="100%">

Type or namespace error.


A couple of days ago I started getting an unusual behavior when compiling Website projects. I have referenced class libraries added to my bin folder that are also correctely referenced in using statements in my aspx.cs code behind. When I compile, I get the 

Error 4 The type or namespace name 'CommonClassLibrary' could not be found (are you missing a using directive or an assembly reference?) C:\Dev\Fiscal_Portal\Implementation\FMS Portal Site_new\App_Code\BLL\DataTables.cs 1 7 C:\...\FMS Portal Site_new\

The type or namespace name 'CommonClassLibrary' could not be found (are you missing a using directive or an assembly reference?)

error message that would typically be received when the dll has not been added as a reference or added in a using statement.

I can eliminate the error by adding an


Bug: Does not change column type from nvarchar to ntext


Scenario: If you create a table with a column of type nvarchar, populate it with some content and try to modify it using the WebMatrix editor, from nvarchar to ntext, it does not display any error message or warning that this is not possible. It silently saves and reverts the change, back to nvarchar. Wasted some hours on this issue as I thought my column was ntext, but in fact was still nvarchar.

Expected behavior: It should change to ntext, or if SQL CE doesn't support that, it should notify the user that no change was applied.

ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend