jQuery checked attr jQuery 1.5 to 1.6.4

by Cliff 1. January 2012

If you have jQuery code that reads the .attr("checked") and you upgrade from 1.5 to 1.6.4, you should read this:

http://ejohn.org/blog/jquery-16-and-attr/

In summary, if you were relying on .attr("checked") returning true or false, the behavior has changed with 1.6 as it now returns "checked" or "". The problem being that JavaScript will equate both "checked" and "" as true in an if statement.

Visual Studio 2010 SP1 IIS will not start

by Cliff 4. July 2011

If you install Visual Studio 2010 SP1 and then you find that IIS will not start, you may have a port conflict issue.  SP1 includes a new service, the Web Deployment Agent Service.  This new service runs on port 80, the same default port that IIS uses for HTTP traffic.  If the Web Deployment Agent Service is running, IIS will not start if you are using port 80 in IIS.  On option is to modify the web deployment agent service.  For me, I stopped and disabled since I do not plan to use.  You may be able to change the port is uses by default.  Additional info can be found at the link below

http://superuser.com/questions/282519/change-the-port-of-iis-7-5-express

.Net | IIS

Debug WCF service IIS specified authentication schemes 'IntegratedWindowsAuthentication, Anonymous', but the binding only supports

by Cliff 3. July 2011

If you want to debug a WCF service you may encounter the following error in Visual Studio:

IIS specified authentication schemes 'IntegratedWindowsAuthentication, Anonymous', but the binding only supports specification of exactly one authentication scheme. Valid authentication schemes are Digest, Negotiate, NTLM, Basic, or Anonymous. Change the IIS settings so that only a single authentication scheme is used.. ---> System.InvalidOperationException: IIS specified authentication schemes 'IntegratedWindowsAuthentication, Anonymous', but the binding only supports specification of exactly one authentication scheme. Valid authentication schemes are Digest, Negotiate, NTLM, Basic, or Anonymous. Change the IIS settings so that only a single authentication scheme is used

This can occur if the virtual directory hosting the service in IIS has both the Intergrated Windows Authentication and Anonymous authentication schemes selected.  In order to get around this so that you can debug your service, you can do the following:

  1. In IIS, uncheck the Annonymous scheme
  2. In IIS, leave Integrated Windows Authentication checked - this is required to run the VS Debugger
  3. Start the debugger from VS
  4. Before you make a request to your service, go back into IIS and check the Annonymous scheme
  5. Make a request to your service and your break point will be hit

.Net | WCF

Object reference not set to an instance of an object

by Cliff 3. July 2011

The infomous Object reference not set to an instance of an object error occurs when you try to reference or use an object that has not been set to a valid "value" or instance.  For example, let's assume you have a Class "Person" that has a property Name.  If you try to access the Name property and your Person object is not set to an instance, you will receive the Object reference not set to an instance of an object error.

In code:

Person p = null;
p.Name = "John Doe";

This is an obvious case, but what makes this error difficult to track down at times is when you do not know why you do not have an instance of the object.  This can occur for a variety of reasons.  If you are able to create a unit test (or already have one) this can help you to track down the root cause.  You can also rely on the stack trace and/or debug the offending code.

Passing Oracle Certified Programmer for the Java 2 Platform SE 6.0

by Cliff 2. July 2011

A while back I passed the Oracle Certified Programmer for the Java 2 Platform SE 6.0 (formerly SCJP 6) exam and thought that overall it was a challenging exam.  The questions required you to have a good handle on the language and framework but you really needed to concentrate on each question and look for small details that would result in the correct answer.  

As for content, if you follow the SCJP Sun Certified Programmer for Java 6 Study Guide by Katherine Sierra and Bert Bates book that will give you a good start on the content.  I also recommend a mock test, such as the one offered by whizlabs.  I used this and found it to be helpful to familiarize myself with the exam format.  Javaranch is also a good resource.

SCJP 6 Exam Simulator http://www.whizlabs.com/

http://www.javaranch.com/

Good luck!

Passing Exam 70-523 Upgrade: Transition Your MCPD .NET Framework 3.5 Web Developer Skills to MCPD .NET Framework 4 Web Developer

by Cliff 2. July 2011

I recently passed exam 70-523 to earn my MCPD .NET Framework 4 certification.  The exam covers a fairly wide range of topics and the following provides an overview of the sections to expect on the exam.

There are 5 seperate tests that you will take during the exam and this includes one real world scenario statement follwed by 6 questions on the requirement statement.

The tests break down into the following:

  1. WCF with .NET 4 - approximately 20 questions
  2. Web Application development with .NET Framework 4 - approximately 20 - 30 questions including topics on MVC and Web Forms
  3. Accessing Data with Microsoft .NET framework 4 - approximately 20 questions including topics on EF, LINQ, and DataTables
  4. Designing and Developing Web apps - 20 questions + the real world scenario statement & quesitons

The exam was moderatly difficult but if you have about 1 years experience in .NET 4 including MVC, EF, LINQ, and WCF, and jQuery you should do OK and no need to get a vce or brain dump or anything like that.

Some additional resources I found helpful:

http://gregorsuttie.wordpress.com/2011/01/01/net-upgrade-exam-70-523/

http://www.microsoft.com/learning/en/us/exam.aspx?ID=70-523#tab2

 Good luck!

ASP.NET MVC3 Parser Error Message: This method cannot be called during the application's pre-start initialization stage.

by Cliff 4. June 2011
After upgrading to MVC3 I recieved the below error: 
Parser Error Message: This method cannot be called during the application's pre-start initialization stage.
This occured becuase I was using a custom membership provider:
<add name="MyMembershipProvider" ....
(Entry in web.config)To resolve, I added the following to the web.config:
<add key="enableSimpleMembership" value="false"/>
<add key="autoFormsAuthentication" value="false"/>
 The reason - security and membership settings are now defaulted so you need to override them. 
 

AspNetMembershipProvider for MySQL

by Cliff 13. February 2011
If you use ASP.NET (webforms or MVC) you may want to use MySQL as your database.  One nice feature of .NET is the Membership Provider which takes care of authentication and authorization.  You can use MySQL to store the necessary informaion for the membership and role providers.  The below article details how to do this:
 
 
If you run into issues, make sure you copy the MySQLMembershipProvider and MySQLProfileProvider sections from the machine.config to your local web.config.  Once you do this, you should be all set.

.Net | MVC | MySQL

Create a self signed SSL Certificate

by Cliff 5. February 2011

 The steps below ouline how to create a self signed cert for use on your local development machine.  This will allow you to run local sites under HTTPS for testing purposes.

1.       Bring up a Visual Studio Command Prompt:  “All Programs>Microsoft Visual Studio 2008>Visual Studio Tools>Visual Studio 2008 Command Prompt” (substitute "Visual Studio 2010" where appropriate if using Visual Studio 2010).

2.       Execute the “makecert” command for your machine.  For this example the fully qualified host name, “yourdomain.com
 
”, is used as the certificate name:
makecert -r -pe -n "CN=yourdomain.com" -b 01/01/2008 -e 01/01/2050 -eku 1.3.6.1.5.5.7.3.1 -ss my -sr localMachine -sky exchange -sp "Microsoft RSA SChannel Cryptographic Provider" -sy 12 yourdomain.com.cer

3.       Use the IIS Web Server Certificate Wizard by right clicking on the web site where you want to install the certificate.

4.       Steps to add the Certificate to the the website:

1.       Right click the the website.

2.       Select “Properties”.

3.       Select the “Directory Security” tab.

4.       Select “Server Certificate”  from the “Secure communications” section of the tab.

5.       Click “Next” on the intro to the Web Server Certificate Wizard.

6.       Check “Assign an existing certificate” and click “Next”.

7.       Select the certificate name you just created with “makecert” above and click “next”.

8.       Specify the SSL port.

9.       Review your selections and click “next”.

10.   Click “Finish” to end the wizard.


Client Certificate Installation

In order to use SSL without the warning/error messages that IE will display by default when the server’s SSL certificate has not been issued by a recognized Certificate Authority (such as Verisign, etc.); you will need to add the certificate created by makecert into the “Trusted Root Certification Authorities” store of your Local Computer.

The steps to do this are as follows:

1.      Open up mmc (type “mmc” at the run or command prompt).

2.       Select “File>Add Remove Snap-In…”

3.       Select “Certificates” from the “Available snap-ins” and click “Add”.

4.       Select the “Computer Account” radio button.

5.       Select “Local Computer”, then “Finish”, then “OK”.

6.       Open up the “Certificates>Trusted Root Certification Authorities>Certificates” branch.

7.       Right click on “Certificates” and select “All Tasks>Import…”

8.       Click “Next”

9.       Browse to the certificate file created by “makecert” and “open”.

10.   Click “Next”

11.   Click “Finish”

 

MVC3 Upgrade The type 'System.Web.Mvc.AcceptVerbsAttribute' exists in both

by Cliff 26. January 2011

If after following the manual upgrade instructions you receive an error such as "The type 'System.Web.Mvc.AcceptVerbsAttribute' exists in both " you should try the following:

 

 

  1. Right click on the web site and view the properties -> and in the references section make sure you do not have duplicate references...if you do, delete one of them
  2. Check you bin directory, if you have System.Web.Mvc.dll in the bin, remove it (you may also need to remove System.Web.Abstractions.dll, etc.


    You should then be able to build 

 

Cliff Gray's Info

Cliff Gray
Developer/Founder GrayTechnology.com.

E-mail me Send mail

Authors

Calendar

<<  June 2017  >>
MoTuWeThFrSaSu
2930311234
567891011
12131415161718
19202122232425
262728293012
3456789

View posts in large calendar

Blogroll

Download BlogEngine.NET

Download at CodePlex

Disclaimer

The opinions expressed herein are my own personal opinions and do not represent my employer's view in anyway.

© Copyright 2017

Subscribe