AdventuresWith.Net | Dann Blackwell

CAT | Uncategorized

I hate ASP classic. I hate it with a passion. AND THEN when your browser crashes every time that you go to debug it, you start building muderous tendancies.

Anyway, Found a solution. Hot fix to VS 2008 that fixes this and a few things that I didnt care about.

http://code.msdn.microsoft.com/KB967631

This QFE fixes three complete separate issues in the VS2008 SP1 Debugger:
- Debugger can hang the IDE after setting a breakpoint when working with a large C++ project
- Breakpoints do not bind correctly when an MSIL file is built containing .line directives
- VS crashes when debugging a classic ASP web and debugging is stopped.

,

Have watched a great presentation today from Scott Hanselman from the MIX 10 conference.

YOU MUST/NEED TO WATCH THIS!  -> Scott Hanselman presents the IIS Web Deploy

There were a few great ideas built in to his story, such as Web Deploy sitting on the back of a continuous integration setup and pushing out all the good stuff on successful build.

A problem I had while setting up Web Deploy was that there was no “Management Service Delegation” icon in IIS after installing the Web Deploy tool from the Web Platform Installer.

I solved it by downloading the actual install for the Web Deployment tool itself, then changing the setup so that IIS management items were installed. Voila! I have my icon:

image

Also, I had to add (for some unknown reason) an allow all IP range into my Management Service to stop 404 Errors.

image 

credit to AndyFraley @ IIS Forum – Web Deploy thread – http://forums.iis.net/t/1163109.aspx

No tags

 

I found two new tricks to make all these things work together for debugging a Visual Studio Asp.Net web project on Localhost. Here they are:

  1. Disable IPv6 – This stops the “Fiddler: No connection could be made because the target machine actively refused it” message.  (Credit to Mike Ormand) This happens as visual studio will not allow external connections to the “test” server it creates, so all requests must be local.
    For some reason it treats fiddler IPv6 connections as external, and therefore nothing works through the fiddler proxy.
    fiddler_disableIPv6
  2. Instead of using localhost, use localhost.  <- notice the fullstop / period on the end of the localhost. This makes it look external, so the requests show up in your Fiddler GUI.
    image

And there you go! A working Fiddler session off the Localhost.

No tags

This is about Codility Candidate Testing

I just did a test on Codility and it’s great! In fact, this is sooo much than PreVisor (http://select2perform.com) which I had to use the other day.

You can write your code in any language (as long as its in Java, C#, C++, Javascript, Ruby, Pearl, Python, Pascal, C and I think a few more)

image

Maybe I like it because I did so well :)

image

 

You have a simple test system initially so you can check if your code compiles and fits the initial test. Then you submit it to the hard core tests which tries to break it, and you get a score.

 

The analysis is very cool:

image

And I know why i failed test 4. Should have used double instead of int. But that’s why you use TDD, ‘cause those mistakes are easily made. 

No tags

Just made a quick and dirty Ubiquity command for StackOverflow searches.

Download from GitHub:  Ubiquity StackOverflow Search 

Don’t know Ubiquity?

It’s like a Command Line for the web but… it’s really cool! Trust me. Watch the clip below. Sure it starts out dull, but then so does District 9. Then bam, explosions and stuff! It’s not 0.1 anymore either, so ignore that bit.

The link to get it is https://mozillalabs.com/ubiquity/
Then go to about:ubiquity and read the Commands. There are lots!

No tags

This is a direct quote from the Wikipedia page on Global.asax. Just thought it would be nice to a quick list to refer to.

  • Application_Init
    • Fires when the application initializes for the first time.
  • Application_Start
    • Fires the first time an application starts.
  • Session_Start
    • Fires the first time when a user’s session is started.
  • Application_BeginRequest
    • Fires each time a new request comes in.
  • Application_EndRequest
    • Fires when the application terminates.
  • Application_AuthenticateRequest
    • Indicates that a request is ready to be authenticated.
  • Application_Error
    • Fires when an unhandled error occurs within the application.
  • Session_End
    • Fires whenever a single user Session ends or times out.
  • Application_End
    • Fires when the application ends or times out (Typically used for application cleanup logic).

No tags

A handy list of ActionResult’s that I found on StackOverflow thanks to Chris.S and his reference to the MSDN doc.

ContentResult
Writes a string value directly into the HTTP response.

EmptyResult
Does not write to the HTTP response.

FileContentResult
Takes the contents of a file (represented as an array of bytes) and write the contents into the HTTP response.

FilePathResult
Takes the contents of a file at the given location and writes the contents into the HTTP response.

FileStreamResult
Takes a file stream produced by the controller and writes the stream into the HTTP response.

HttpUnauthorizedResult
A special result used by authorization filters when authorization checks fail.

JavaScriptResult
Responds to the client with a script for the client to execute.

JsonResult
Responds to the client with data in JavaScript Object Notation (JSON).

RedirectResult
Redirects the client to a new URL.

RedirectToRouteResult
Renders the specified view to respond with an HTML fragment (typically used in AJAX scenarios).

PartialViewResult
Renders the specified view to respond with an HTML fragment (typically used in AJAX scenarios).

ViewResult
Renders the specified view and responds to the client with HTML.

Its always tough to figure out what’s happening to your domains when you register them, set the Name Servers and… well nothing happens.

So you do this:

1) Download DNSDataView and run it

2) Write in your Domain name and your expected DOMAIN NAME SERVER

image

3) Click OK and if you get something to show (like below), then you can put these names as the primary and secondary name servers for your domain!  (ping the servers to get the IPs if needed). If not try another server in the list.

image

The usual nameservers for me were:

ns14.domaincontrol.com
ns15.domaincontrol.com
ns25.domaincontrol.com
ns26.domaincontrol.com
ns48.domaincontrol.com
ns49.domaincontrol.com
ns50.domaincontrol.com
ns51.domaincontrol.com

,