Welcome to AspAdvice Sign in | Join | Help

I have Framework 3.5 installed, why does my IIS show only ASP.NET 1.1/2.0?

I've replied a lot to these questions lately. 

I'm not going to go to very deep with this, Scott Hanselman has excellent post covering this, see that:

How to set an IIS Application or AppPool to use ASP.NET 3.5 rather than 2.0
http://www.hanselman.com/blog/HowToSetAnIISApplicationOrAppPoolToUseASPNET35RatherThan20.aspx

Simple way is also to think that 3.0 and 3.5 bring "a few more" dlls to 2.0 runtime (which is 2.0 SP 1 in practise). So basically 3.5 is not really that big upgrade to vanilla ASP.NET 2.0, although it certainly isn't any minor upgrade.

Sponsor
Posted by joteke | 0 Comments
Filed under: , ,

DDD Ireland

I promised to spread the word. :-)

Phil and his peers have a developer event, DDD Ireland, in Ireland on 3rd of May. And here's the "official poster" :-)

Developer Event? Ah go on, go on, go on.

DDD Ireland

Check it out at www.DDDIreland.com

Sponsor
Posted by joteke | 0 Comments
Filed under: , , , ,

Unspecified Error with MSDN Library for VS2008 in IE7

My MSDN for VS2008 started suddenly to raise this error.

and I had no idea why. This occurred on my home machine which is XP Pro with latest upgrades. 

I tried following steps:

- I uninstalled and reinstalled entire MSDN Library for VS2008
- I tried to repair IE (basically by reinstalling IE7)
- I even deleted everything from C:\Program Files\Common Files\Microsoft Shared\Help and C:\Program Files\Common Files\Microsoft Shared\Help9 and then un/reinstalled help

Nothing helped.

But I got help on a private discussion list, to try to delete all Temporary Internet Files. And doh! It started to work again... 

Trying to clear all the IE temp file content didn't cross my mind although I've seen weird issues related to it before this. For example hyperlinks sometimes link in totally weird way when IE has "enough" those temporary files, frames might open inside themselves (repeating the opened content) or nothing just happens. Clearing temporary files solves that with no exception.

Sponsor
Posted by joteke | 0 Comments
Filed under: , , ,

Did you know Red Gate gives SQL Log Rescue for free?

I thought I mention this, since these types of tools are rarely needed, but when they are, they are also seriously saving your ass. :-)

SQL Log Rescue is basically undo tool which analyzes transaction logs of your SQL Server database and allows you to undo and redo transactions. You can for example restore the 100 million rows you just accidentally deleted from your customer's database :-) 

Feature set of SQL Log Rescue:

- Automatically generate the SQL scripts to undo and redo transactions.
- View and analyze SQL Server transaction logs.
- View large objects (e.g. ntext and image columns).
- View and recover deleted and modified data.
- Group and sort information in a custom-written, high performance grid.
- Search transactions.
- View row history – understand all the activity on a row-by-row basis

And what's amazing, this tool is now free!

You'll find more information at: http://www.red-gate.com/products/SQL_Log_Rescue/index.htm

NOTE: it doesn't work in SQL 2005 (explained at: http://www.red-gate.com/messageboard/viewtopic.php?t=5983) part of why it's now free

Sponsor
Posted by joteke | 4 Comments
Filed under:

Visual Studio 2008 and IIS 7.0

Mike Volodarsky has put up a nice article about VS2008 and IIS 7.0 together. Check it out: http://learn.iis.net/page.aspx/387/using-visual-studio-2008-with-iis-70/
Sponsor

A few more solutions to the dreaded "Validation of ViewState MAC failed"

I posted about this some time ago.

My previous post:

Potential solution for "Validation of viewstate MAC failed"
http://aspadvice.com/blogs/joteke/archive/2007/08/14/Potential-solution-for-_2200_Validation-of-viewstate-MAC-failed_2200_.aspx

And the original one:

ASP.NET 2.0 and "Validation of ViewState Mac failed" exception
http://aspadvice.com/blogs/joteke/archive/2006/02/02/15011.aspx

Now there's a few more solutions listed and explained with a nice sample code at:

Validation of viewstate MAC failed error
 http://blogs.msdn.com/tom/archive/2008/03/14/validation-of-viewstate-mac-failed-error.aspx

by an ASP.NET Engineer.

Sponsor
Posted by joteke | 2 Comments
Filed under: ,

Peter Blum's Peter's Data Entry Suite

Peter Blum has upgraded his web control suite. He previously had Professional Validation and More and also Peter's Date Package which are the two most popular of his products.

Now Peter has come up with Peter's Data Entry Suite which merges both of these products into a single set containing over 70 ASP.NET web controls.

Here's an overview of the contents

  • Data entry controls – 11 greatly enhanced textboxes, including numeric, date and time. Plus the unique MultiSegmentDataEntry control, a Calendar, MonthYearPicker, and TimePicker.
  • Validation – A powerful replacement to the ASP.NET validators, providing 27 validator controls. It overcomes the many limitations of the native controls, improving how you assist your users and eliminating most custom validation code.

  • Submitting the page – Enhanced buttons and ways to extend other submit controls with features like confirm messages, disable on submit, and enabling after the form is changed.
  • Interactive pages – Numerous controls and tools that respond as the user clicks or types, much like desktop applications. Includes interactive hints, enhanced tooltips, on-screen calculations, a text counter, and more.
  • Input Security – Best practice security against SQL Injection and Cross Site Scripting attacks.
  •  Learn more at: http://www.peterblum.com/DES/Home.aspx

    Sponsor
    Posted by joteke | 0 Comments
    Filed under: ,

    From Dave Reed's blog: TRULY Understanding ViewState, the comment index

    A reader of Dave Reed's blog (a great source of ASP.NET knowledge btw) has created an index of Dave's replies to questions/comments in Dave's "Truly Understanding ViewState" blog post.

    ViewState and dynamic controls are major FAQ in ASP.NET, they might be one of the most misunderstood aspect of ASP.NET. Personally, I've probably answered to thousands of forum and newsgroup posts which have somthing to do with these issues. 

    Therefore this index document, plus of course Dave's own posts, bring a lot of desperately needed knowledge available for everyone working with ASP.NET.

    See: http://weblogs.asp.net/infinitiesloop/archive/2008/02/19/truly-understanding-viewstate-comment-index.aspx

    Sponsor
    Posted by joteke | 0 Comments
    Filed under:

    Microsoft Dreamspark: MS supports students all over the world by giving free developer tools

    See: http://microsoft.blognewschannel.com/archives/2008/02/19/microsoft-giving-away-free-developer-software-to-students/

    "Microsoft is announcing right now DreamSpark, a new program that gives free developer, designer and related software to college students in 11 countries. DreamSpark goes live today in Belgium, China, Finland, France, Germany, Spain, Sweden, Switzerland, the United Kingdom, Canada and the United States, and gives away free stuff like Visual Studio, Expression Studio, and even Windows Server."

    (link by http://blogs.msdn.com/walterst/archive/2008/02/19/dreamspark-microsoft-giving-away-free-developer-software-to-students.aspx)

    And in Finnish: Ja suomalaiset opiskelijat, huomatkaa, tämä koskee myös Suomea. Testasin itse äsken mitä oppilaitoksia löytyy ja aika moni iso oppilaitos - erityisesti yliopistot - siellä jo oli listoilla. Ei ihan kaikki amk:t todellakaan, mutta toivottavasti tämä tulee mahd. monen ulottuville!

    Direct link/Suora linkki asiaa käytännön tasolla käsittelevälle sivulle: https://downloads.channel8.msdn.com/

    Sponsor
    Posted by joteke | 0 Comments
    Filed under: , , , ,

    Kommentoi tekniikanihmelapsi.com-sivustolla, voit voittaa Buffalo Linkstation Live-verkkolevyn

    Työkaverini Sami Laakkonen on pyörittänyt tekniikanihmelapsi.com-sivustoaan jo jonkin aikaa. Aiheena viihde-elektroniikkaan ja multimediaan liittyvät ajankohtaiset uutiset ja tarinat höystettynä omalla kokemuksella

    Nyt Samilla on viime metreillä käynnissä arvonta, jossa hänen blogiviestiään kommentoiva voi voittaa Buffalon Linkstation Live (500gt)-verkkolevyn. Säännöt menevät Samin kirjoitusta lainaten näin:

    "
    Kilpailuun osallistuminen on helppoa. Teidän täytyy vain lähettää kommentti tähän kirjoitukseen. Kommentissa haluan vastauksen muutamaan helppoon kysymykseen:

    1. Mistä löysit tämän blogin ensimmäisen kerran?
    2. Mistä kuulit tästä kilpailusta?
    3. Mikä on sinun oma suosikkisivusi netissä tällä hetkellä?

    Siinä kaikki. Kommentilla ja kysymyksiin vastaamalla olet mukana arvonnassa yhdellä osallistumisella, mutta jos kirjoitat tästä kilpailusta omassa blogissasi /sivustossasi, niin saat arvontaan mukaan kolme osallistumista."

    Vastaanpa tässä omassa viestissäni samalla näihin kysymyksiin. :-)

    1. Samin sähköpostista omasta Inboxistani vai oliko se mesekeskustelun pohjalta :-)
    2. Lukemalla Samin blogia
    3. forums.asp.net

    Kommentoipa sinäkin: http://tekniikanihmelapsi.com/2007/12/03/kilpailu-voita-buffalo-linkstation-live-500gt/

    Sponsor
    Posted by joteke | 0 Comments

    VS2008: Targeting ASP.NET 2.0 and ASP.NET Ajax 1.0

    MS has released ASP.NET 2.0 Ajax templates for VS2008. See: http://blogs.msdn.com/brada/archive/2007/12/19/using-vs2008-to-target-net-framework-2-0-with-asp-net-ajax.aspx
    Sponsor
    Posted by joteke | 0 Comments
    Filed under: , ,

    Generic Controls in ASP.NET pages

    Eilon has demonstrated a nice way to allow you to have generic controls in ASP.NET pages. Check it out.

    http://weblogs.asp.net/leftslipper/archive/2007/12/04/how-to-allow-generic-controls-in-asp-net-pages.aspx

    Sponsor
    Posted by joteke | 0 Comments
    Filed under:

    Uninstalling previous version of VS2008

    I suspect there could be some VS2008 beta uninstallation going on becoming days and weeks. :-) I found following instructions on http://www.microsoft.com/express/support/uninstall/default.aspx

    This article applies to pre-Release versions of Microsoft Visual Studio 2008.  For 2005 version of this document, see Uninstalling Previous Versions of Visual Studio 2005.

    For best results, Visual Studio 2008 should be installed on a computer with no pre-release (Tech Preview, Beta, or CTP) versions of Visual Studio 2008/Codename Orcas, or supporting components.

    If your computer has any of the pre-release (Tech Preview, Beta, or CTP) versions on it, they must be removed in the correct order BEFORE you begin installing the release version. This process is not officially supported.  It is recommended that you run uninstall of the main product first (Microsoft Visual Studio 2008/Codename Orcas).  In most cases this will remove majority of other optional pre-release components installed with it.

    1. Go to the Control Panel and launch Add/Remove Programs
    2. Remove all instances of Visual Studio 2008/Codename Orcas products
    3. Remove any remaining supporting products in the specified order.
      1. Remove "MSDN Library for Visual Studio 2008 Beta"
      2. Remove "Microsoft SQL Server Compact Edition 3.5"
      3. Remove "Microsoft SQL Server Compact Edition 3.5 Design Tools"
      4. Remove "Microsoft SQL Server Compact Edition 3.5 for Devices"
      5. Remove "Microsoft Visual Studio Performance Collection Tools"
      6. Remove "Windows Mobile 5.0 SDK R2 for Pocket PC"
      7. Remove "Windows Mobile 5.0 SDK R2 for Smartphone"
      8. Remove "Crystal Reports 2007"
      9. Remove "Visual Studio Asset System"
      10. Remove "Microsoft Visual Studio Web Authoring Component / Microsoft Web Designer Tools"
      11. Remove "Microsoft Visual Studio 2005 Tools for the 2007 Microsoft Office System Runtime"
      12. Remove "Microsoft Visual Studio 2005 Tools for the 2007 Microsoft Office System Runtime Language Pack" (non-English editions only)
      13. Remove "Microsoft Visual Studio Tools for Office Runtime 3.0"
      14. Remove "Microsoft Document Explorer"
      15. Remove "Microsoft Document Explorer 2005 Language Pack" (non-English editions only)
      16. Remove "Microsoft Device Emulator 3.0"
      17. Remove "Microsoft .NET Compact Framework 3.5"
      18. Remove "Microsoft .NET Compact Framework 2.0 SP1"
      19. Remove ".NET Framework 2.0 SDK"
      20. Remove "Microsoft Visual Studio Codename Orcas Remote Debugger"
      21. Remove "Microsoft Visual Studio 64bit Prerequisites Beta" (64-bit platforms only)
      22. Remove "Microsoft .NET Framework 3.5"
    4. Install the Visual Studio 2008 edition you wish to use

    By the way if you have issues in uninstalling the help/MSDN for VS2008 (mine threw errors when it was supposed to start the uninstaller) starting the uninstaller with CCleaner seemed to work for me.

    Sponsor
    Posted by joteke | 2 Comments
    Filed under: ,

    ASP.NET: trigger cross-page postback on ListBox selection change

    Asked originally on newsgroups, snippets of the question

     "A page have a ListBox and I want that on the OnSelectedIndexChanged event a second page be called passing the value of the selected option. I want the second page to show its own url.

    ...

    The problem is that the ListBox control does not have a PostBackUrl event like the Button control has and I don't want to force the user to choose an option and then click a button. I want it to happen at the OnSelectedIndexChanged event and be able to use PreviousPage in the second page.

    "

    This is what I came up with

    1. Specify the ListBox as

    <asp:ListBox ID="ListBox1" runat="server"            >
                <asp:ListItem Value="1" Text="1st Option" />
                <asp:ListItem Value="2" Text="2nd Option" />
                <asp:ListItem Value="3" Text="3rd Option" />
            </asp:ListBox>


    2. Add this code in the default.aspx(.cs)

       public ListBox TheListBox
        {
            get
            {
                return ListBox1;
            }
        }
        protected void Page_Load(object sender, EventArgs e)
        {
            //Generate the cross-page postback script
            PostBackOptions options = new PostBackOptions(ListBox1);
            //This will trigger correct script generation
            options.ActionUrl = "secondPage.aspx";

            //Add it to onchange attribute if the ListBox
            string s = Page.ClientScript.GetPostBackEventReference(options);
            ListBox1.Attributes["onchange"]=s;

        }

    3. Then on secondPage.aspx

    3.1 In aspx

    <%@ PreviousPageType VirtualPath="~/Default.aspx"   %>

    3.2 in Page_Load of the secondPage.aspx(.cs)

    protected void Page_Load(object sender, EventArgs e)
        {
            if (PreviousPage != null && PreviousPage.IsCrossPagePostBack)
            {
                Response.Write("You selected " +
    PreviousPage.TheListBox.SelectedValue   );
            }
        }

     

    Sponsor
    Posted by joteke | 1 Comments
    Filed under:

    ASP.NET: clear user control output cache

    As per the subject, here's a simple sample

    global.asax
     
    <%@ Application Language="C#" %>

    <script runat="server">

        void Application_Start(object sender, EventArgs e)
        {
            HttpRuntime.Cache.Insert("myCacheKey", DateTime.Now);

        }
              
    </script>

     
    Webusercontrol.ascx

    <%@ Control Language="C#" ClassName="WebUserControl" %>
    <%@ OutputCache VaryByParam="None" Duration="600"   %>
    <script runat="server">
       
        protected void Page_Load(object sender, EventArgs e)
        {
            String[] dependencyKey = new String[1];
            dependencyKey[0] = "myCacheKey";

            BasePartialCachingControl pcc = Parent as BasePartialCachingControl;
            if(pcc != null)
             pcc.Dependency = new CacheDependency(null, dependencyKey);

        }
    </script>
    FROM UC:<%=DateTime.Now.ToString()%>

     
    Default.aspx
    <%@ Page Language="C#" %>

    <%@ Register Src="WebUserControl.ascx" TagName="WebUserControl" TagPrefix="uc1" %>

    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

    <script runat="server">

        protected void Button2_Click(object sender, EventArgs e)
        {
            Cache.Insert("myCacheKey", DateTime.Now);
           
        }
    </script>

    <html xmlns="http://www.w3.org/1999/xhtml" >
    <head runat="server">
        <title>Untitled Page</title>
    </head>
    <body>
        <form id="form1" runat="server">
        <div>
             <uc1:WebUserControl id="WebUserControl1" runat="server"></uc1:WebUserControl></div>
            FROM PAGE:<%=DateTime.Now.ToString() %>
            <asp:Button ID="Button1" runat="server" Text="Cause a postback" />
            <asp:Button ID="Button2" runat="server" Text="Remove from cache" OnClick="Button2_Click" />
        </form>
    </body>
    </html>

    See also Steve Smith's article: Remove ASP.NET Page Output Cache Entries

    Sponsor
    Posted by joteke | 0 Comments
    Filed under: ,
    More Posts Next page »