.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

Can't get dataclasses1datacontext to generate code behind in .net 4.0 and vwd 2010 express

Posted By:      Posted Date: September 20, 2010    Points: 0   Category :ASP.Net

I am using a web application project in visual web developer express 2010 on Windows 7 x64 targeting .net 4.0.  I've linq to sql quite a bit with visual studio 2008 and it worked with no issues.  I added a dbml file to the root of my web site and dragged over my data model.  When I run my project, I get the following error:

Type 'DataClasses1DataContext' is not defined.  The line of code it is having a problem on is 

 Dim db As DataClasses1DataContext = New DataClasses1DataContext()

However, intellisense is recognizing dataclasses1datacontext as a valid class.  If I view the code on the dbml file, it has essentially an empty class definition.  It appears it didn't actually generate any code relating to my data model.  I tried adding system.data.linq, etc to my web.config file but it didn't make a difference.  I always get the error above.  Again, I'm using a web application project which appears to function a little differnetly than a web site project. 

Any ideas why I can't get this basic functionality that was working in 2008 to work in 2010?

View Complete Post

More Related Resource Links

Error code -2068578304 When Installing Express SP1 x64 as a Part of Visual Studio 2010 Installation

Howdy! I was installing the VS 2010 on my server running Windows Server 2008 R2 x64 and all of a sudden the setup finished with " Setup completed, however, there were failures reported installing optional components. " The final status is success. The left-hand pane of the finish page reads as: The following component failed to install: Microsoft SQL Server 2008 Express Service Pack 1 (x64).   Leaving alone the fact why setup executed the custom action that tried to install SQL Server Express Edition and Compact Edition when I just asked it to install SQL components (which presumably should be SQL SMO and DMO libraries), I would like to understand what had happed to Express install.   Inspecting the .\Logs\dd_error_vs_vstdcore_100.txt file gives the following record:   [09/16/10,16:06:51] Microsoft SQL Server 2008 Express Service Pack 1 (x64): [2] Error code -2068578304 for this component is not recognized. [09/16/10,16:06:51] Microsoft SQL Server 2008 Express Service Pack 1 (x64): [2] Component Microsoft SQL Server 2008 Express Service Pack 1 (x64) returned an unexpected value. ***EndOfSession***   Further inspection of the dd_install_vs_vstdcore_100.txt provides with the info:   [09/16/10,16:02:51] Microsoft SQL Server 2008 Express Service Pack 1 (x64): GenericComponent Action: CreateProcess launched with cmd line : x:\setup\..\wcu\sse\SQLE

Code Optimized Web Development Profile (VS 2010 and .NET 4.0 Series)

When you first run VS 2010 it prompts you to select an IDE profile to use. The profile you select will configure how tool windows are displayed/docked in the IDE by default and set the default keyboard shortcuts. You can then customize any of these settings by using the Tools->Options menu within the IDE and then override/change them. You can also later reset your profile and pick a different one by choosing the Tools->Import and Export Settings menu command.

Code spelling checker extension for visual studio 2010

Building a spelling checker for source code as an extension for visual studio 2010.

Visual Web Developer 2010 Express "Copy Web Site" using different login


I created a site and am trying to grant another pesron access to upload changes to it without giving them my super-user login.

I made a login for her but I can't test whether it works or not because no matter how much I "disconnect" in the Copy Web Site page of VWD 2010, reconnecting to the same site always logs in as my superuser account without prompting me for a login again.

How do I test is the account it set up correctly before having her try to upload to it?    I want to force the login to remote site dialog to pop up again to test her account.

Any ideas?

Stay Alert: Use Managed Code To Generate A Secure Audit Trail


In today's security-conscious environments, a reliable audit trail is a valuable forensic tool The Windows Server 2003 operating system provides features that let you enable a wide range of applications to make use of auditing functionality. This article looks at auditing from the operating system perspective and describes a sample managed code implementation that will allow you to add auditing to your own server applications.

Mark Novak

MSDN Magazine October 2005

The Weekly Source Code 56 - Visual Studio 2010 and .NET Framework 4 Training Kit - Code Contracts, P

Do you like a big pile of source code? Well, there is an imperial buttload of source in the Visual Studio 2010 and .NET Framework 4 Training Kit . It's actually a 178 meg download, which is insane. Perhaps start your download now and get it in the morning when you get up. It's extremely well put together and I say Kudos to the folks that did it. They are better people than I. I like to explore it while watching TV myself and found myself looking through tonight. I checked my blog and while I thought I'd shared this with you before, Dear Reader, I hadn't. My bad, because it's pure gold . With C# and VB, natch. Here's an outline of what's inside. I've heard of folks setting up lunch-time study groups and going through...(read more)

web sites made with visual webdeveloper express 2010


Good evening,

just a quick question, are there a lot of developers using  the express edition to make web sites, or is it limited to what you can do, and I would be  better getting the full edition visual studio 2010. I have been using dreamweaver, but I wanted to try my hand at asp.net, thx for any info you can offer.

Custom tool error: Failed to generate code for the service reference 'CompanyService'. Please che


A little background because I feel I have an out of the ordinary architecture in place and don't know if this is contributing to the problem. 

We have an existing ASP.net application that is undergoing expansion.  The new functionality is all written in Silverlight 4.  As part of that expansion I gutted all the old Linq to SQL and put Entity Framework 4 into place.  To do this I created a standard .net Class Library and added my edmx files there.  Naturally, the business entities created by this cannot be used in Silverlight.  So I created a Silverlight Class Library and added all the business entities to that Silverlight Class Library as linked files.  I changed the name space to be the same.

So I have the following assembly / namespaces

Company.Project.Dal.csproj / Company.Project.Entities (.net 4 class library)

Company.Project.Entities.csproj / Company.Project.Entities (SL4 class library)

With this architecture I was able to share my business entities with my SL enabled web services, my asp.net projects, my silverlight projects.  Really it's a beautiful thing.

Once this was done I added "message" classes to Company.Project.Dal and again shared them with the other entites using linked files.  These messages are things like MyObjectRequest; they are class

Use DB query result to generate Jquery required lines of code



I 'm gonna query database for photo records. each record include "photo path" where imagesURL  stored in string format

 I Choses my favorite Juqery plugin to show images. Plugin needs some lines of code like below.

How could I  generate these lines

$(function() {
sleep: 2,
fade: 1
}, [
{ src: 'picture1.jpg' },
{ src: 'picture2.jpg' },
{ src: 'picture4.jpg' }

Jacksonville .NET Code Camp 2010


This Saturday is the 6th Annual Jacksonville .NET Code Camp!   It's an all day geek fest focusing on code and not marketing fluff.

  When: Saturday, August 28, 2010 All day (registration opens at 7:00am)
  Where: University of North Florida - 1 UNF Drive, Jacksonville FL 32246
  Cost: Free!

If you're not already going, join the masses!

  Attendees: 481
  Sessions: 37
  Speakers: 31
  Tracks: 7

Why spend your Saturday with a bunch of geeks? Sessions ranging from informal "c

Video: SharePoint 2010: Executing Code in the Sandbox

Find out how the Sandboxed Solutions Service provides for a complete isolation system that ensures code running in a sandboxed solution cannot reach out to access information beyond the scope of the deployment. (Length: 12:01)

MVB - 2010 - Express


Trying to do something that seems very simple but can not figure out how to do so. Fairly new to MVB Studio.

I am trying to query a SQL server that is already running(network / not local), using the wizard all the options I can find are to conenct to an .mdf and attach it to a server.  If need be I can create a Data source using an ODBC driver and query it at run time, but I can seem to figure out how to do this. (IE, something like office can do when you create queries in excel from an existing data source.)

SQL 2008 Express with advanced services and Visual studios 2010

Hi could someone please help me. Im running the following software: SQL 2008 Express R2 with advanced services Visual Studios 2010 Ultimate   I am trying to using Sql in Visual studios to use full text indexing but I am attaching a database that already exists. My problem is that I can use the full text indexing? I had it working once but then when i tried to FREETEXT search through my table it said that I didn't have an index on that table when I know I do cause I went to make sure. I think that perhaps its referencing the wrong database because I cant seem to add the database into my project? I am so confused as to how SQL express instances work so not sure what I am doing wrong? PLEASE HELP? 

vs 2010 Web Developer Express Limitations

What is the different between the vs 2010 Web Developer Express and the full version of 2010? With the vs 2010 Web Developer Express will I be able to use all types of databases (MSSQL, MySQL, Access, ect) and enitity frame work?

Code Camp 2010 in Words & Pictures

The Jacksonville Developer User Group pulled off an excellent code camp this weekend.  It was a great opprotunity to catch up with friends, meet new ones, and learn some good tech!  My day started off as a volunteer at the registration table.  We had a great group of volunteers...even if it was 6:30 in the morning...on a Saturday! Our welcome sign...who says you don't need a code monkey? After handing out badges, bags, and shirts for a couple hours it was off to my first class: SQL Server Complex Event Processing.  This is the new StreamInsight technology that is part of SQL Server 2008 R2.  Interesting stuff for streaming real-time data from various system...I'll need to dig into it a bit deeper. Next it was off to learn about Functional Programming and then "Becoming a Rx Pusher with the Reactive Framework".  The Reactive Framework talk was probably the most interesting of the day.  It was presented by Jim Wooley who posts at ThinqLinq.com.  The Rx framework looks extremely interesting in terms of how it handles asynchronous processing. Of course, I had to visit my friends over at PR'UF.  The PR'UF system was launched at this year's Code Camp and provides a better way to find the talented developers & architects you need.  What makes PR'UF different?  It uses reputable industry experts who

Building WCF appl in VS C# 2010 Express doesn't provide app.config when New Proj specified

Hey guys, I am trying to get my feet wet with the WCF environment. I was following a tutorial that wanted to alter the New Project Application that I tried to follow along with & when it came to making changes to the app.config file, it was nowhere to be found?! I tried a second time to start a new project using the WCF REST option and this time a rcv the following msg: **The project file 'J:\USER\TOMJ\APPDATA\LOCAL\TEMP\VC4TLPEZ.Y3X\TEMP\WCFRESTSERVICE4.CSPROJ' CANNOT BE OPENED. The project type is not supported by this installation. ??! ** IAm I missing something in my VS 2010 C# Express application? If so, someone please tell me how to resolve this problem.   Thanks in advance . . . TomJTom Johnson

VS 2010 not updating code

 I have VS 2010 64 bit installed on Win7 64. When I had a datagrid control attached to a SQLdatasource it would select fine but not do any updates to the database. thought it was a caching issue.  I went the SQLdatasource route and added a class to handle the data retrieval. I had attached code to a button to do a search of the table based on text in a textbox. I got that working, but decided to comment out all the code in the button_click event. I ran the code in the debug mode and the page still worked including the lookup. copied the URL to other browsers and same outcome.  i closed VS2010, restarted, deleted the button, ran the page with no button, then added a button onto the page (different name for button) and when I ran the application the search worked. So the code must be cached somewhere and is not being updated each time i save an update. Has anyone seen this behavior??
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