Home / ASP.NET Weblogs

Latest Microsoft Blogs

Posted to:

Logging SQL queries in Orchard

It is often useful to see what database queries were made during a specific request in Orchard. There are quite a few ways to do this (you can trace right from SQL Server, or you can use Mini-Profiler for instance), but this morning Sébastien showed me a really easy one that I thought I’d share. Find the log4net.config file in /src/Orchard.Web/Config and edit it to add the following tag: <logger name="NHibernate.SQL"> <priority value="DEBUG" /> </logger> Restart the application, then hit the URL you want to test, and look at your logs in App_data/logs. You should see new entries looking like this: 2013-04-03 18:57:30,367 [17] NHibernate.SQL - SELECT warmupsett0_.Id as Id575_0_, warmupsett0_.Urls as Urls575_0_...
Filed under: , , ,
Posted to:
by: 
04-01-2013, 12:57 PM

Introducing the new class at the Microsoft Accelerator for Windows Azure

We launched the Microsoft Accelerator for Windows Azure, powered by TechStars , to give early stage startups full access to Windows Azure and to help them succeed by connecting each company to leading technical and business mentors . I’m happy to share that the new spring 2013 class features a healthy mix of exciting solutions and an impressive list of founders whose feedback will directly inform future Windows Azure releases. Today, the ten new teams in the Microsoft Accelerator for Windows Azure , powered by TechStars , moved into their South Lake Union office space. This spring’s Windows Azure class includes: 1Track — Bellevue, WA . 1Track enhances the consumer in-store shopping experience and drives sales for retailers. Airpost.io — Toronto...
Filed under: ,
Posted to:

Tutorial Series on Model Binding with ASP.NET Web Forms

I have written a tutorial series that shows how to use model binding with ASP.NET Web Forms. You might be familiar with the model binding concept from ASP.NET MVC, but with ASP.NET 4.5, model binding is now available in Web Forms applications. Model binding makes it very easy to create and maintain data-rich web pages. A lot of the manual steps of correlating elements with data properties are performed automatically. When you use model binding with dynamic data templates, you can quickly add or revise properties in your data model and those properties are correctly rendered and processed in the web forms throughout your site. The series contains the following topics: Retrieving and displaying data Updating, deleting, and creating data Sorting...
Posted to:

Changing ASP.NET web.config inheritance when mixing versions of child applications

My blog and all the sites in and around it are a mix of .NET 2.0, 3.5 and 4. This blog engine is currently .NET 3.5 and runs at http://hanselman.com/blog , but the application at http://hanselman.com/ (the root) is .NET 4. You can happily mix and match applications across .NET versions on a single IIS instance. You can see how mixed my system is in the screenshot at right there. However, things got messy when I changed the parent / application to .NET 4, but kept the child /blog as .NET 3.5 (the 2.0 CLR). I got lots of errors like Unrecognized attribute ‘targetFramework’. Note that attribute names are case-sensitive. The targetFramework attribute was inherited from the root .NET 4 Web.config file in the Default Web Site root using ASP.NET configuration...
Filed under: , ,
Posted to:

ASP.NET MVC Facebook Birthday App

Tom Dykstra and I have published a really cool tutorial on creating a MVC FB birthday app . You can test the app out by clicking on the FB link below: https://apps.facebook.com/birthdayapp-mvc/ The image below show birthday app. Yao Huang Lin   is the principal developer for the ASP.NET MVC Facebook library and templates and he also wrote the sample used in this tutorial (so you can be sure it’s using best practices.) The tutorial shows you how to: Quickly create a simple MVC/FB app. Understand the FB template code. Create the FB birthday app. Deploy the app to Windows Azure. As always, we appreciate feedback. Follow me ( @RickAndMSFT )   on twitter where I have a no spam guarantee of quality tweets. Read More...
Posted to:

This is how we should read hexadecimal…

Today my five-year-old told me that when she was four, she thought that what came after ninety-nine was… tenty. You know, because seventy, eighty, ninety, tenty. At first I thought it was just funny and charming, but then I realized it was actually a really good idea. Tenty is only nonsensical if you’re counting in base ten (or lower), but it makes total sense for higher bases. How do people usually read 0xA0? “A-zero”? How unimaginative! Let’s read that “tenty” from now on! Here are some more examples of how to read hexadecimal in a non-boring way: 0xB3 is eleventy-three 0xCA is twelvety-ten 0xD9 is thirteenty-nine 0xEC is fourteenty-twelve 0xFF is fifteenty-fifteen 0xF04A is fifteenty hexathousand and forty-ten 0x4B2AC0AA is forty-eleven hexamillion...
Filed under: , ,
Posted to:

Moving old apps from IIS6 to IIS8 and why Classic Mode exists

I had an interesting emailed question today. Here's a paraphrased one sentence version of the question: Why does an ASP.NET Runtime issue surface in IIS 8.0 Integrated Pool for an application we have run successfully on previous versions of IIS and classic mode in IIS 8.0 ? It's less interesting that they've moved from IIS6 to IIE8 and more significant that they've moved from Classic Mode to the Integrated Mode pipeline. So, the short answer. These pipelines are different and if you write an app expecting the behavior of one pipeline and the move it, your observed behavior will likely be different when you move it to the new pipeline. IIS6 was released in Windows Server 2003 over 10 years ago. Apps used the ISAPI pipeline. By...
Filed under: ,
Posted to:
by: 
03-18-2013, 2:43 PM

Windows Azure: New Hadoop service + HTML5/JS (CORS), PhoneGap, Mercurial and DropBox support

Today we released a number of great enhancements to Windows Azure. These new capabilities include: Mobile Services : HTML5/JS (CORS) Client + PhoneGap + Windows Phone 7.5 + .NET Portable Library support Web Sites : Mercurial Source Control + DropBox Deployment support HDInsight : New service that enables you to easily deploy and manage Hadoop Clusters on Azure All of these improvements are now available to start using immediately (note: some services are still in preview). Below are more details on them: Mobile Services: HTML5/JS Client (CORS), PhoneGap, Windows Phone 7.5 Today we are adding support to enable pure HTML5/JS clients (and PhoneGap apps) as well as Windows Phone 7.5 clients to use Windows Azure Mobile Services as a backend. ...
Filed under: , ,
Posted to:

Deploy a Secure ASP.NET MVC application with OAuth, Membership and SQL Database

This tutorial shows you how to build a secure ASP.NET MVC 4 web application that enables users to log in with credentials from Facebook, Yahoo, and Google. You will also deploy the application to Windows Azure. You can open a Windows Azure account for free, and if you don't already have Visual Studio 2012, the SDK automatically installs Visual Studio 2012 for Web Express. You can start developing for Windows Azure for free. This tutorial assumes that you have no prior experience using Windows Azure. On completing this tutorial, you'll have a secure data-driven web application up and running in the cloud and using a cloud database. You'll learn: How to enable your machine for Windows Azure development by installing the Windows Azure...
Posted to:

Taking an Orchard site offline while you update it

If your hosted environment does not give you a staging site and the means to swap it easily with the production environment like Azure Cloud Services do, or if you don’t have a staging database, or if you just need to take your site offline for the public while you perform data updates in the admin, you may be wondering what solutions you have, if any. IIS has an app_offline.htm feature that you can use, that will serve a static page for all requests but that’s rather brutal as it does not just take the site offline for your users, it also does so for you. While that file exists, you can do absolutely nothing with your site. You cannot access the admin, you cannot preview your changes, nothing. So when you flip the switch back, it’s anyone’s...
Filed under: ,

< Previous 1 2 3 4 5 Next > ... Last »

Archives