Archive for the ‘ASP.NET’ Category

Problems with MSBUILD tasks after playing with Visual Studio 2010

I use a custom MSBUILD xml file to build some of my projects so that i can run stuff to compress CSS/JS files and stuff like that. After installing Visual Studio 2010 and playing around a bit with suddenly my builds started to fail.
C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v10.0\WebApplications\Microsoft.WebApplication.targets(132,11):
error MSB4064: The “Retries” parameter is not supported by the [...]

ASP.NET postback via JQuery / Javascript

ASP.NET Webforms isn’t the best platform to build web applications. I can’t wait to migrate my apps to ASP.NET MVC but until i have the time to do that i have to coup with some of asp.net strange parts.
Today i wanted to invoke a postback via JQuery wich actually was fairly easy but i wanted [...]

Quick attach to process in Visual Studio

When i debug web applications i like to go with the attach to process instead of pressing F5 when i use IIS as the development web server. It has lot of advantages:

If you are “deep down” in your application you do not have to start from the beginning again. Attach to process lets you debug [...]

My favorite Visual Studio dark theme

Every time i reinstall my computer i spend 30 minutes trying to find my favorite dark Visual Studio theme from the web. So i thought i better write about it here so i do not have to look for it again. So for my own pleasure, download the theme here.

Link: Rob Conery

404 redirects in code with ASP.NET

I have had problems doing proper 404 redirects in ASP.NET ever since i started to care about proper 404 pages. I do not have any troubles if the page really does not exist. But say for example that i require a querystring on some page and for some reason i do not get a querystring. [...]

Slow IIS on Vista with Firefox, Chrome or Safari

Ever noticed that sites are way slower in Firefox / Safari / Chrome and so on when you try to debug a website localhost on Vista.  Apperently there is some kind of DNS bug caused by IPv6. To fix it in Firefox you can type about:config and look up network.dns.disableIPv6 but this doesn’t fix the [...]

file_get_contents() in asp.net/C#

The URL shortening service http://bit.ly has a really simple and convient API that lets just get a short url like this.
http://bit.ly/api?url=http://www.myreallylong.com/url/with/lots?of=crap
I’ve used this in a wordpress installation with PHP before and there i could just do.
$twitter_url .= file_get_contents(’http://bit.ly/api?url=’ . get_permalink());
Simple and clean. But today i wanted to do the same thing with asp.net and found [...]

Publish web application project failed

I have had huge problems on various projects with the “publish” functionality in Visual Studio 2008. I like the feature, you just click publish, choose a directory and the files that is needed on the webserver is placed in the folder and you can easliy copy it to your server or whatever.
The problem with it [...]

ASP.NET membership: System.Web.Security. SqlRoleProvider problems

I had this really weird problem just now. I have done some work with the ASP.NET Membership provider and everything has been working great. But when i tried to deploy my application to the server i got this:
The ‘System.Web.Security.SqlRoleProvider’ requires a database schema compatible with schema version ‘1′. However, the current database schema is [...]