<body><script type="text/javascript"> function setAttributeOnload(object, attribute, val) { if(window.addEventListener) { window.addEventListener('load', function(){ object[attribute] = val; }, false); } else { window.attachEvent('onload', function(){ object[attribute] = val; }); } } </script> <div id="navbar-iframe-container"></div> <script type="text/javascript" src="https://apis.google.com/js/platform.js"></script> <script type="text/javascript"> gapi.load("gapi.iframes:gapi.iframes.style.bubble", function() { if (gapi.iframes && gapi.iframes.getContext) { gapi.iframes.getContext().openChild({ url: 'https://www.blogger.com/navbar.g?targetBlogID\x3d8776281485402821239\x26blogName\x3dMy+Thoughts+About+Code\x26publishMode\x3dPUBLISH_MODE_BLOGSPOT\x26navbarType\x3dBLACK\x26layoutType\x3dCLASSIC\x26searchRoot\x3dhttps://mythoughtsaboutcode.blogspot.com/search\x26blogLocale\x3den_US\x26v\x3d2\x26homepageUrl\x3dhttp://mythoughtsaboutcode.blogspot.com/\x26vt\x3d8320627964389000721', where: document.getElementById("navbar-iframe-container"), id: "navbar-iframe" }); } }); </script>

.

Microsoft Surface Revisited from Another Angle
Wednesday, July 11, 2007

This is just funny. Very sarcastic view of the Microsoft Surface.

Labels: ,



Digg!

User Roles in ASP.NET 2.0
Tuesday, July 10, 2007

So today I was working on a project where I needed to allow for certain users to access a site but no one else. Seems simple enough but logic goes out the window with this.

I had this which made sense to me. Deny everyone first, then add the roles that I wanted to have access:

<system.web>
   <authorization>
      <deny users="*" />
      <allow roles="CSR User" />
      <allow roles="Content Editor" />
      <allow roles="Market Administrator" />
      <allow roles="National Administrator" />
      <allow roles="Regional Administrator" />
      <allow roles="Super Administrator" />
   </authorization>
</system.web>

Turns out that you have to allow the users first and then deny everyone. So next time I come across this, I will throw logic out the window and get it done faster. This one is the one that works:

<system.web>
   <authorization>
      <allow roles="CSR User" />
      <allow roles="Content Editor" />
      <allow roles="Market Administrator" />
      <allow roles="National Administrator" />
      <allow roles="Regional Administrator" />
      <allow roles="Super Administrator" />
      <deny users="*" />
   </authorization>
</system.web>

Labels: , ,



Digg!

Pownce Invites
Monday, July 09, 2007

Hey everyone. I have 10 Pownce invites so if you want one, email me. First come, first served.

Labels: , , ,



Digg!

Read This

All entries in this blog are my opinion and don't necessarily reflect the opinion or views of my employer (Terralever).

This is where I talk about the little bit of .NET code that I actually know and different techy things that interest me. Feel free to tell all your friends about my little blog and hopefully soon, it won't be so little.

My Thoughts About Code | feed

5ThirtyOne and Blogger Templates design | Top