ShankuN's Blog

The Online Weblog of Shanku Niyogi, ASP.NET Group Program Manager

Upcoming Changes to ASP.NET 2.0 in Beta 2

We have recently completed planning for Beta 2 of ASP.NET 2.0 and Visual Studio 2005. For the Beta 2 release, we will deliver a high quality release with a go live license to enable live deployments. To do this, we need to focus on finding and fixing bugs, and raising security, performance, and scalability through targeted analysis and improvements. We also are getting great customer feedback from Beta 1 and earlier preview releases, and need to incorporate key feedback into the product.

 

To enable us to meet these goals, and in response to customer feedback, we have decided to remove a small set of features from ASP.NET 2.0. These features are already available in Beta 1, so we’d like to provide you with some advance notice of what changes are coming, and how you can prepare for them.

 

Note: You can find an ASP.NET forums post with the same content at http://www.asp.net/Forums/ShowPost.aspx?tabindex=1&PostID=667498.

 

Mobile Device Adapters for ASP.NET Server Controls

 

ASP.NET 2.0 Beta 1 introduced a new control adapter architecture that allows any ASP.NET server control to create alternate renderings for other browsers, including mobile devices. We also included adapters for many of our built-in server controls, to allow developers to use them to create mobile web applications. At the same time, Beta 1 deprecated the ASP.NET mobile controls, which were used in ASP.NET 1.x to build mobile web applications.

 

In Beta 2, we have decided not to deprecate the V1.x mobile controls. We have instead postponed our plans to ship mobile specific adapters for all controls until a later release.

If you plan on writing a mobile web application using ASP.NET 2.0, we recommend that you use the ASP.NET mobile controls, found in System.Web.Mobile.dll.

 

We have also decided not to specifically certify individual new devices for use with the mobile controls, through our product release and device updates. Instead, we will provide adapters for V1.x mobile controls that render markup compliant with common markup languages – HTML, cHTML, XHTML Mobile Profile, and CHTML – and work on standard browsers. For many applications, these adapters will work out of the box for a variety of devices. If desired, you can fine-tune your application for an individual device by creating a new device profile and writing new adapters as necessary. We will provide a profiling tool and adapter source to help you customize your applications.

 

We still plan on including the new control adapter architecture in ASP.NET 2.0. You can write control adapters to customize server controls for individual browsers. For example, you can write a control adapter to generate a different rendering for the Calendar control on Internet Explorer.

 

PhoneLink and ContentPager Controls

 

The mobile support in ASP.NET 2.0 Beta 1 included two new controls that were intended to supersede two features of the ASP.NET mobile controls: the PhoneLink server control to replace the PhoneCall mobile control, and the ContentPager control to replace the ability of mobile forms to automatically paginate content according to the screen size of the target browser.

 

Now that we are bringing back the ASP.NET mobile controls, you can implement these features using . To include a link to a phone number in your page, use the System.Web.UI.MobileControls.PhoneCall control. To paginate the contents of your form, use the Paginate property of the System.Web.UI.MobileControls.Form control.

 

The ContentPager control also allowed developers to paginate the contents of controls for desktop browsers. To create a paginated UI in ASP.NET without the ContentPager control, you can either use a GridView control, which has built-in support for pagination, or extend the DataList control with support for pagination. For an example of a pagination UI on ASP.NET, please refer to the MSDN article Creating a Pager Control for ASP.NET by Dino Esposito.

 

Site counters, DynamicImage Control, and the Image Generation Service

 

After receiving feedback and conducting internal testing and evaluation, we have decided that these features require significant additions or changes in response to customer feedback, or significant additional testing to meet stability or scalability requirements. We have decided to remove these features for ASP.NET 2.0, and will look at adding them in a future version.

 

To employ click tracking on your site in ASP.NET 2.0, we recommend you use a 3rd party solution or build your own using page code.

 

To dynamically generate images from content in a database or from data, you can write an ASP.NET handler (.ashx), and use the ASP.NET cache to store these generated images. The code example at the end of this post (see below) shows a handler that returns an image generated from a business object.

 

WebPartPageMenu Control

 

This control provided a convenient mechanism for switching page personalization modes in pages using the web parts control set. The UI generated by this control is a dropdown list or menu similar to Sharepoint. However, pages often require more flexibility for switching modes than this control provides, and the WebPartManager class makes it easy to programmatically switch personalization mode from any server control.  

 

To switch modes, you can use an interactive server control such as a Button, LinkButton, or DropDownList, and write an event handler for it that programmatically switches the personalization mode. For example, the following code will switch the personalization mode of a WebPartManager:

 

WebPartManager1.DisplayMode = WebPartManager.DesignDisplayMode

 

Access Data Providers

 

In Beta 1, ASP.NET application services such as membership and roles include Access data providers, and use them by default. In Beta 2, however, we will replace this functionality with support for SQL Server 2005 Express Edition, the new version of SQL Server which combines the file-based simplicity of Access databases with seamless deployment to full editions of SQL Server.  The developer model of using the application services stays 100% the same, but the backend implementation will now be much more robust and performant.

 

DataSetDataSource

 

This control provided the ability to bind to an XML data source using a dataset, but had significant overlap with XmlDataSource (which allows binding to XML data) and ObjectDataSource (which allows binding to data components). We are eliminating this control in the interests of simplicity.

 

Built-in Global Themes

 

Global themes provide a useful way to apply a standard consistent look to web pages, and we anticipate that developers will create and exchange a variety of global themes. However, we have decided not to include any built-in general themes in the product. Developers looking for an attractive set of built-in styles for server controls can use autoformats instead. We will also have an online theme gallery on www.asp.net for RTM that will enable developers to find and share themes for their site.

 

Web Administration Tool Profile/Reports Tab

 

This feature was incomplete in Beta 1, and we have decided not to complete the work in Beta 2. We will release samples that show how to get reporting from profile data.

 

 

 

Example – An ASP.NET handler that returns a dynamically generated image

 

<%@ WebHandler Language="C#" Class="ImageHandler" %>

 

using System;

using System.Drawing;

using System.Drawing.Imaging;

using System.IO;

using System.Web;

using System.Web.Caching;

 

public class ImageHandler : IHttpHandler {

   

    public void ProcessRequest (HttpContext context) {

       

        // Get the image ID from querystring, and use it to generate a cache key.

 

        String imageID = context.Request.QueryString["PhotoID"];

        String cacheKey = context.Request.CurrentExecutionFilePath + ":" + imageID;

 

        Byte[] imageBytes;

               

        // Check if the cache contains the image.

 

        Object cachedImageBytes = context.Cache.Get(cacheKey);

        if (cachedImageBytes != null)

        {

            imageBytes = (Byte[])cachedImageBytes;

        }

        else

        {

            // Get image from business layer, and save it into a Byte array as JPEG.

            Image im = PhotoLibrary.GetImage("PhotoID");

            MemoryStream stream = new MemoryStream();

            im.Save(stream, ImageFormat.Jpeg);

            stream.Close();

            im.Dispose();

            imageBytes = stream.GetBuffer();

 

            // Store it in the cache (to be expired after 2 hours).

 

            context.Cache.Add(cacheKey, imageBytes, null,

                DateTime.MaxValue, new TimeSpan(2, 0, 0),

                CacheItemPriority.Normal, null);

        }

       

        // Send back image.

        context.Response.ContentType = "image/jpeg";

        context.Response.Cache.SetCacheability(HttpCacheability.Public);

        context.Response.BufferOutput = false;

        context.Response.OutputStream.Write(imageBytes, 0, imageBytes.Length);

    }

 

    public bool IsReusable {

        get {

            return false;

        }

    }

}

Posted: Aug 16 2004, 08:11 PM by ShankuN | with 54 comment(s)
Filed under: ,

Comments

Stephen Toub said:

Dino Esposito shows how to implement a variant of the DynamicImage control (for both ASP.NET 1.x and 2.0) in the April 2004 issue of MSDN Magazine. The column is available online at http://msdn.microsoft.com/msdnmag/issues/04/04/cuttingedge/.
# August 16, 2004 11:31 PM

Mumei said:

This is the worst news that I've heard in many months. DynamicImage was one of the greatest and most useful things in ASP.NET 2.0 for me. I guess it's back to using my old custom version. Maybe ASP.NET 3.0 will be more satisfying; my enthusiasm for 2.0 has just plummeted.
# August 17, 2004 3:11 AM

AIM48 said:

<<<Access Data Providers



In Beta 1, ASP.NET application services such as membership and roles include Access data providers, and use them by default. In Beta 2, however, we will replace this functionality with support for SQL Server 2005 Express Edition, the new version of SQL Server which combines the file-based simplicity of Access databases with seamless deployment to full editions of SQL Server. The developer model of using the application services stays 100% the same, but the backend implementation will now be much more robust and performant.

>>>

Thats no good - there are many free or cheap web hosting plans that allow Access databases but will not allow a sql server installation. These are the types of developers targeted by the express line of tools.
# August 17, 2004 9:51 AM

Shanku Niyogi said:

We are planning on making source code for our providers available publicly, including the source code for the Access providers as a sample. You will be able to use this code in your applications.

We are also working with hosters on hosting plans around SQL Server 2005 Express Edition. SQL Server Express allows you to create and copy a database as a single file, just like Access. But it also allows you to easily import that file into a full SQL database. And, because the underlying engine is SQL, the database is a lot more robust in every way.
# August 17, 2004 10:01 AM

Scottt40 said:

Not having the ability to use AccessDataProvider for Roles and no Profiles is a bit of a let down. My service provider does not allow, without a significant increase in cost, the use of SQL, but does have Access ability.
# August 17, 2004 10:12 AM

Dimitri Glazkov said:

Interesting stuff on Adapters. Did my "Bogeyman" post (http://glazkov.com/blog/archive/2004/08/05/207.aspx) have any influence on this decision? If not, that's ok. If it did -- I want to know :)
# August 17, 2004 11:54 AM

Aleksandr Zaskaleta said:

"We will provide adapters for V1.x mobile controls that render markup compliant with common markup languages – HTML, cHTML, XHTML Mobile Profile, and CHTML – and work on standard browsers"

Does this mean that WML (Wireless markup language) for WAP 1.x devices will not be supported?
Is it true that you intend to drop support for WML browser devices?

Please disable somehow JavaScript output in Mobile apps!
Or let me do it in web.config somehow!
# August 18, 2004 3:09 AM

Jamie Kindred said:

Shanku,

You mentioned that the Beta 2 release will include a go live license. Do you have an approximate ETR on Beta 2? I understand that the RTM go live is estimated to happen in the first half of 2005.

Thanks!
# August 18, 2004 12:41 PM

Kevin Daly said:

Losing DynamicImage control and the Image Generation service is seriously lousy.
I have to admit I haven't been this disappointed since I learned that the planned DATE datatype had been dropped from SQL Server 2005.
It would be good if you'd either deliver the original feature set or deliver according to the original timetable: so far we get neither, so what exactly are we waiting for?
# August 19, 2004 3:54 AM

Michael Stuart said:

I just finished reading an article about the new GridView in MSDN magazine (August 04 issue). It mentioned that to display images in a grid field, it used the new dynamic image control to do so. So...will the GridView no longer be able to natively display images now? Now that SP2 is finished, it would be nice if they would move somebody else over to work on the DynamicImage control.
# August 19, 2004 2:11 PM

Kevin Daly said:

Just to add something: if the DynamicImage et al. ever resurface, it would be nice if the Image Generation service include were to include built-in support for colour quantization.
# August 20, 2004 9:08 PM

Eric said:

Losing the image control is the dumbest thing I have ever heard of.
Why not remove the datagrid control while you are at it.
# August 22, 2004 5:01 PM

Kevin said:

Hi sir,

i could not agree with you on "remove a small set of features". I do think that you removed the main advantages of the ASP.Net 2.0. So be honest, as one of your company values, i suggest you release an ASP.net 1.x instead of making it a major version as ASP.Net 2.0.

thanks,

-Kevin
# August 23, 2004 11:02 AM

Jaydeep Bhatt said:

Well, for small companies, the "Access Data Provider" is must, However, let us see , how the file based structure of SQL Server 2005, helps. If it is as easy as "Access" then may be we can go ahead without Access
# August 23, 2004 11:07 AM

TrackBack said:

Bernard discusses a new Whidbey data source control that he's developed that allows you to use relational data hierarchically. This is pretty cool; it allows you to use the logically hierarchical structure of a relational database in hierarchical contr ...
# September 12, 2004 2:24 AM

TrackBack said:

# October 20, 2004 7:33 AM

TrackBack said:

# October 21, 2004 9:48 PM

TrackBack said:

^_^,Pretty Good!
# April 10, 2005 9:49 AM

kurtsune said:

This line

context.Response.BufferOutput = false;

should be like this

context.Response.BufferOutput = true;

otherwise you might get

The remote host closed the connection. The error code is 0x80072746.

# January 30, 2007 4:35 AM

victorantos said:

I get  error code is 0x80072746. And  I set context.Response.BufferOutput = true/false

QueryString=PhotoID=21&Size=L

Global last error: The remote host closed the connection. The error code is 0x80072746.

Error message: The remote host closed the connection. The error code is 0x80072746.

Error Source: System.Web

Stack Trace:    at System.Web.Hosting.ISAPIWorkerRequestInProcForIIS6.FlushCore(Byte[] status, Byte[] header, Int32 keepConnected, Int32 totalBodySize, Int32 numBodyFragments, IntPtr[] bodyFragments, Int32[] bodyFragmentLengths, Int32 doneWithSession, Int32 finalStatus, Boolean& async)

  at System.Web.Hosting.ISAPIWorkerRequest.FlushCachedResponse(Boolean isFinal)

  at System.Web.Hosting.ISAPIWorkerRequest.FlushResponse(Boolean finalFlush)

  at System.Web.HttpResponse.Flush(Boolean finalFlush)

  at System.Web.HttpWriter.WriteFromStream(Byte[] data, Int32 offset, Int32 size)

  at System.Web.HttpResponseStream.Write(Byte[] buffer, Int32 offset, Int32 count)

  at Handler.ProcessRequest(HttpContext context)

  at System.Web.HttpApplication.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()

  at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)

# June 16, 2007 5:27 AM

webhost said:

Very Good! Thanks for sharing.

# September 3, 2007 4:12 AM

Umesh Sharma said:

Hi..

i am facing problem

how to fetch jpg image from database in aso.net2.0 with c#

Please helpm me imme..

# September 8, 2007 4:39 AM

Lee Davies said:

Shanku - your comment above was...

"In Beta 2, we have decided not to deprecate the V1.x mobile controls. We have instead postponed our plans to ship mobile specific adapters for all controls until a later release."

Please could you clarify which release will contain the new mobile adapters?

Thanks.

# November 8, 2007 1:34 AM

Discount Codes said:

Excellent!

Thanks for Sharing

# March 27, 2009 5:20 AM

mbaocha said:

This is excellent info. thanks for sharing.

# May 19, 2009 12:35 PM

Sreenath said:

Cool. It worked we were getting lot of exceptions like above.

Just by adding

Context.Response.BufferOutput = true;

solved the issue

# February 25, 2010 6:48 PM

Wesley said:

Hello. You cannot make a man by standing a sheep on its hind legs. But by standing a flock of sheep in that position you can make a crowd of men. Help me! Need information about: Cool cheap hair extensions. I found only this - <a href="www.hitlab.org/.../CheapHairExtensions">hair extensions brisbane cheap</a>. Cheap hair extensions, wal-mart amounted to buy its recognition very as it however became to milk its township well. Although he was urban at his trowel, others became that congestion's smell was onwards in his age, cheap hair extensions. Best regards :eek:, Wesley from Benin.

# March 23, 2010 7:10 AM

Starting Again… « Shanku's said:

Pingback from  Starting Again&#8230; &laquo; Shanku&#039;s

# September 11, 2010 2:50 AM

uvgfx said:

Google www.kaskus.us/blog.php mushroomhead halloween pictures lotuselan

# September 27, 2010 6:00 PM

dyfcy said:

Google www.kaskus.us/blog.php abby halloween costumes shardwire

# September 28, 2010 4:02 AM

igsgw said:

Google www.nzwood.co.nz/.../36178 asian red tube indaco

# October 9, 2010 6:37 PM

xgktw said:

Google www.prairiestateoutdoors.com/index.php slutload teacher drumpro

# October 10, 2010 9:55 PM

zero skateboards logo said:

Can I just say what a relief to uncover someone who really knows what theyre speaking about within the internet. You certainly know how you can carry an concern to mild  and make it important. Much more individuals have to examine this and comprehend this aspect of your story. I cant imagine youre not much more popular since you definitely  have the reward.

--------------------------------------------

my website is <a href="zeroskateboards.org/.../tech-deck-skateboard-hook-ups-skateshop-sk8-shop-6-rare-reviews.html">rare tech decks</a> .Also welcome you!

# December 5, 2010 2:54 AM

Tiger Kostüm said:

Thanks for this really great information.

# December 21, 2010 7:58 AM

ipad app reviews said:

-----------------------------------------------------------

It appears like you are developing issues yourself by trying to solve this concern as an alternative to taking a look at why

# January 3, 2011 10:07 PM

dynym said:

Yeah www.moorewatch.com/.../88181 pinkworld com plicate  mastosquamose

# January 30, 2011 8:44 PM

rdmpk said:

Hello www.moorewatch.com/.../89172 all tubes janet mason pappus  ergotin

# February 2, 2011 7:24 AM

jsiuw said:

Hello http://my.vision.edu/zillatube zillatube torrent milliequivalent  stampee

# March 25, 2011 2:35 AM

Jatin Kacha said:

Thanks,

Setting context.Response.BufferOutput = true really helps..

Nice share thanks..

# May 16, 2011 5:45 AM

Jertpreeria said:

Awesome Blog. I add this Post to my bookmarks.

# May 29, 2011 9:30 PM

Ahsima said:

Great info about ASP.NET 2.0 update. Thanks for sharing it.

# June 6, 2011 1:09 PM

Franklyn Weitzner said:

I was just searching for this info for some time. Soon after 6 hours of continuous Googleing, at last I got it inside your web page. I wonder what's the lack of Google strategy that don't rank this type of informative web-sites in top of the list. Generally the leading web sites are full of garbage.

# June 29, 2011 12:49 PM

Tyrell Fieldson said:

hank for this very good web log! I completely appreciate it!

# July 4, 2011 1:00 PM

dreadaneita said:

I just sent this post to a bunch of my friends as I agree with most of what you’re saying here and the way you’ve presented it is awesome.

# July 7, 2011 9:12 AM

Debroah Mier said:

An individual built a number of advantageous facts presently there. I did looking with regard to inside the challenge and also noticed a lot of men and women may perhaps agree inside your internet page.

# July 9, 2011 2:17 AM

twingigma said:

I just book marked your blog on Digg and StumbleUpon.I enjoy reading your commentaries.

# July 14, 2011 3:00 PM

ghevondgha said:

Oднажды заходил на этот сайт тамбило очень много новых рецептов! ну мне паможет гатовить в жизнь думаю вам тоже понравится

http://www.xohanoc.info

# July 20, 2011 7:43 PM

connect said:

Absolutamente con Ud es conforme. En esto algo es yo gusta esta idea, por completo con Ud soy conforme.  

http://eru1.myftp.biz/  

sydni

# August 18, 2011 6:02 PM

rtyecript said:

I really liked the article, and the very cool blog

# August 24, 2011 10:29 PM

hooher tod said:

Yes there should realize the reader to RSS my feed to RSS commentary, quite simply

# September 5, 2011 3:14 PM

Buy OEM software online said:

6FnlmG Can be also this issue because the truth can be achieved only in a dispute :D

# September 23, 2011 1:24 PM

Furnace Service Franklin said:

With all the new applications that have come up, they should also update their software. Glad that they have extended an effort for making update possible. More to go for the updates then.

# October 3, 2011 7:41 AM

office 2010 said:

I really liked the article,good blog

# October 13, 2011 3:21 AM

Cheap software online said:

WJyXSi Hello! Read the pages not for the first day. Yes, the connection speed is not good. How can I subscribe? I would like to read you in the future!...

# October 29, 2011 5:59 AM
Leave a Comment

(required) 

(required) 

(optional)

(required)