Monday, February 27, 2012

Jboy Library System - Using WPF & EF of .NET


This is a simple Library System I made using the .NET Framework's Windows Presentation Foundation (WPF) for the GUI and Entity Framework (EF) for data access. (Not layered)

You can download the source code at Google Docs (click File -> Download) or at Planet-Source-Code.
You can download the stand-alone executable at Google Docs.

For username and password:
     Username: admin
     Password: admin

Enjoy!!!




Thursday, February 16, 2012

Free Piano Arrangements By Greg Howlett

Greg Howlett is a Christian concert pianist, educator, and recording artist.

Shall We Gather at the River (Piano only)


GregHowlett.com Home Page:

Free Lessons for Chruch Pianists:

DVD Courses:

 

ASP.NET ERROR: Cannot open user default database. Login failed.

Error: Cannot open user default database. Login failed.
                  Login failed for user '[-----]\user'.

Solution:
If you are specifying a database file to attach to by using the AttachDBFilename in your connection string like this:


<add name="MyConnString"
          connectionString="Data Source=(local)\SQLEXPRESS;
          AttachDbFilename=|DataDirectory|\MyDatabase.mdf;
          Integrated Security=True;     />

be sure to include User Instance=True like the one below


<add name="MyConnString"
          connectionString="Data Source=(local)\SQLEXPRESS;
          AttachDbFilename=|DataDirectory|\MyDatabase.mdf;
          Integrated Security=True;
          User Instance=True;"         />

Refer to http://msdn.microsoft.com/en-us/library/ms247257.aspx#sectionToggle2 to understand user instances



Wednesday, February 15, 2012

ASP.NET ERROR: The 'System.Web.Security.SqlMembershipProvider' requires a database schema compatible with schema version '1'




  
Free Lessons for Chruch Pianists:
Free lessons, tips and downloads for church pianists

DVD Courses (Reharmonization, Play by Ear!, Arranging, Accompanying, Theory for Church Pianists, etc.):
Over 30 hours of DVD instruction for church pianists
 


Error: 
The 'System.Web.Security.SqlMembershipProvider' requires a database schema compatible with schema version '1'.  However, the current database schema is not compatible with this version.  You may need to either install a compatible schema with aspnet_regsql.exe (available in the framework installation directory), or upgrade the provider to a newer version.

Solution:
1. Open Microsoft SQL Server Management Studio
2. ...Connect...
3. Click 'Databases' node
4. Right-click node of the database you are using
5. Select 'New Query' option
6. Copy and paste the query below:
INSERT INTO dbo.aspnet_SchemaVersions
VALUES
('common', 1, 1),
('health monitoring', 1, 1),
('membership', 1, 1),
('personalization', 1, 1),
('profile', 1, 1),
('role manager', 1, 1);
GO
7. Click 'Execute' (or right-click on the page -> 'Execute')

[Note: this answer is from http://stackoverflow.com/questions/3292794/the-system-web-security-sqlmembershipprovider-requires-a-database-schema-compa]

Friday, February 10, 2012

ASP.NET MVC 3 Problem: Ajax.ActionLink and Ajax.BeginForm opens in new page




  
Free Lessons for Chruch Pianists:
Free lessons, tips and downloads for church pianists

DVD Courses (Reharmonization, Play by Ear!, Arranging, Accompanying, Theory for Church Pianists, etc.):
Over 30 hours of DVD instruction for church pianists
 



How to solve this problem:


In web.config file:

<configuration>
  <appSettings>
...
    <add key="UnobtrusiveJavaScriptEnabled" value="true"/>
  </appSettings>
...
</configuration>




 In your _Layout.cshtml:

 <script src="@Url.Content("~/Scripts/jquery-1.5.1.min.js")" type="text/javascript"></script>

NOTE: CHECK THE VERSION OF YOUR jquery-[version].js FILE




In your *.cshtml file or _Layout.cshtml:

<script src="@Url.Content("~/Scripts/jquery.unobtrusive-ajax.min.js")" type="text/javascript"> </script>


---