ASP.net hosting – post Vista installation

Posted on

Crazy thing that I’ve been putting off diagnosing – the inability to debug/test without debugging since the installation of vista on my home PC.

I could debug on my other computers, so I just would switch to them, but today I finally decided to see what I could do about the issue.

What I was experiencing was somehow a sort of lack of connectivity to the host, even though it was on something similar to: Localhost:50234/default.html

Cannot connect to self?  That’s odd.

My thoughts were beginning to come around to the memory of the initial setup of the development tools onto the computer.  The .net framework was already part of the installation which had a 2-sided thought process to me, that’s either really cool or really not so cool.

Everything else installed cleanly without issues, so I just moved along.

I’ve finally come to the conclusion that there’s something to the installation that is not included by default with windows vista – and that would be some of the base administrative tools, including IIS for local hosting of web services.

Sure enough – I am finding that I need to add that as an additional feature.

So if you are having the same issue where you are testing your silverlight application or ASP.net site from Visual Studio, and IE reports that it cannot connect, then head over to the control panel, open the programs and select the “Turn Windows features on or off” and get IIS.  While doing that, don’t forget to enable various features, such IIS Management console, WWW Services, and the various IIS6 management settings.  Just selecting the box for IIS won’t install the necessary items needed for serving localy hosted ASP.net services.

 Update: I still wasn’t able to get anything to run from Visual Studio.  I could go straight to localhost/ and see that IIS 7 was running, but anything at all run using the ASP.net Dev Server would return a failed connection attempt.  *sigh*

Finally I located information regarding a recent response made by Microsoft to a high threat trojan.  Their response was to wipe out the IP address information of the LocalHost.

So to fix this, I located and modified the hosts file.  In most computers, this should be in %windowsdir%>system 32>drivers>etc>hosts.  Updated it in a notepad entry and added the local host IP back to this file to result in 127.0.0.1 as instructed by Microsoft’s Malware Protection Center’s article.

Testing… YAY!  My silverlight apps now run!

Creating a Silverlight project in Visual Studio vs. Blend

Posted on

You’d think that the creation of a project in either Blend or Visual Studio, that they would start the entire solution with the same files.

Unfortunately that is not the case, and this is bad, not good.

So I’m working on a project, it has a pretty reflection on it and a main background that doesn’t take away from the elements and the bad part is I started it in Blend.  So what happens when I run the silverlight application?

My SL Is in the contained box and the rest of my browser is WHITE.  I can modify this by going to the debug folder, but then I can only open build from visual studio, because blend wants to rewrite the debug html file every time it loads.

This means that when I want to center the object and make the rest of the background more cohesive… ugh!

————–

When creating a Silverlight project in Visual Studio, it not only creates the items a bit cleaner, it also creates a seperate set of folders – inside one of these folders is a beautiful basic HTML page (and an aspx page, to use HTML, you have to right-click and tell it to be the starter page) which houses the information and is editable… and the modifications stay regardless of the application that I’m using to test!

Eeeee!

I need a “tsk tsk” bird to come out of somewhere every time I forget to start a project in Visual Studio.

XamlFest – 2 day training

Posted on

The most recent group meeting with the Seattle Developer / Designer Interaction group was great – I think one of the most fun that we’ve had so far.

One of those attending was development Evangelist, Mithun Dhar, who mentioned to us the 2 upcoming XamlFest training events occuring next month.

I can’t help myself – 2 days of uninturupted training and colaboration with others who are interested in development and design working in WPF and Silverlight?

My email has been sent in to RSVP a spot – especially w/ mention that there are only 50 seats available!

Ok, so if you’re visiting and interested as well, here are a few links with information:

http://blogs.msdn.com/usisvde/archive/2009/01/22/designers-developers-ramp-up-with-februrary-xamlfest-events-across-the-usa.aspx

http://blogs.msdn.com/MithunD/

The skinny that you’ll find there is this:

Redmond & Portland both are hosts to XamlFest in the Pacific Northwest.  There are other areas that have these events as well, but I’m just going to talk about the 2 which are close to my home.  The Redmond, Washington one is the 16th and 17th (Monday and Tuesday) of February, and Portland, Oregon one is on the 19th and the 20th (Thursday and Friday).

If you wish to join, RSVP asap – seating is limited and I mean quite limited. 

The email addresses are fairly obvious which is for which, so I’m going to just list them both below:

xamlfest-redmond@live.com

xamlfest-portland@live.com

All who attend will obtain a copy of Expression Studio and Visual Studio 2008 Pro.

Media Player – a YouTube video of it

Posted on

The media player which Victor’s book steps you through on chapter 6 is complete.  I customized it a bit and added a back button, which was coded essentially as an inverse of the next button.

As far as the user experience elements, the play button plays, stop button stops, and pause button pauses, however, the pause button was set up as a toggle, so if it is pressed while paused, it will resume play.

Cool part that I feel I should mention is that all of the visual elements are done in XAML. The buttons appear to have been done in photoshop or illustrator, but they’re not. They’re 100% XAML code.

The limitations which I’m seeing are as follows:

The logic behind the next and back buttons are limited.  If you hit next to get to the next video, that works, however, you hit it again, and it doesn’t toggle back to the original – it just replays the 2nd video.

The same goes for the back.  If its on the first video and its playing, and you hit the back button again, it restarts the first video.

The last bit which somewhat makes me internally twitch, is that at this point, these buttons are functional, but they don’t appear to interact with the user.  I know – we’ll likely get there further into the book, but at the very moment, I just have to take my knowledge that they do actually do something and pretend that the interaction with the buttons is there in a, “Perhaps I blinked?” sort of way.  We’re not far enough through the book to start making further interactions, but in the interest of my own sanity, I told all of my buttons to change the cursor to the “Hand” so as to make them somewhat appear as if they were more than pretty pictures on a gradient.

Below is the video:

Note: This is second published video which displays an example of what can be accomplished as you’re going through this book on Blend 2. To view the first video posted click here.

Closing textblocks inside open tags

Posted on

From my experience, I always kick myself every time I do something like the following:

<TextBlock Text="Bogus Text" />

The reason I kick myself is that I find by closing a tag like this, I’m essentially shooting myself in the foot before I get very far.  If I close a tag now, within the same line as I open it, I run the risk of having to break it out, and then do a </TextBlock> later.

Yes, this is just an additional step, but if I have a whole lot of conditions within this, I’ll find myself losing my place very quickly.  Instead, I’ll seperate the command – for just in case.  It sets up the markup for future additions.

Example:

<TextBlock Text="Bogus Text">
</TextBlock>

Preparing for the future saves you on time later.  Oh – reasons I mention this – again, from Victor’s book.  He’s having you create, just to test the application to verify that Visual Studios created it without flaws, a simple Text Block with “FOO” as the text.  Yes, it’s there just to test the application and verify that its functional.  However, if you’re in the habit of always always creating things for the future, you hardly ever have to think about what you’re doing when performing something as simple as the creation of a textblock.  Those habits tend to pay off in the long run.  If you do things “the lazy way” most of the time, and properly only when the time calls for it, you’re likely to accidentally slip into your lazy mode and have to correct yourself every single time you put the fingers to the keyboard.

Need I mention this “right way now” mindset applies to every other aspect of life?

Disabling design view in Visual Studios

Posted on

For those that missed my blog earlier today, I am going through the Victor Gaudioso’s book on Blend 2, and one of the first things he has you do is create your application, not in blend, but in Visual Studios.  He makes quite a few valid points why he does it this way – the theme around these points centers around cleanliness of the markup and code – of which I can thoroughly identify with.  My greatest pet-peeve about coming into projects in the middle is that most things that I encounter are done half-*ss and sloppy instead of being done cleanly, properly, and legibly.  The typical user won’t see the code, but for those who will have to come in after the initial work is done, doing things correctly the first time, saves a company in the long run.

So before I get myself into even more of a rant on that note, I’ll stop myself and just say that I concur with Victor.  Cleaner is better.

The next thing he has you do is create the specific type of WPF application, move it to a c: directory folder (c:/ ?  Why?! ) and then goes into removing the design view by having you “Open with…” the document and open it in XML view.

… Why?

The easier way which allows you to retain the nice color distinctions which are by default – and in many cases, turned off when viewing in XML view – is to just click the little “-” button right above the designer.  Now, I’ll take it a step further and move the design view to nest below my code view, and then minimize, which just gives the ability to view if you click on the design tab.

Why go through the “open with”, which takes away a tiny level of functionality?  It may be tiny – miniscule, in fact, but I like that functionality, dangit!

So I’m skipping his step here.  For those who are interested in following me along on my trip through this book, I’d recommend that you just minimize the design view and have the code-view take up the screen.