An Example Of The Need To Use Absolute URLs
I have been doing some work around twitter and ASP.NET MVC. The way twitter authentication works, is that I have a page that creates a twitter URL, redirects the user to twitter,
the users accepts to use the application associated with the website, and twitter redirects the user to a callback URL, the completes processing of the user credentials. In order to set a callback URL dynamically (especially in development, when the callback is likely a localhost one), we need to send the absolute URL to twitter.
Other examples might include having a “permanent URL” for some resource (product, blog post, etc..), or maybe a link to be used in emails or so. There can be many usages, so, let’s see how to do it!
How We Did It In Webforms
In webforms, the easiest way to do it was to use the Control.ResolveClientUrl() method.
Typically you pass a URL relative to the current code file (.aspx, .master or .ascx file). and it returns the corresponding absolute URL of that. Of course when the file is a control or a master page file, we don’t always want/have a path relative to this file. The work around for this was passing a relative URL that starts with “~/”. As you probably know, “~/” represents the root of the website.
Read the full post ... (584 words, 3 images, estimated 2:20 mins reading time)
.NET FAQ, ASP.NET, ASP.NET Controls, ASP.NET MVC
This is copied from one of my replies in WebHostingTalk. Thought it might be useful for GuruStop readers too.
The purpose of the reply was to provide a review to Burst.NET, my budget VPS hosting (with some references to a premium (yet premium) VPS, SoftSys Hosting), but the real value of the reply, is to help give realistic expectations about various differences when deciding to choose a "good" budget VPS Windows hosting.
The Review
Generally speaking as a "current" customer with Burst.NET. Their equation is:
Budget Price = Good Service + Enough Support + Poor SLA
So, most of the time the server is working, most of the time it’s working, it works really fast (compared to my chosen specs, 1.5GB RAM Windows), the network also is really nice especially their West Coast (LA) location.
Given that, sometimes the VPS is slow, sometimes too slow, once it was slow that was unusable.
When the server is just slow, the services hosted on it didn’t seem to be much affected, when the server is too slow or reaches the unusable state, I get between 5 minutes to 2 hours downtime (happened only once).
Read the full post ... (933 words, 3 images, estimated 3:44 mins reading time)
ASP.NET, Miscellaneous, Windows-VPS-Hosting
This morning I got a nice little email from a dear Egyptian friend, Ebeid Soliman (@ebeid_soliman) asking the following:
I know this may be something answered by google, but I trust your opinion.
What is the best free automated UI testing framework/tool you used ? or know ?
I actually already have a long draft on the subject showing the framework I use, and how to get basic stuff working on it, since this one is not yet complete, let me for now share my reply to him with you, as raw as possible …
(I have added some titles to make the long reply more readable)
The Reply
Choosing a framework
Look, I haven’t tried many. Only Watin and Selenium, and even Watin didn’t dig it enough.
The people around me all seem to be using Selenium. This is not only the story though…
Read the full post ... (980 words, 2 images, estimated 3:55 mins reading time)
.NET, .NET FAQ, ALT.NET, ASP.NET, Selenium, UI Testing
MvcConf
Assuming some of you have attended live or watched the recordings for the past MVCConf conference. It’s a virtual conference concerned (as the name tells) about everything related to Web MVC Frameworks in .NET (ASP.NET MVC, FubuMVC, Spark, …).
Videos from the previous MvcConf event can be found at:
http://www.viddler.com/explore/mvcconf/videos/ and http://tekpub.com/conferences/mvcconf
MvcConf 2
They plan to have a second event after the great success of the first one. And they started a call-for speakers. See:
http://www.mvcconf.com/
Quoting Details
When:
Tuesday Feb 1st 8AM – 5PM CST
Where:
Virtual
Register:
Check back 1/17
Call For Speakers
If you would like to speak at this years conference. Fill out the Speaker Proposal form.
An Awesome Conference
MvcConf is a virtual conference focused on one thing: writing awesome applications on top of the ASP.Net MVC framework. Your brain will explode from taking in so much hard core technical sessions. Sounds fun eh?
This is a community event and we want the best and brightest sharing what they know.
We intend to record each session and make them available online for viewing. We intend to make the videos available free of charge, depending on conference sponsorships.
Read the full post ... (230 words, 2 images, estimated 55 secs reading time)
.NET, ALT.NET, ASP.NET, ASP.NET MVC, General News, Local Events, Microsoft News, MVC
This is a PowerPoint Presentation (and extraction of the contents) I made as per a couple of friends’ request (@EmadAshi and @AmrEldib) to show how OAuth works along with Twitter and how easy it is to cache OAuth credentials.
As I was doing related work for TweetToEmail. I felt a PowerPoint presentation will be even better than a blog post for this one, but here you get the two.
The Presentation
The Contents
Application Registration
- A Twitter user creates a Twitter Application
- If the application is web based, it needs to provide a URL. “Localhost” is not accepted as a domain for this URL
- A Twitter Application gets two pieces of information
- Consumer Key
- Consumer Secret
- A Twitter Application will use these in all coming requests.
Initializing The Process
- User comes to the application and it decides to authenticate against Twitter
- Application makes a request using Consumer Key and Secret to obtain “Oauth Request Token”, which consists of two parts
- Application makes authentication URL including the “Oauth Request Token” parameter, and optionally a “Call-back URL” (if different than default URL in first step)
Read the full post ... (505 words, 5 images, estimated 2:01 mins reading time)
.NET, ASP.NET, Code Gallery, Code Reading, Code Snippets, CodeProject, Local Events, twitter, Web 2.0