Scott Hanselman

Extended Stored Procedures Considered Harmful?

January 13, '03 Comments [0] Posted in Web Services
Sponsored By

With Yukon on the horizon, I'm thinking about the "unmanaged Yukon equivalent" we have now - Extended Stored Procedures.  I've used them in the past for such cleverness as calling out to Ws Services from within SQL Server and calling back to other boxes in an asychronous Observer-Observable pattern to let folks know about Data Changing for cache clearing events.

Now, no doubt Yukon will be much more robust even hosting in-proc componentry via Application Domains or out of proc via an ASP_WP style worker process, but until then, are Extended Stored Procedures (in VB6 and C++) evil? See http://tinyurl.com/4er4 (Google Groups Post)

About Scott

Scott Hanselman is a former professor, former Chief Architect in finance, now speaker, consultant, father, diabetic, and Microsoft employee. He is a failed stand-up comic, a cornrower, and a book author.

facebook twitter subscribe
About   Newsletter
Sponsored By
Hosting By
Dedicated Windows Server Hosting by SherWeb

Its A Special Feeling You Get When You Look At Your Referrer Log And See That Someone Found Your Blog By Searching For Shmu

January 13, '03 Comments [0] Posted in Tools
Sponsored By

It's a special feeling you get when you look at your Referrer Log and see that someone found your Blog by searching for "shmuck"
http://www.davidjanes.com/blogosphere/tools/search?frame=l&search=schmuck

 

About Scott

Scott Hanselman is a former professor, former Chief Architect in finance, now speaker, consultant, father, diabetic, and Microsoft employee. He is a failed stand-up comic, a cornrower, and a book author.

facebook twitter subscribe
About   Newsletter
Sponsored By
Hosting By
Dedicated Windows Server Hosting by SherWeb

OWASP: Top Ten Most Critical Security Vulnerabilities in Web Apps

January 13, '03 Comments [0] Posted in Web Services
Sponsored By

Great Whitepaper on SourceForge from the OWASP project on the "Top Ten Most Critical Security Vulnerabilities in Web Apps"

About Scott

Scott Hanselman is a former professor, former Chief Architect in finance, now speaker, consultant, father, diabetic, and Microsoft employee. He is a failed stand-up comic, a cornrower, and a book author.

facebook twitter subscribe
About   Newsletter
Sponsored By
Hosting By
Dedicated Windows Server Hosting by SherWeb

Set the ASP.NET Application Object to Read-Only

January 10, '03 Comments [0] Posted in Web Services | ASP.NET
Sponsored By

Requirement:

Pre-Load the ASP.NET Application object and don¬ít allow other pages in your project to add/modify/delete. Basically, make Application read-only.

Solution:

         private void SetApplicationReadOnlyStatus( bool state ) {
                  Type type = Application.GetType().BaseType;
                  PropertyInfo readPropInfo = type.GetProperty("IsReadOnly",  BindingFlags.NonPublic | BindingFlags.Instance) ;
                  if( readPropInfo != null ) {
                        readPropInfo.SetValue( Application,Convert.ChangeType(state,readPropInfo.PropertyType ) ,null);
                  }
            }
            private void Page_Load(object sender, System.EventArgs e) {
                  Application["MyKey"] = "myValue";
                  // Set application to readonly so that we will not allow any changes.
                  SetApplicationReadOnlyStatus( true );
                  try
                  {
                        // Try setting a value 
                        Application["MyKey"] = "New value";
                        Response.Write("You won't see this");
                  }
                  catch(Exception ex) {
                        // You'll end up here
                        Response.Write(ex.Message);
                }
            }

Thanks to Sairama for the code!

About Scott

Scott Hanselman is a former professor, former Chief Architect in finance, now speaker, consultant, father, diabetic, and Microsoft employee. He is a failed stand-up comic, a cornrower, and a book author.

facebook twitter subscribe
About   Newsletter
Sponsored By
Hosting By
Dedicated Windows Server Hosting by SherWeb

Disclaimer: The opinions expressed herein are my own personal opinions and do not represent my employer's view in any way.