in

DotNetMarche

.NET Framework User Group delle Marche

This Blog

Syndication

ExternalBlogs

June 2007 - Posts

  • Nuovi standard documentali: le particolarità dei formati xml-based

    Il mio "poco" tempo libero lo sto dedicando alla scrittura di un articolo riguardo i nuovi standard documentali, devo ancora vedere bene dove pubblicarlo ma sicuramente una copia "short" sarà come sempre inviata tramite la KBox via it Consult. Appena pronto vi giro i riferimenti. 

    Technorati tags: , ,
  • NGenerics

    If you like me are tired of .NET standard IList<T> that does not offer a lot of method to do sorting, filtering and more, you can have a look at NGenerics, a complete library composed of a lot of classes to satisfy all the need you can have to store data. You have algorithms for [...]
  • Parse a date in .NET

    Today I had a little bug in an application of mine, I have a routine that accepts a series of parameter through a comma separated string of values, this kind of interface to a function is not a good thing to do, expecially when DateTime variables are transmitted, but this is an old routine and [...]
  • Ajax Tip: Startup Script e UpdatePanel

    Spesso e volentieri nelle mie applicazioni web, visualizzo alert javascript per segnalare all'utente errori o warning. In ASP.NET 2.0 la funzione da usare è la Page.ClientScript.RegisterStartupScript. Nel caso si utilizzino update panel e AJAX ci sono dei problemi e lo script che si tenta di registrare non sembra essere eseguito.
    La soluzione è usare la funzione RegisterStartupScript dello ScriptManager e in particolare bisogna usare questa sintassi:

    ScriptManager.RegisterStartupScript(Me.UpdatePanel1, GetType(String), "errorMessage", script, True)

  • DELETED

  • ASP.NET Ajax: problemi di memoria con il CalendarExtender

    Sto iniziando ad usare le estensioni AJAX di Microsoft in modo più approfondito. Aggiungendo un CalendarExtender ad una pagina ASP.NET mi sono accorto, insieme ai miei colleghi, di una lentezza esasperante e di un'occupazione spropositata in memoria.
    Pensando ad un errore nel mio sito o ad un problema nella mia versione del control toolkit mi sono scaricato l'ultima versione e ho fatto un test sul SampleWebSite. Anche in questo caso gli stessi problemi.
    A questo punto mi sono deciso ad indagare e ho fatto affidamento su San Google. Ho trovato questo issue nel sito CodePlex del progetto. Sebbene al momento sia stato chiuso perchè non riproducibile, non mi pare che sia stato effettivamente risolto, come viene sottolineato da chi ha aperto la segnalazione.

    Al momento l'unica soluzione è quella di scaricarsi il codice sorgente e andarsi a modificare il file CalendarBehavior.js. Le modifiche da fare sono quelle elencate nella segnalazione:

    I fixed the problem. In fact, there are two problems.
    -1st: if I remove the "select" event in _popupDiv$delegates, it removes one of the memory leak problem. Moreover, I do not understand why this event is used, because IE and Firefox works fine without (perhaps for other browser ?).
    -2nd: in the dispose method, there are some bad conditions to remove the handlers on _daysTable, _monthsTable and _yearsTable: they are on _daysRows, _monthsRows and _yearsRows, that are properties of the class but never initialized, so I remove this properties and change conditions from _[...]Rows to _[...]Table.

    Sul primo punto non mi pronuncio, anche a me sembra che l'evento select non sia mai chiamato. Per quanto riguarda la dispose, vengono controllate delle proprietà che effettivamente non sono mai istanziate e quindi dovrebbero essere sempre null.
    Eseguendo queste modifiche anche nella mia installazione i problemi di memoria sono scomparsi. In ogni caso mi sembra che il Calendar sia ancora troppo pesante e reagisca lentamente all'input dell'utente. Mah!

  • Come manipolare i menu di navigazione con il modello ad oggetti di Sharepoint

    L'intero sistema di navigazione di Sharepoint è completamente esposto attraverso il suo relativo modello ad oggetti. Abbiamo infatti un nuovo namespace, dalla versione 3.0 di Windows Sharepoint Services, in grado di manipolare i nodi di navigazione...
  • Validation of ViewState Mac failed

    Da un pò di giorni, il mio sito mi ritorna ogni tanto questa eccezione: HttpException (0x80004005): Validation of viewstate MAC failed. If this application is hosted by a Web Farm or cluster, ensure that configuration specifies the same validationKey...
  • SharePoint Visual Studio Project Templates

    Stavo girando un pò sul web per cercare qualcosa sulle solution di Sharepoint, e sono inciampato su questo progetto su codeplex: http://www.codeplex.com/sptemplateland . E' un template per Visual Studio .NET 2005 per creare i file necessari per il...
  • Warping ASP.NET

    In a recent project I have a big user control with a Asp.Wizard control, 6 tabs and each tab present a complex user control. The whole thing is used to insert a complex set of data presenting the operation to the user a standard windows tab. After a while the control has degraded, because a [...]
  • KBox News

    vi comunico che sono stati pubblicati due nuovi articoli nella sezione Knowledge Box di it Consult:

    “La Gestione per processi integra pratiche di Knowledge Management” di Marco Bianchini

    “Protocollo Informatico: il cuore di un sistema di Knowledge Management di una Pubblica Amministrazione” di Romeo Pruno

    Tutti i dettagli nelle NEWS all'indirizzo: www.itconsult.it

  • UpdatePanel e Validators: la soluzione sono gli ASP.NET AJAX Validators

    Probabilmente chi lavora da un po' con ASP.NET e AJAX, si sarà accorto che inserendo un validator in un update panel non tutto funziona come dovrebbe.
    Il problema risiede nel partial rendering e nelle nuovi API di AJAX che lo cosentono. Come potete leggere nel post di Matt Gibs, sarebbe dovuta uscire una patch distribuita attraverso il Windows Update che avrebbe dovuto risolvere il problema andando ad aggiornare l'assembly System.Web.
    A me sembra di aver aggiornato Windows con gli ultimi aggiornamenti, ma i problemi tra validator e update panel sono gli stessi. A questo punto non so se la patch sia effettivamente stata rilasciata o meno. Attendo lumi da chi è più informato di me. In ogni caso seguendo le indicazioni del post segnalato in precedenza il problema si risolve e possiamo tornare ad utilizzare i nostri validators senza nessun problema.

  • How to Generate NHibernate Configuration Using ActiveWriter

    Preview 3 has this functionality, but there are a few things to mention.
    ActiveWriter use ActiveRecord assembly to generate NHibernate config files. So you'll need Castle.ActiveRecord.dll, NHibernate.dll and all necessary dependincies to make it work.

    1. Set the target to NHibernate
      This way, AW will generate .hbm.xml files for each entity in your model.
    2. Set the Assembly Path to where Castle.ActiveRecord.dll, NHibernate.dll and all necessary dependincies reside.
      The design decision was that, I didn't want to package these assemblies with AW. Rather than that, I thought user will most probably have them so they can choose whatever version they want to generate the configuration. If you don't supply the path, AW (VS, actually) will look for them in GAc and then {Your VS Path}\Common7\IDE\Castle.ActiveRecord.dll, so if you have them in one of those places, it should be fine.
      One other quirk is, if you first try to generate with the wrong path, setti ng the correct one later won't work until you restart Visual Studio. This is the framework's limitation, once you try to load an assembly and get an error, the result will be cached for subsequent tries. So VS appdomain should be restarted to make it work. I'll have a possible soliton for this for a future version of ActiveWriter (will try to load in a dummy appdomain, then in the VS appdomain)
      You may use the fully qualified assembly names for Active Record Assembly Name and NHibernate Assembly Name to target a specific version in the GAC, if you have more than one in there.
    3. When you save the model, AW will generate configuration.

    I'll prepare a better documentation in the wiki.
    Have fun.
    Update:
    AW does not work with release version of Castle assemblies (RC2?) for NHibernate generation, it works with the trunk (or with recently compiled assemblies). You can use the latest bits from the build server: http://builds.castleproject.org/cruise/index.castle

     

     

    FONTE :

     

    http://altinoren.com/default.aspx

  • Padding is invalid and cannot be removed

    After another release of our project in production machine sometimes I see in the log this strange error System.Security.Cryptography.CryptographicException: Padding is invalid and cannot be removed. System.Security.Cryptography.CryptographicException: Padding is invalid and cannot be removed. at System.Security.Cryptography.RijndaelManagedTransform.DecryptData(Byte[] inputBuffer, Int32 inputOffset, Int32 inputCount, Byte[]& outputBuffer, Int32 outputOffset, PaddingMode paddingMode, Boolean fLast) at System.Security.Cryptography.RijndaelManagedTransform.TransformFinalBlock(Byte[] inputBuffer, Int32 [...]
  • WatiN, looking for content in GridView

    Quite often I need to automate test page and check that the contents of a GridView contains exactly some strings. First of all I have an helper class that helps me to cope with the name that asp.net give to controls contained in another controls, then I write some helper methods to assert that the [...]
More Posts Next page »
Powered by Community Server (Commercial Edition), by Telligent Systems