Friday, July 26, 2013

Adding a web reference to a class library project in Visual Studio when the option is not in the dropdown

If Visual Studio does not have a folder entitled Web References, you will not be able to right click and Add Web Reference to your project. This is common in Class Library projects.

There is a simple workaround. You should be able to add a generic Service Reference.

Right click your project and Add Service Reference. Click Advanced.




Then select Add Web Reference at the bottom of the dialog. That'll let you add a Web Reference like normal. YAY.


Hope that helps you fix the issue with being unable to add a web reference in a visual studio class library!

Friday, May 31, 2013

4 Ways to Shamelessly Plug Your Website or Project

Post it on reddit.com/r/ShamelessPlug

If you can dream it, there's a subreddit for it. And if you can't dream it, there's also a subreddit for it. Shameless Plug is a subreddit for showcasing your recent projects. So go ahead, you can be up front about what you are doing. Reddit is amazing at driving traffic to websites. Shameless Plug won't get you downvoted for...shameless plugs, like it will on other subreddits.

Ask friends to post it on their social media

It's one thing if you splatter something all over your twitter feed, facebook, and linkedin. But getting it re-posted, or better yet - posted from scratch by someone else - will be infinitely better for your SEO and for driving traffic. Chances are they will be more convincing than you will, because they are not connected to the project in the same way that you are.

Put it in the comments of a popular blog reviewing a similar product

DO not make it sound like spam. Again, be honest that you are trying to get people to just take a quick look at your new site. If you pretend to be someone else rating your website, it will be obvious to 99% of people and you will probably look like spam to the almighty googlebot.

Check out comparison sites and get your website listed

Sorry to break it to you, but your website is not that unique. The nice thing is that there are many sites, like socialcompare.com, alternativeto.net, and a million other review lists or comparisons for more established versions of whatever you made. So go ahead and list your stuff. It'll get you a few visits.

Wednesday, May 29, 2013

Why not use disposable email?

Giving out personal information is extremely easy online. It also makes you extremely traceable.

Companies collect LOADS of data about you and what one company knows may be shared among 100 others. Disposable email is helps - using a persistent email address when it is not necessary helps these companies link your identity.

There are loads of disposable email providers. Mailsac only keeps messages around for a few days at most; sometimes less. So you can create a temporary address on the fly, check it, and then forget it.

Monday, May 20, 2013

Check email your way. Mailsac has RSS and JSON feeds.

Starting now, Mailsac will let you check your inbox using the popular RSS xml format. As an added perk you can get your inbox as JSON. This further enables programmatic email retrieval.
Look for the buttons in your inbox!

JSON and RSS feeds allow you to automate the retrieval of your disposable email. An RSS reader can be used to check your inbox.

Stop wasting money on hosted email for your domain.

Use Mailsac.

If you don't need a million fancy features for hosted email, you're in luck.

Mailsac offers free email hosting for your custom domain. And it has minimal setup. Just point your MX records to Mailsac.com and viola - your domain now has its own public disposable email system.

Obviously this is not for use by anyone who needs security or the ability to reply. But on the upside you get unlimited email addresses, a JSON and XML feed for your inboxes, and the clean Mailsac responsive mobile interface, for the low low price of nothing.

Friday, May 17, 2013

Using Mailsac to avoid spam in your personal inbox and sign up for websites using a temporary email address

mailsac.com inbox image
a typical mailsac.com inbox

Divert spam from your private inbox into a mailsac

Even if you have gmail, you'll get spam occasionally. There are ways to get rid of it, but that takes your precious time. People often opt themselves into newsletters, but they can become a kind of spam you bring on yourself.

Mailsac.com provides free, temporary, disposable, no-setup inboxes to use when you need to provide an email address to do something on the internet but don't want to risk getting spammed. 

To use Mailsac, just make up any email address @mailsac.com and the inbox will be created as mail arrives. No need to set anything up.

All inboxes are public, but typically people enjoy a decent amount of privacy.

Messages are cleared after about 3 days.

Safety features are included

To protect people from evil links and scripts embedded in email, the initial view of an email is properly sanitized. If you trust the sender, just click to view the message unblocked. You can view the raw text also.

Other reasons to use Mailsac

Some people use Mailsac for testing their email systems. Test emails can be sent to mailsac.com and no account setup is needed, which makes it easy for system admins and developers. Sending a lot of messages could get you banned, but for the most part people use Mailsac to test without any issues. Developers have found it convenient to be able to send test email messages to mailsac.com when working on their apps. Server administrators often need to confirm that servers have smtp enabled correctly, so they use Mailsac.



Tuesday, April 23, 2013

Developing Betasac.org, an open source app for the beta testing community

Betasac is an open source Node.js using Express.js 3.x, MongoDB, Redis. See it on GitHub.

It is a free online community for sharing and promoting apps while they are in alpha or beta testing.

Getting setup

You'll need Redis, hosted locally or in the cloud. 

Suggested Redis providers

You'll also need MongoDB, again hosted locally or in the cloud.

Suggested MongoDB providers


Node.js version 8.x+ must be installed.

Clone the repository from github:
git clone https://github.com/ruffrey/betasac.git && cd betasac

Make sure the packages are installed.
(sudo where applicable) npm install

Put your settings in the betasac/config.js file.

Start the app:
node app.js

You should see a printout of the configs and then after a few seconds an indication of a successful MongoDB connection.

That's it!

Monday, April 22, 2013

Is dnndev.me safe for local development?

Local DotNetNuke Development

When developing DotNetNuke on your local machine, it can be easier to use the domain dnndev.me or anysubdomain.dnndev.me. The official DNN instructions call for this setup.

Safety? Do they see my traffic?

It's safe.

No, they cannot see your traffic.

DNS resolution

The Domain Name *.dnndev.me simply resolves back to 127.0.0.1 - in other words, when your browser does a request for funkychicken.dnndev.me, it goes to your DNS service and the DNS service tells you which IP address to send you to. Everything at dnndev.me is set to point to 127.0.0.1 - which is always your local machine's IP address.

Once your browser knows the IP location of dnndev.me, it will send all future requests to 127.0.0.1.

Saturday, April 20, 2013

Betasac community is live: check out apps before they are released

Connecting early adopters and developers

Betasac provides a simple online format for developers and others to post classified notices about their app while it is beta.

Developers win because they can get publicize their app in a fair environment. It's fast and free to post a beta test on Betasac.

Early adopters win because they can find apps before they go live and give them a test run. You do not need an account to browse apps.

Betasac is open source

The source for Betasac is hosted on github. Anyone can get involved. Fork it!

Check it out

Go to betasac.org to check it out.



Friday, April 19, 2013

How to solve HTTP 500.12 Handler "PageHandlerFactory-Integrated" has a bad module "ManagedPipelineHandler" in its module list

Your ASP.NET may not be configured properly for IIS if you see this message:


HTTP Error 500.21 - Internal Server Error
Handler "PageHandlerFactory-Integrated" has a bad module "ManagedPipelineHandler" in its module list




Resolution


  1. Navigate to C:\Windows\Microsoft.NET\
  2. Open a terminal here.
  3. Type aspnet_regiis.exe -i and then enter.
  4. You should see the following if it finished correctly:
    1. Start installing ASP.NET
    2. ..........
    3. Finished installing ASP.NET
  5. Restart the IIS server.

Troubleshooting

Check the path to make sure it actually exists.

C# and JavaScript - Inheritance Examples

JavaScript uses prototypal inheritance, which is different from what we are used to in C#, Java, etc.

You can accomplish the same thing in Javascript, but with different syntax.


// JS Inheritable Class
function Animal(){
 
 this.animal_name = "";
 
 this.lengthOfToes = [];
 
 this.hasClaws = false;
 
}

// JS Inheritable Class, alternative format
var Animal = function(){};  // empty function
Animal.prototype.animal_name = "";
Animal.prototype.lengthOfToes = [];
Animal.prototype.hasClaws = false;


// creating an instance of an object
var Lion = new Animal();

// extending it
Lion.prototype.hasMane = true;

// JS Object Literal, NOT inheritable
var Animal = {

 animal_name: "Simba",
 
 lengthOfToes: [2,3,3,3,2,3,2,4,2,3],
 
 hasClaws: false
 
};

// C#
public virtual class Animal
{
 public string animal_name { get; set; }
 int[] arrProp = new int[]();
}

public partial class Lion : Animal
{
 public bool hasMane = new bool();
}


JSON in 5 minutes


JSON = JavaScript Object Notation

  • lightweight data-interchange format
  • is literally javascript code - valid data types: Objects, Arrays, Numbers, Strings (includes Date), Boolean
  • keys must be in quotes, unlike in javascript code the keys do not need quotes.
  • Supports unlimited nesting 

Example

 {
 "key1": "I like cheese",
 "key2": ["An","array","of","strings","with",1,"number"],
 "keyForAnObject": {
   "Cheeses": ["Blue","Swiss","Cheddar","Jack"],
   "NumberOfCheese": 2,
   "FavoriteCheeseIndex": 1,
   "isThereAFavorite": true
 }
}
Accessing the data in Javascript:
var JsonDataString = {
 "key1": "I like cheese",
 "key2": ["An","array","of","strings","with",1,"number"],
 "keyForAnObject": {
   "Cheeses": ["Blue","Swiss","Cheddar","Jack"],
   "NumberOfCheese": 2,
   "FavoriteCheeseIndex": 1,
   "isThereAFavorite": true
 }
};

var data = JSON.parse(JsonDataString); // JSON is a global function

data.key1 // "I like cheese"
data.key2[3] // "strings"
data.key2[5] // 1
var internalObject = data.KeyForAnObject;
internalObject.Cheeses[1] // "Swiss"
data.KeyForAnObject.Cheeses[1] // "Swiss"

Most important Javascript JSON functions

JSON.parse( JsonDataString )
Safer than eval(). Returns a javascript object/type.
JSON.stringify( Object )
Returns a JSON string from any non-function javascript object. 

Cross platform

These Javascript JSON functions are available in some form for basically every programming language.
See http://json.org/ and scroll down for all of the supported libraries. 
Note: JSON.stringify() is often "serializeAsJson" or something similar.

C# Pseudo-code Example

using System.Web.Script.Serialization;
class SomeClass
{
 class JsonResponse
 {
  public bool TrueOrFalse = true;
  public string Hi = "hi!";
  public List = new List();
 }
 
 public static string Responder()
 {
  JavaScriptSerializer jss = new JavaScriptSerializer();
  JsonResponse resObj = new JsonResponse();
  
  return jss.Serialize(resObj);
 }
 
}

Use cases

JSON can be used wherever XML is used, but is more human readable and has a smaller footprint. More easily supports typed data than XML.
Returning JSON from a server to a client browser during AJAX. Since JSON maps directly to a javascript object it can be manipulated as native code.
Multidimensional arrays or arrays of objects are common, representing database rows and columns.
Example response from server:
Content-Type: application/json
[[
 1,"Jim","yeeee"
],[
 2,"Wilson","I like cheese"
]]

as XML, it might look like:

 
  1
  Jim
  yeeee
 
 
  2
  Wilson
  I like cheese
 


Convincing your manager to use Node.js

It can be tough to adopt new technologies in the enterprise. How do you convince your enterprise leadership that Node.js is the future? How do you let them know they are missing the next big thing?

Open source is the future

If you must convince your leadership of this, well, good luck. Developers want to work places that support open source, not simply use open source. Node.js is changing the face of the open source community because it is relatively young but has the most active community of any platform. This point needs to be underlined: Node.js has thousands of actively maintained packages of high quality open source software. Already. It took years for Java to get that far. 

In the coming years, if a company strategy does not include open source development, they can kiss their devs goodbye. To remain competitive candidates, developers must be plugged into open source, maintain their GitHub and StackOverflow.com profiles, and stay on top of new libraries for their given platform. Quite honestly your tech manager or director is in danger of being obsolete if they don't grasp open source. Help them out!

Async and HTTP APIs

Everybody has an HTTP JSON API now. The entire web uses this communication standard. Developers expect to be able to communicate with your platform using JSON over HTTP. It's secure, fast, distributed, cloud-friendly, etc. New applications use a distributed grouping of cloud services from different providers, from Redis or Memcached session storate, message queues, databases - especially replication-friendly NoSQL ones like CouchDB and MongoDB. Static resources are hosted on different servers. SMTP sending is handled by third party senders "transactional" services like Amazon SES, Mandrill, or SendGrid. And even the SMTP packages are sent as JSON.

Quite honestly, Node.js is perfectly poised to communicate as JSON over HTTP. JSON is (obviously!) native to the JavaScript language. The Node.js networking libraries, plus numerous open source NPM packages, make it insanely easy to communicate over any network protocol.

Now that we've established the ubiquity of JSON APIs, do you really want to develop synchronous programs and block your application execution thread while you wait for a reply? Probably not. Node can handle tens of thousands of concurrent connections on a single thread with modest resources due to the asynchronous nature of the language and the geniuses at Google who develop the V8 engine. It is extremely good at linking web services together.

Other languages add asynchronous functionality as an afterthought. In Node.js and JavaScript as a language, it is a core component.

Less ramp up time

Your developers already code JavaScript on the frontend. They likely have only a marginal understanding of the power of JavaScript's object-oriented features and the callback paradigm, but that can be grasped quickly. Once they do "get it" they will reach new levels of productivity with their web service development. An understanding of JavaScript's functional prototypical inheritance pattern and the use of asynchronous callbacks makes it easier to leverage these features in other languages.



How have you had success getting your company to adopt Node.js?





Tuesday, April 16, 2013

List of free/unpaid Twitter Bootstrap theme websites

What's Bootstrap?

Bootstrap is a beloved responsive CSS and javascript framework.

Github repository for bootstrap »

Bootstrap themes for free

WrapBootstrap

WrapBootstrap has 12 free and awesome themes. They are fully built out and beautiful. Just download the CSS and go.

Bootstrap Free

BootstrapFree.com lists several free themes. Some of them include example pages.

Jobpixels

They offer three free themes.

Roots theme for Wordpress

You can check to the github repo to get the bootstrap styles.

WPBootstrap

Also a Wordpress theme, but you can extract the styles from github, too.

Bootstrap themes for almost free

Portnine

Three nice themes, but they require a linkback and are limited to one server.



Simple. Mobile.
Forever free plan for lots of contacts.