The Sapp Family

A Frisco Texas Family

Browsing Posts published by Tim Sapp

128px-Free_Mind   OK, I am deleting Free Mind and will not be using it again.  It’s history! After spending quite a bit of time creating a mind map, staring with a list of passwords that I don’t want to forget it’s all gone.  I encrypted the password node and went to save it to find that it had save it as a zero byte file and overwrote the existing document. Everything is gone now!  Thanks for nothing Free Mind.

docear_logo  This time I downloaded Docear and should have stuck with it to begin with.  I have used it in the past and went with Free Mind as Docear has more features in it that I would ever use.  I guess I should have stuck with the good stuff to begin with.

Ole Blue Eyes

No comments

I was playing around with the WordPress android app last night and tool some photos of the crab in our Saltwater tank.  Here is one of the photos I got of ole blue eyes.wpid-wp-1409876013191.jpg

 

So I was working on another problem today with trying to get FormsAuthentication working on IIS7.  I kept getting two different errors with one giving me an error, and the other just causing the system to always loop back to the login page.

It drove me up the wall for about 4 hours today and it turned out to be a simple solution that was not obvious as to why it was causing it to fail.

The random error message was two part with one message in Event Viewer and the other on the web page error message.

In the event viewer I was getting a message of

Viewstate verification failed. Reason: The viewstate supplied failed integrity check.

and on the web page I was getting

Validation of viewstate MAC failed. If this application is hosted by a Web Farm or cluster, ensure that <machineKey> configuration specifies the same validationKey and validation algorithm. AutoGenerate cannot be used in a cluster.

So I started checking out Google in the obvious locations like StackOverflow.com, MSDN.Com…  But all of them kept saying that it was a machine key issue.  So I put a machine key in my web.config and that did not fix it, so then I put one in the Machine.config and I was still getting the errors.

What was really bugging me was I had built a quick little admin page for allowing me to create users and then login as that user and it was working great. The redirects were working and I was not getting looped back to the login page all the time.  Finally towards the end of the day I started to check the admin page and the login page line by line.

The login page was actually created by our marketing office and they use Dreamweaver for everything.  I was incorporating the code into the pages to make it work.  Both of the pages had a form and then two text boxes and a button.  The button called the code behind with the functions being identical.  The only thing that I could see different was in the form tag the login.aspx page had an action attribute calling for a jump to the member page, and the admin form did not.

I removed the action attribute from the form tag and low and behold it started to work.  I went back and removed the machine keys from the machine.config and the web.config and it still works.

I can only assume that since the forms action is trying to happen at the same time as the click of the button running it’s code behind there is a conflict and the action of the form is trying to run at the same time as the authentication.  I’ll have to do some more testing on this to see how it is actually affecting it.

 

 

So I was working on a web site that uses the ASP.Net membership provider but was connecting it to an existing database.  I tried for about an hour to get this web site up and going and kept getting an error when trying to create a new user in the membership database using this command

try
{
Membership.CreateUser(UserID.Text, Password.Text, EMail.Text);
Message.Text = “User Created.”;
UserID.Text = “”;
Password.Text = “”;
}
catch(Exception ex)
{
Message.Text = “Error in creating User” + ex.Message + ” — ” + ex.InnerException;
}

The Membership.CreateUser function is part of the System.Web.Security name space and as long as you have the web.config set up correctly you don’t have to add any extra code to get a user created.

 

Here is the error that I was getting;

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: Named Pipes Provider, error: 40 – Could not open a connection to SQL Server) — System.ComponentModel.Win32Exception (0x80004005): The network path was not found

I kept trying different things in my connection string to get it to connect.  I made sure that SQL Server was up and receiving remote connections, and I checked all the protocols in the SQL Configuration tool and made sure they were enabled too.  I changed the connection string to try and get it to connect but none of these worked.

ConnectionString=”server=.;

ConnectionString=”server=localhost;

ConnectionString=”server=localhost:1433;

 

 

While searching I came across this post

http://blog.sqlauthority.com/2009/05/21/sql-server-fix-error-provider-named-pipes-provider-error-40-could-not-open-a-connection-to-sql-server-microsoft-sql-server-error/

where he states that he can fix it and has several things to do and try.  I was happy that I did not have to try them all as I fixed my problem with one little tool.

The “SQLCMD -L” command being ran at the command prompt returned back a list of the SQL Servers it could find on the local network.  Since I was on an external wireless and not on our network I only got two entries back.  ComputerName\SQLSERVER2012 and ComputerName\SQLEXPRESS.   Arrggg that was it, since this was not my laptop I was not the one to install everything and someone from before installed SQL Server Express.  Then when they went to install SQL Server 2012 they accepted the defaults and installed the server as a SQL Instance.

 

This totally changes how SQL communicates and how you have to connect to it.  So, once I changed my SQL ConnectionString everything started working great. Now I have my connection string as

ConnectionString=”server=ComputerName\SQLSERVER2012;

So, if you are having this error, run SQLCMD -L and make sure that the SQL Server name is the same in the list as it is in your Connection String.

My new Corals

No comments

Went to a meeting of DFW Marine Aquarium Society (http://www.dfwmas.org) on Wednesday and while I was there I found a member who has done some fragging on his Kenya Tree and brought some to give out.  I grabbed a bag with a fair sized frag only to notice during the meeting that the bag was leaking.  So I went back to where they were set and and since there were plenty left I found a bag that was not leaking with the smallest frag I could find.  I combined the bags and brought them home.

Here is the big one in my tank, and I am happy to say that the polyps are out and now in full display.

Kenya Tree

I also happen to be setting with a family during the meeting and he had done some fragging himself. (it was hnurge on the forum) He had a list of people that had requested the frags but at least one person did not show up for the pickup.  Not wanting to let it go to waste I said I would take it.   I got it home and did a type of a drip cycle and got it into the tank.  After asking hnurge a couple question on light and flow placement I move the frags and all the polyps started to come out.

Here is my first ever Green Star Polyps AKA GSP with the polyps open.

Big_GSPThe first thing that I discovered by taking these photos is I REALLY need to clean the glass, and I need to buy some super glue gel.  It looks like my hermit crabs really enjoy crawling over the rocks and knocking the frags around. With the super glue gel I will be able to glue them to a rock and they will stay there and it does not harm the tank, I am not so sure if I can do the same thing with regular super glue.

The photos are also a bit grainy as I have the lights on low for acclimation purposes.  However, I may not need the lights that low as the coral seems to be doing fine with the lights the way they are. I am going to start turning up the lights today to see if they stay out and nothing bleaches.

I also got a good photo of one of the Pajama Cardinal fish and figured that since I had the photo I’d post it here.

PJ_Cardnal

 

 

So I am working on building a sump for a saltwater (marine) aquarium.  I am looking at the plumbing required to so I tossed together a SketchUp with the design I have in mind.  If you see anything wrong with the design then shoot me an email.

Sump1

Sump2

 

So if you are like me you started following the Module Development Process from the tutorial videos at http://www.dnnsoftware.com web site.  Now you have upgraded your visual studio install and Microsoft has been updating things as well.  Things like the MSBuildTasks project that the DNN module development process that the DNN guys have in their tutorials.  Now when you try and create a module you are running into two problems.

First once you install the Module Development Template from Chris Hammond’s CodexPlex page you find that following the tutorials is not working right.  Then you start searching the web and find “it all works for me” answers to your questions.   There are two problems that I always have to fix before things start to work correctly.

First, I always do my development on my local machine with my IIS mapped to Localhost, not DNNDev.me!   What the heck….  I have no idea why they decided to change it from localhost where everyone knows that it returns to the local machine.  I don’t want to have to create a DNNDev.me entry in my host file…  So, create a new DNN Compiled Module like so;

Create DNN Project

 

 

 

 

 

 

Once you click on OK, VS goes and creates the directory and all the files it requires for your project.   Then when it tries to open the project you get a great little error message of “The Web Application Project MyDNNMOdule is configured to use IIS. The Web server ‘http://dnndev.me…’ could not be found.”

DNNDevMeThis is just a message saying that it can’t find the site becuase you have not created a dnndev.me host entry and it’s not in IIS either.  So to resolve this error and to be able to open your project just to to the directory where you created your project and open the csproj file in something like notepad.  Once open there are two entries where you will need to change the dnndev.me to localhost.  Like this;

csproj code

Save and close the file and go back and open it again in Visual Studio.  It should now open and you are good to go.  Or are you?

 

Now make the changes to the Properties of the solution as directed in the tutorial video.  Then save your project and solution, make sure you save a solution file otherwise once of the following steps will not work right.  Leave your Solution Configuration in Debug mode and compile the solution and it should build with no errors.  Then change your config to Release and build the solution…  You are probably going to end up with an error of something like this….

The “MSBuild.Community.Tasks.XmlRead” task could not be loaded from the assembly E:\WebServer\MySite\DesktopModules\MyDNNMOdule\\packages\MSBuildTasks.1.4.0.56\tools\MSBuild.Community.Tasks.dll. Could not load file or assembly ‘

The system cannot find the file specified. Confirm that the <UsingTask> declaration is correct, that the assembly and all its dependencies are available, and that the task contains a public class that implements Microsoft.Build.Framework.ITask.

Yeah, that helps huh…  When you look though you might actually find the directory.  But for some reason it was not installed correctly, or not installed at all.  To resolve this issue you will need to install the MSBuildTasks using the Package Manager Console.  With your solution open go to the Tools\Library Package Manager menu and select Package Manager Console.   This will open up a a Console widow and you need to type the following command.

PM> Install-Package MSBuildTasks

Which if there are no issues on installing you will get the following back from the Package Manager Console
Successfully installed ‘MSBuildTasks 1.4.0.61’.
Successfully added ‘MSBuildTasks 1.4.0.61’ to PVAVideo.
Delete temporary file
Copying MSBuild Community Tasks files to E:\WebServer\Didasko\DesktopModules\PVAVideo\.build
Copying Sample Build.proj to E:\WebServer\Didasko\DesktopModules\PVAVideo
Don’t forget to commit the .build folder

You see the Version number in that return message.  Copy that into your clipboard because we need it with the next step.

In your Solution Explorer your should see a folder for build scripts, open it up.  Now open the MSBuild.Community.Task.Targets page.  In the first few lines, sixth line in my document, you will find the path for the MSBuildTasks install and it has the old version number in it.  Highlight the version number and paste in the new version from your clipboard.

MSBuild-Targets

Save your solution and run a release build on it again.  Now you should be able to get a successful build on your project.  It should have created the Install directory and placed the install zip files for installing into your  DNN.

 

I hope this can help someone, let me know if it does.

 

So I was needing to developing a module for a DotNetNuke 7.00.05 site.  The hardest part was not getting DotNetNuke up and running.  It was setting the permissions on the web folder directory on a machine running Windows 8.

I opened up Windows Explorer and right clicked on the folder and went to properties and then security. I added the user and when I tried to apply it all I got was Access Denied errors. I am in the administrators group on my machine but it did not matter.  I could not set the permissions.

So, after much research and trial and error, I discovered a wonderful little command line app that resolved the issue. It’s new for Windows 8 and it’s called icacls.exe.

To change the permissions I went to my Windows 8 Start menu and right clicked on the “Developer Command Prompt for Visual Studio 2012” and then clicked on “Run as Administrator.” I did not try it with the standard command prompt but I have a feeling that I would work as well.  After you open it up type the following command.

icacls_command

 

 

This will grant the user listed full rights to the directory listed and all of the files and directories below it.

I hope this helps someone out, it was a pain to find it.

 

I started having some problems with my Big Red Bee Beeline GPS at the last launch we went to.  I could not get a signal from it.   So I put together this little app so I could pull the feed from the serial port while the BRB was doing it’s thing.  If you have Visual Studio here is the code behind the form.

using System;
using System.IO;
using System.Data;
using System.Linq;
using System.Text;
using System.Drawing;
using System.IO.Ports;
using System.Windows.Forms;
using System.ComponentModel;
using System.Threading.Tasks;
using System.Collections.Generic;

namespace BRB_Port_Reader
{
public partial class Form1 : Form
{
private SerialPort BRB_Port;
private Queue<byte> recievedData = new Queue<byte>();

public Form1()
{
InitializeComponent();
}

private void ReadData_Click(object sender, EventArgs e)
{
BRB_Port = new SerialPort(“COM3″);
BRB_Port.Open();

BRB_Port.DataReceived += BRB_Port_DataReceived;
ReadData.Enabled = false;
}

void BRB_Port_DataReceived(object s, SerialDataReceivedEventArgs e)
{
byte[] data = new byte[BRB_Port.BytesToRead];
BRB_Port.Read(data, 0, data.Length);

data.ToList().ForEach(b => recievedData.Enqueue(b));
processData(data);
}

void processData(byte[] data)
{
SetText(System.Text.Encoding.ASCII.GetString(data));
}

delegate void SetTextCallback(string text);
private void SetText(string text)
{
if (this.textBox1.InvokeRequired)
{
SetTextCallback d = new SetTextCallback(SetText);
this.Invoke(d, new object[] { ” ” + text });
}
else
{
this.textBox1.Text = this.textBox1.Text + ” ” + text;
}
}

private void SetNewLine()
{
if (this.textBox1.InvokeRequired)
{
SetTextCallback d = new SetTextCallback(SetText);
this.Invoke(d, new object[] { this.textBox1.Text + System.Environment.NewLine});
}
else
{
this.textBox1.Text = this.textBox1.Text + System.Environment.NewLine;
}
}

}
}

We attended the HotRocs launch over the weekend and due to the wind I ended up shooting more photos than rockets.  I put up a gallery with the photos but I did not put them up here.  I put them up on the TNT web site so we could drive a bit more traffic to that site.

You will find them over http://tripolinorthtexas.org/tnt-at-asa/