I develop with 1.1 and 2.0 - When VS 2003 creates a web solution it is configured to use the 2.0 runtime. Placeing the following code to the Global.asax’s of your 1.1 projects and setting execute permissions on the aspnet_regiis.exe helps much. protected void Application_Start(Object sender, EventArgs e){ if(System.Environment.Version.Major == 2) { System.Diagnostics.Process p = new System.Diagnostics.Process(); p.StartInfo.FileName = "%WINDIR%\\Microsoft.NET\\Framework\\v1.1.4322\\aspnet_regiis.exe"; p.StartInfo.Arguments = "-s W3SVC/1/ROOT" + Request.ApplicationPath; p.StartInfo.UseShellExecute = false; p.
Websites and blogs of people that attended a Homebrew Website Club Düsseldorf.
Simply resize an uploaded image
I got an E-Mail from a student this morning asking how to thumbnail an uploaded image. Here is a “quick” solution (there are a few things you can do to increase quality, set JPEG compression factor or keep gif transparency). If you like to dig deeper have a look at one of the articles I wrote for the DotNetPro magazine’s #Talk column. <%@ Page Language="C#" %> <script runat="server" Language="C#"> public void UploadFile(object sender, EventArgs e) { System.
Windows Communication Foundation - I Like Indigo More
Like Christian Weyer and Damir Tomicic I like the word Indigo more than WCF and just read that Kenny will continue to refer to it as Indigo for a little while.
Another german main feed is growing
…And I was just Added :-) Shinja Strasser is the head of the NET UG Usergroups. He is publishing a main feed for the members under http://blogs.netug.de/. Now he opend the main feed for a few guys of the german community.
.NET Summit NRW review
First of all thank you to everybody who helped (Microsoft, INETA, S&S, E-Team…), spoke (Christian Weyer, Dirk Primbs, Achim Oellers, Dr. Holger Schwichtenberg) nad attended the event. A few things learned: Min. Session time is 60 min. Print out the list of attendees ordereb by lastname ascending Call restaurant to make sure the speakers diner will be served :-P The feedback until now was very good and Stephan and I plan to do the “.
Evil Empire
Mike Vernal figured out from where Microsoft’s whole “evil empire” moniker comes from. Must read :-)
MSN VirtualEarth
If you ever wanted to know where newtelligence headquarter is (Korschenbroich)… http://virtualearth.msn.com/default.aspx?cp=51.188584|6.605851&style=r&lvl=9&v=1 You can also see where our next SOA Workshop will happen (Düsseldorf) on September 5 - 7, 2005.
RE: httpOnly cookies in ASP.NET 1.1
Scott posted a solution to support httpOnly cookies in ASP.NET 1.1 but pointed out some problems when you run the code on 2.0(http://www.hanselman.com/blog/HttpOnlyCookiesOnASPNET11.aspx) Here is a solution: protected void Application_EndRequest(Object sender, EventArgs e) { if(System.Environment.Version.Major<2) { foreach(string cookie in Response.Cookies) { const string HTTPONLY = ";HttpOnly"; string path = Response.Cookies[cookie].Path; if (path.EndsWith(HTTPONLY) == false) { //force HttpOnly to be added to the cookie Response.Cookies[cookie].Path += HTTPONLY; } } } }
Firefox more sexy than InternetExplorer :-P
CAPCHA with Flickr
I just stumbled over roy’s post and i think it would make sense to use smth like that as a capcha solution.
Two weeks left for your registration - .NET Summit NRW
Eine Community-Konferenz für Entwickler veranstalten die beiden INETA User Groups “VfL-Niederrhein - Verein für Longhorn” und die “Net UG Düsseldorf” am 28. Juli in Neuss. Der vierstündige Event mit dem Titel “.NET Summit NRW” bietet ein halbes Dutzend Vorträge und ist kostenlos. Ein Event von der Community für die Community. http://www.event-team.com/events/netsummitnrw/Registrierung.aspx Uhrzeit Track 1 Track 2 17:00 - 17:45 Assembly 17:45 - 18:00 Keynote 18:00 - 18:45 Team System Daniel Fisher(lennybacon) [newtelligence] Mit Visual Studio Team System wird bisher die umfangreichste Zusammenstellung der Entwicklerwerkzeuge zur Zusammenarbeit in Projektteams bereitgestellt.
Free Microsoft E-Learning SqlServer 2005
The following e-learning courses are available for SQL Server 2005: 2939: Programming Microsoft SQL Server 2005 2940: Building Services and Notifications Using Microsoft SQL Server 2005 2941: Creating the Data Access Tier Using Microsoft SQL Server 2005
Re: Windows Impersonation in ASP.NET
Pierre posted an entry bout impersonation in ASP.NET szenarios. There are several scenario where you have to use the impersonation in ASP.NET. Consider, for example, you have to save and load files from a network share (file server). In that case, if the web site accept anonymous authentications, you have to impersonate a windows user who has enought privileges to access to that resource. You have three choices (I guess):
.NET Summit NRW 2005
After quite an amount of time, work and effort, that it had cost to realize my ideas I’m proud to present together with Stephan Oetzel to you an extra large community event: Nach einer ganzen Menge Zeit, Arbeit und Anstrengung die es gekostet hat meine Idee zu realisieren bin ich nun stolz zusammen mit Stephan Oetzel eine Community Event der Superlative zu präsentieren: And here is the lineup: Christian Weyerthinktecture], Michael Willers newtelligence, Jörg M.
SQL Sever 2005 (YUKON) Review in short, #2
Ok, here is another one: I add a login to my database server: EXEC sp_addlogin @Username, @Password, @Database; This works fine! I add a user, to a database by using the stored prcedure sp_adduser: Use [MyDB]; EXEC sp_adduser @Username; This also works fine! I want to remove the user from the database. Therefore I use the stored procedure sp_dropuser: EXEC sp_dropuser @Username; This removes the user BUT what you’ll see while digging deeper is that sp_adduser has created an SCHEMA and sp_dropuser don’t cares a s%#t about that - it’s still there after calling sp_dropuser :-(
SQL Sever 2005 (YUKON) Review in short, #1
First of all … wow, yeah, the IDE of SQL Server 2005 is pretty nice with all those grafics and animations but It’s more than anoying that i can not paste multiline text into a column of a table opened via right-click | Open Table NOTE: It is possible to add multi-line-texts via an insert/update script - but hey, that takes me 10-30 seconds longer … raise your hands if ya wanna pay me for that.
Indicate if the current web is running in debug mode...
public static bool IsWebInDebugMode{ get { bool _isDebug = false; if(HttpContext.Current.Cache["IsDebug"] == null) { XmlDocument _doc = new XmlDocument(); string _cfgfile = HttpContext.Current.Server.MapPath("~/Web.Config"); _doc.Load(_cfgfile); XmlNode _node = _doc.SelectSingleNode("configuration/system.web/compilation"); if(_node==null || _node.Attributes["debug"]==null || _node.Attributes["debug"].Value.ToLower()!="true") { _isDebug = false; } else { _isDebug = true; } HttpContext.Current.Cache.Insert("IsDebug", _isDebug, new System.Web.Caching.CacheDependency(_cfgfile), DateTime.Now.AddDays(1), TimeSpan.Zero); } else { _isDebug = bool.Parse(HttpContext.Current.Cache["IsDebug"].ToString()); } return _isDebug; } }
Next to XSS is SSS - Same Site Scripting
Via Willem Odendaal I opend the following web site http://www.squarefree.com/bookmarklets/forms.html#frmget. It holds an interesting collection of bookmarklets (Javascript commands that can be saved as bookmarks so they can be applied to every page that is opend in your browser). For example: “remove MaxLength” … shows how important it is to use ASP.NET Validation Controls in your Web Applications.
Back on the road
It’s happening again. Michael and I are back on tour for TornadoCamp Xpress, the .NET 2.0 event of newtelligence. Today we started. We meet Michal K. of Microsoft, he’s a nice and smart guy, our local contact and I’m doing this post right in the middle of our C# 2.0 HOL. I miss my familiy @ home - love ya! cu soon. Cheers to the rest out there.
.NET 2.0 Only 99.9% backwards compatible?
While re-writing a few WebServices for .NET 2.0 i ran across following: ... public static void WaitProc(object state, bool timedOut) { MyAsyncResult myAsyncResult = (MyAsyncResult)state; myAsyncResult.OriginalCallback.Invoke(myAsyncResult); } ... This compiles without any problems in Visual Studio .NET 2003 but makes the compiler scream (Invoke cannot be called directly on a delegate) untill you change the lines to the following: ... public static void WaitProc(object state, bool timedOut) { MyAsyncResult myAsyncResult = (MyAsyncResult)state; myAsyncResult.