Nannette Thacker ShiningStar.net

ASP.net Web Application Development

Sponsors

News

See all Blog Posts by Nannette.

Nannette Thacker, consultant and owner of Shining Star Services LLC, specializes in development of custom dynamic database driven web applications utilizing ASP.net technologies. Nannette has been developing ASP sites since 1997. Nannette has written numerous articles on web development techniques and tutorials.

Nannette is the owner and developer of ChristianSinglesDating.com.

 Subscribe in a reader





View Nannette  Thacker's profile on LinkedIn

January 2011 - Posts

SQL Server Express and VS2010 Web Application .MDF file errors

I installed SQL Server 2008 as well as SQL Server Express 2008 on my new Windows 7 development environment, along with Visual Studio 2010. I could get SQL Server 2008 to work fine, but I could not use Express .MDF databases within sample web application projects without receiving the below error:

Failed to generate a user instance of SQL Server due to a failure in starting the process for the user instance. The connection will be closed.

For instance, I was creating an ASP.NET Web Application. When I ran the application and tried to register a new user, I received an error:

I muddled through a lot of discouraging trials that I won't bore you with while I tried to figure out if the problem was due to the "incompatibility patch" needed with SQL Server 2008 and Windows 7, or if it was due to SQL Server Express being installed incorrectly, or VS2010 or arrrgggh! Needless to say a lot of reinstalls of numerous products were made before finding the below forum post (and the fix was so simple!):

http://forums.asp.net/t/1377174.aspx 

Failed to generate a user instance of SQL Server due to a failure in starting the process for the user instance. The connection will be closed.

The above post suggested deleting the SQLEXPRESS directory and rebooting, which I did. Note, my path was quite different than the one recommended in the above post. I used file manager to search for "SQLEXPRESS." 

 C:\Users\Nannette\AppData\Local\Microsoft\Microsoft SQL Server Data\SQLEXPRESS

After reboot, I received an entirely different error: 

A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessible. Verify that the instance name is correct and that SQL Server is configured to allow remote connections. (provider: Shared Memory Provider, error: 40 - Could not open a connection to SQL Server)

One of the readers of the above post, suggested the below fix:

Go to: Control Panel -> Administrative Tools -> Services ->

right click on SQL Server (SQLEXPRESS) service then Properties -> Then Goto Logon tab -> Select the Local System Account option ->Apply->OK

Note, in my install of Windows 7, the Administrative Tools doesn't display in the Control Panel, so I had to search for "Admin" from the Control Panel to pull up the Administrative Tools icon. When I got there, my Local System Account was already setup, so that wasn't my problem. 

However, by taking those steps I found the SQL Server Express was set to Automatic but was not started. So I started it.

I then went back to my web application, and I was able to open the ASPNETDB.MDF file within my VS2010 environment, and I was able to run the application and register a new user! No more errors!

May your dreams be in ASP.NET!

Nannette Thacker


View Nannette  Thacker's profile on LinkedIn
FlexJobs and ASP.NET Review

Most job search websites are free, such as my 3 favorites: Dice.com, Monster.com, and Careerbuilder.com (please share your favorite sites). However, since I typically only do telecommute work, I thought I might check out the website: Flexjobs.com

Today I'm going to relate my experience with Flexjobs. Flexjobs is a website that goes through the internet and pulls out telecommute jobs in numerous industries. In November, they were offering a half-price special, so I purchased a year's membership for $25.00 knowing that my contract would end in February and it might come in handy.

[Update August 3, 2011: It wasn't worth the money or effort for me. I said in my comments below, I have never heard from their support department as to why they have not provided a .NET category. I have  never been contacted by a job provider on their site. And I have never seen any jobs that are in my line of work. It might be great for JAVA / PHP developers, but not for .NET.]

Job Search:

When you search for jobs, the only category for an ASP.NET developer is: Web & Software Dev. Underneath that are several subcategories: JAVA, SQL, PHP, HTML & JAVASCRIPT. None of them include ASP.NET. You can include keywords: ASP.NET and specifically request this in your search. You  may also specify your level of telecommuting, job type, and flexibility. I specified ASP.NET key word and telecommuting full time. As of today, it pulls up 3 jobs, that were posted: 12/14, 12/29/ and 1/7.

Somewhere on the site they ask if you're not getting the desired results, to let them know. I let them know more than once that I'd like to see an ASP.NET category and to find more jobs of that type, but they never replied.

Once your search results are returned, you may then view the description as displayed on their site. At the bottom is a button to click to take you to the original job posting. Sometimes the link will take you to your favorite free sites, and other times it will take you to the company's website. Mind you, all postings are ultimately public, but what you're paying for is that Flexjobs has taken the time to find these jobs on the internet for you, put them in one searchable place, and help you find them easily. I don't typically search on company websites, so this is worth $25 of my time, but it would be worth more of my time if they would add an ASP.NET category and try to find more jobs under this category.

Job Notifications:

They do send out daily Job Notifications if you request. However, the job notifications are based on your Categories, not your key words. So I return to the site and find jobs in very non-applicable categories. Also, for some reason, their results in the daily notices always return 2 of each listing.

Resume and Online Profile:

They allow you to upload a resume, fill out forms for an online resume, certifications, etc. They even allow you to upload code samples. This part is very detailed. However, I haven't yet received any feedback from anyone interested in my resume, so I don't see this site as a good resource for expecting someone to find me. My top sites for having people find me are Monster and Dice.

My Final Recommendation:

Although I have not yet found a job using Flexjobs, I have only recently started looking as of 4 days ago since my contract is ending in February. For my discounted $25 a year rate, it seems to be worth the cost; but would have more appeal if they would work on the ASP.NET aspect of the site. I'll see how the rest of this year goes before I consider renewing though.

It just surprises me that with .NET being such a large player in the industry, that they haven't added that category and don't respond to my emails. Perhaps it's because there are few .NET users using the site to make it worth their effort. Not sure! LOL.

May your dreams be in ASP.NET!

Nannette Thacker


View Nannette  Thacker's profile on LinkedIn
Entity Framework 4.0: My Favorite Books

I'm in the process of reading several Entity Framework 4.0 books. I'm going to recommend two such books:

1) Programming Entity Framework: Building Data Centric Apps with the ADO.NET Entity Framework by Julia Lerman

2) Entity Framework 4.0 Recipes: A Problem-Solution Approach by Larry Tenny and Zeeshan Hirani

Visit these Entity Framework 4.0 Quick Start videos by Julia Lerman.

The book links include numerous detailed reviews. If you can only afford one of the books, I'd recommend Julia's book as the one to purchase. If you can't afford either, check out the videos. Also, check your local library. I like to check books out at my local library, then when I decide they are a keeper, I purchase them. (I'm tired of obsolete books sitting on my shelves taking up space and collecting dust, so I am very particular which books to actually buy. And I only buy a book when I want to mark it up with highlighters.)

Advanced users: For more on EF4, see also:

Writing an EF Enabled ADO.NET Provider

Entity Framework Sample Provider

May your dreams be in ASP.NET!

Nannette Thacker


View Nannette  Thacker's profile on LinkedIn
Guide to .NET Technical Interviewing

I am a strong believer of bringing your laptop to an interview and showing them what you have done. I believe that if a candidate is capable of doing some really great programming, they can easily fit into any aspect of development required. Just because a candidate has never done "xyz" before and can't tell you the difference between "xyzThis" and "xyzThat" doesn't mean they aren't able to quickly learn "xyz."

I've heard a manager say they interviewed 30 candidates, their resumes looked great, but they rejected all of them because they couldn't answer a few specific technical questions. I was thinking, you likely threw out at least 15 great candidates because you perform lousy interviews.

If a person is smart enough to do "this" and can show you, then they have the skill-sets required to do "that."

Reviewing a candidate's existing code, and discussing it with them helps to determine if they are capable of doing what it is you need done. More important than actually having done everything you can do is determining if they have done similar things and if their skill-set allows them to learn to do what is needed.

Additionally important is, does the person know how to quickly find an answer? If you have a hot-dogger who is constantly trying to reinvent the wheel, you are losing income. Can your candidate quickly research and find an existing solution? There is so much sample source code available as well as components you may purchase. For instance, Telerik has a major business in selling ASP.NET Components. Why reinvent an ajaxified combobox with checkboxes when it's just one of the many controls found already built into the Telerik suite of controls?

May your dreams be in ASP.NET!

Nannette Thacker


View Nannette  Thacker's profile on LinkedIn
Adding a SQL Server Membership Provider using the aspnet_regsql.exe Utility

You may add a SQL Server Membership Provider using the aspnet_regsql.exe Utility on either your SQL Server Express local database or on a full-blown SQL Server database. In both implementations, you would use the aspnet_regsql.exe utility. This tool is installed when you install your .NET Framework. To use this on your SQL Server 2008 database server, for instance, you would need to first download and install the .NET Framework onto your server.

Then you would need to find the location of the aspnet_regsql.exe utility on your drive. Here is the path to mine using the .NET Framework 4: C:\Windows\Microsoft.NET\Framework64\v4.0.30319

I also like to create a shortcut to the utility on my desktop so I have it for future.

Here is an article I wrote in 2007 with step by step instructions and images for Adding a SQL Server Membership Provider using the aspnet_regsql.exe Utility.

Here is another useful link on deploying the database without including your test user accounts:

How to: Deploy the ASP.NET Membership Database without Including User Accounts

May your dreams be in ASP.NET!

Nannette Thacker


View Nannette  Thacker's profile on LinkedIn
.NET Framework 4 Custom ODBC Membership Provider Implementation in C# and VB.NET

Here is a great link to .NET Framework 4 Custom ODBC Membership Provider Implementation and Sample Membership Provider Implementation. Source code is in both C# and VB.NET.

May your dreams be in ASP.NET!

Nannette Thacker


View Nannette  Thacker's profile on LinkedIn
More Posts