Using Visual Studio 2012 Web Publish For Staging On The Internet

  Let’s say you have a production code like http://siliconvalley-codecamp.com and you want to have a test site on the internet that will not be seen by anyone unless they login (or maybe even login as an admin).  Using web.config (with Visual Studio 2012), transformations makes that very straight forward.  I know because I just did that.  I created a test site (say: http://test.siliconvalley-codecamp.com) and set up my publish to replace my normal anonymous authentication (allowing anonymous users) to one that denies anonymous users.  Just as an aside, the reason I did this was I notice that google was indexing some of those pages even though my robots.txt file says to deny access to all robots.  Apparently … Continue Reading

VS2012 Web Deploy, Using Transforms For Connection String In Production (Web.Config)

  Introduction I should have learned this a long time ago.  I certainly have known about it since VS2010 when it was introduced, I’ve read about it multiple times, I just thought I did not have the time to learn it so for the past couple years, I’ve been making one web.config change after another and of course making all the stupid little mistakes we all make (I think) when we do things manually. So, in 25 minutes this morning, I updated my http://siliconvalley-codecamp.com site with Web.Config transforms so now, when I “publish” with Visual Studio 2012 I just pick the correct profile (either beta4 or svccprod) and when I do the publish command, I get the correct database connection strings.  svcodecamptest for beta4 and … Continue Reading

Using SASS and Compass to Solve 2 CSS files into 1 CSS File

I’m currently building a simple SenchaTouch app that includes a twitter stream.  The example CSS that came with the app was global  in nature.  That is, it set styles on all image tags, h2 tags, etc.  Here is what it looks like:   h2 { font-weight: bold; padding-bottom: 3px; } img { border-radius: 5px; float: left; } .tweet { font-size: 70%; margin-left: 60px; color: #333; min-height: 50px; } .x-list-item { border-top: 1px solid white; } .posted { float: right; } What this does is every img tag will get a float left.  Very bad!  So, I’ already using Sass (style with attitude) and compass in my app so all I need to do is wrap the code that actually uses … Continue Reading

HttpClient Verses WebClient with .Net and C#

I often find I do what I know over and over again and don’t look for new solutions if the old tried and true solution works.  At my last hackathon, I wrote an app the screen scraped the starbucks site.  I noticed when I looked at the site that a redirect happened after sign in.  My WebClient call did not follow the redirect.  I asked for help from a very bright Microsoft Azure guy (Josh Twist) who blogs at http://www.thejoyofcode.com/About_us.aspx.  Josh suggested switching to HttpClient and making sure to set the option that follows redirects. Perfect!  I’m hooked on HttpClient now forever. WebClient is now just in my rear view mirror. … Continue Reading

Follow

Get every new post delivered to your Inbox

Join other followers: