lundi 19 septembre 2016

Updates in .NET core 1.0.1 : updating your machine or your application to use .NET core


1.     Updating your Machine to use .NET Core 1.0.1

- Install .NET Core 1.0.1 (https://www.microsoft.com/net/core#windows)

-  If you have already the last version 1.0.0, the installation of 1.0.1 version does not delete or otherwise update your current .NET Core.

2.     Updating your Application to use .NET Core 1.0.1
 You can do the update your .NET Core metapackage reference toMicrosoft.NETCore.App 1.0.1. (https://www.nuget.org/packages/Microsoft.NETCore.App/1.0.1)
An app configured this way will no longer run on .NET Core 1.0.0, even if it’s the only .NET Core version on a machine.
So, you just update to ASP.NET Core 1.0.1 and Entity Framework 1.0.1, by referencing a newer NuGet package.
So, we can see that in project.json file:




vendredi 16 septembre 2016

mardi 2 août 2016

IIS tips

 Step-by-step IIS configuration guide

  •  If the following error occurs, go to applicationHost.config file in C:\Windows\System32\inetsrv\config  and set overrideModeDefault properties to "Allow" for handlers section :
  <section name="handlers" overrideModeDefault="Allow" />

  • If the following error occurs, 
proceed to ASP.Net component set up:
  • Launch :  c:\Windows\Microsoft.NET\Framework\v4.0.30319\aspnet_regiis.exe –i to register the previous ASP.NET installation with IIS
  • If authorization are not set yet, activate them :
    1. Open IIS Manager and navigate to the site to manage.
    2. In Features View, double-click Directory Browsing.
In the Actions pane, click Enable to enable the Directory Browsing feature .
  •  If the following error occurs : 
    Error Message : Handler “PageHandlerFactory-Integrated” has a bad module “ManagedPipelineHandler” in its module list
    Installation of CGI and ISAPI extensions is required  :
  • The following errors requires addition of the folder permission
    Error Message : The current identity does not have write access to ‘C:\Windows\Microsoft.NET\v4.0.30319\Temporary ASP.NET Files’

 
  1. Problem with HTTPPost request in IIS7
    1- ASP.NET MVC4 not handling POST requests in IIS7 integrated mode
    The default configuration inserts this in the web.config:
    The problem is the "*." path, If you change this to "*", then all requests will be handled by the ExtensionlessUrlHandler, including those to static files which will not be served anymore. So the solution is: Remove the POST verb from the handler entries and add new entries for the ExtensionlessUrlHandler with the path set to "*" and only for POST requests:
    Ideally remove the ones you don't need (x86 and x64 in classic vs. integrated pipeline).
    2- IIS 7  allow POST requests to html files
    Maybe 7  routing is different in respect to handing off a POST to an action that has no argument that can accept the post form data.
     ==> For this Reason I prefer working with Windows Azure

vendredi 22 juillet 2016

How we can start using Visual Studio 2015 with .NET Core Tooling


Visual studio is used to improve developer productivity inside the editor, the goal now is to reduce actions and automate it to reduce time lost and focus on the code quality, best practices and limit bugs.
So Microsoft, worked all these years to give the better tool to developer from Visual Studio 2005 until Visual Studio 2015 we can touch the difference between them.
.NET Core RC2 is finally here, and this time it is a “Release Candidate” rather than an RC1 Beta. Now, we talk about .NET Core and its  cross-platform capabilities. This focus on Linux and Mac OS X support has led not only to a new .NET API but also an accompanying implementation and even a set of tools. In this article I will explain  the various .NET Core project types, the details of the new file types and their functions.

Let's start !

Before leveraging .NET Core RC2, we have to do some updates to our tools :
1- Download the .NET Core Tooling Preview 1 for Visual Studio 2015 :Visual Studio 2015 Update 3 and  .NET Core 1.0 for Visual Studio.
2- Install the NuGet Package Manager from bit.ly/27Rmeaj.
3- Create a new project : 
As you can see, there are three project types (Visual C#\Web and Visual C#\.NET Core folders). Each project type generates a different file's type :
Let's take a look to the structure of every project in this figure : 
As we can see, we can't find App.config or <appname>.config that was used from .NET Framework 1.0 as configuration file but we still have Web.config for ASP.NET Core Web Application (.NET Core). 
Properties\AssemblyInfo.cs : exist in Class Library and Console Application, it identifies the assembly data such as configuration, company, product and trademark. It was released in 2000.
Class1.cs
is a skeleton C# class file for the Class1 class and includes its default constructor, we found it in Class Library instead of Program.cs.
Global.json : is generated automatically for  every .NET Core project; it's used to for project’s node to identifies additional locations for source code when debugging.
Properties\launchSettings.json :  identifies the various Web hosting configuration settings: for example, by .NET Core Configuration we can identify the environment (development, test or production); SSL and authentication. Changes made from the Debug tab on Project Properties Window of Visual Studio provide a UI for editing the launchSettings.json file, as shown in this figure : 
Project.json is a new project file used in all .NET Core projects, It identifies lot of things like project references, build options (the version number), and identifies the platform to compile to—whether .NET Core or .NET Framework, it's build to replace the NuGet File Manager package.config file because it identifies the NuGet references for the project. it specify the frameworks supported in the project and the configuration required, it identify the target platform for self-contained apps. Note that the project is a portable app, project.json identifies which frameworks the project expects to be installed on the target machine on which the assembly will execute.
Project.lock.json : store the list of file like Nuget References that the project need them to compile. It includes also specific package version numbers, unlike the project.json file, which supports wildcards. If we delete it we have to restore all packages.  This file is listed as a child of project.json within Visual Studio.

ClassLibrary.xproj is the MSBuild file that defines what will happen when you build the project.
ClassLibrary.xproj.user overrides the Class­Library.xproj file and provides additional MSBuild properties such as local user debug-specific settings like ports.
Program.cs is used in  Console Application and ASP.NET Core Web Application (.NET Core) projects,it  defines a Program class that includes the definition of the Main entry point for your application even for Web applications.
Web.config : as usual, is used in Web applications and it  provides a minimal configuration for IIS but this file no longer contains app settings, which are instead moved into configuration files that are loaded by Microsoft.Extensions.Configuration. (see more details : https://msdn.microsoft.com/en-us/magazine/mt632279.aspx
Note that when we create a new project, all the source code are placed into a src subdirectory for the solution and for test projects , they are placed into a test directory alongside src.
Let's recapitulate : 

How we can start using Visual Studio 2015 with .NET Core Tooling


Visual studio is used to improve developer productivity inside the editor, the goal now is to reduce actions and automate it to reduce time lost and focus on the code quality, best practices and limit bugs.
So Microsoft, worked all these years to give the better tool to developer from Visual Studio 2005 until Visual Studio 2015 we can touch the difference between them.
.NET Core RC2 is finally here, and this time it is a “Release Candidate” rather than an RC1 Beta. Now, we talk about .NET Core and its  cross-platform capabilities. This focus on Linux and Mac OS X support has led not only to a new .NET API but also an accompanying implementation and even a set of tools. In this article I will explain  the various .NET Core project types, the details of the new file types and their functions.

Let's start !

Before leveraging .NET Core RC2, we have to do some updates to our tools :
1- Download the .NET Core Tooling Preview 1 for Visual Studio 2015 :Visual Studio 2015 Update 3 and  .NET Core 1.0 for Visual Studio.
2- Install the NuGet Package Manager from bit.ly/27Rmeaj.
3- Create a new project : 
As you can see, there are three project types (Visual C#\Web and Visual C#\.NET Core folders). Each project type generates a different file's type :
Let's take a look to the structure of every project in this figure : 
As we can see, we can't find App.config or <appname>.config that was used from .NET Framework 1.0 as configuration file but we still have Web.config for ASP.NET Core Web Application (.NET Core). 
Properties\AssemblyInfo.cs : exist in Class Library and Console Application, it identifies the assembly data such as configuration, company, product and trademark. It was released in 2000.
Class1.cs
is a skeleton C# class file for the Class1 class and includes its default constructor, we found it in Class Library instead of Program.cs.
Global.json : is generated automatically for  every .NET Core project; it's used to for project’s node to identifies additional locations for source code when debugging.
Properties\launchSettings.json :  identifies the various Web hosting configuration settings: for example, by .NET Core Configuration we can identify the environment (development, test or production); SSL and authentication. Changes made from the Debug tab on Project Properties Window of Visual Studio provide a UI for editing the launchSettings.json file, as shown in this figure : 
Project.json is a new project file used in all .NET Core projects, It identifies lot of things like project references, build options (the version number), and identifies the platform to compile to—whether .NET Core or .NET Framework, it's build to replace the NuGet File Manager package.config file because it identifies the NuGet references for the project. it specify the frameworks supported in the project and the configuration required, it identify the target platform for self-contained apps. Note that the project is a portable app, project.json identifies which frameworks the project expects to be installed on the target machine on which the assembly will execute.
Project.lock.json : store the list of file like Nuget References that the project need them to compile. It includes also specific package version numbers, unlike the project.json file, which supports wildcards. If we delete it we have to restore all packages.  This file is listed as a child of project.json within Visual Studio.

ClassLibrary.xproj is the MSBuild file that defines what will happen when you build the project.
ClassLibrary.xproj.user overrides the Class­Library.xproj file and provides additional MSBuild properties such as local user debug-specific settings like ports.
Program.cs is used in  Console Application and ASP.NET Core Web Application (.NET Core) projects,it  defines a Program class that includes the definition of the Main entry point for your application even for Web applications.
Web.config : as usual, is used in Web applications and it  provides a minimal configuration for IIS but this file no longer contains app settings, which are instead moved into configuration files that are loaded by Microsoft.Extensions.Configuration. (see more details : https://msdn.microsoft.com/en-us/magazine/mt632279.aspx
Note that when we create a new project, all the source code are placed into a src subdirectory for the solution and for test projects , they are placed into a test directory alongside src.
Let's recapitulate : 

mercredi 22 juin 2016

Mon anniversaire - Notes personnels



Comme chaque année, une tradition respectée, le jour de mon anniversaire est un jour spécifique et important car j'établis un bilan analytique afin de déterminer la différence entre l'année dernière et cette année, de tous les niveaux. Une analyse des causes et d'amélioration sera établi à la fin dans le but de mettre un plan d'action pour l'année qui suit.
Du point de vue professionnel , une légère évolution dans la société ARDIA (http://ardia.com.tn/) en mois de janvier donc je suis ingénieur en développement .NET senior dont mes fonctions des bases de plus de la conception et d'analyses des données sont ;

- Assurer un support technique.


- Architecte technique (NLayers).

- Développement des solutions adaptées aux besoins du client d'ARDIA.
- Assurer la mise en application de la méthodologie Agile scrum (en utilisant Jira comme outil).
À mon avis de point de vue professionnel, aucune évolution remarquable de tous les niveaux, j'essaie toujours à garder une veille technologique vue l'évolution rapide des technologies de Microsoft.

Depuis 2 ans, je travaillais dans un projet Social appelé AlloTabib, ce projet a une valeur personnelle pour moi, se concentrer à digitaliser le secteur médical est très difficile en Tunisie, car d'après mes constats, il y a encore des médecins qui utilisent les papiers pour garder trace et ils ne connaissent de l'internet que Facebook, on n'arrive même pas à trouver leurs profils dans internet. 


Alors convaincre un médecin à utiliser un projet Cloud pareil n'est pas aussi simple. Mais nous avons travaillé moi et mon mari à faire évoluer AlloTabib afin de répondre aux besoins des médecins et produire une solution Saas spécifique et déterminée. 


Malgré nos engagements personnels et professionnels, nous avons décidé de casser la routine (boulot et maison) afin de créer une ambiance d'apprentissage et surtout être utile à produire quelque chose ayant une valeur ajoutée pour les citoyens tunisiens. Nous avons donc commencé notre aventure en 2015 dont le but est de participer aux compétitions.


Je reviens vers cet article  rédigé en janvier 2016 : https://www.linkedin.com/pulse/welcome-2016-challenges-hamida-rebai-trabelsi?trk=pulse_spock-articles


Cette année, 2016, sortant d'une compétition nationale au demi-final présenté par mon mari Andi Fekra (http://andifekra.tn), AlloTabib a été choisit parmi des milliers de projet dans le monde arabe en tant que finalistes arabes dans la compétition : Arab Mobile challenge 2016 (http://www.arabmobilechallenge.com), une expérience inoubliable (pitching, coaching, networking ...) dont j'ai appris des choses et j'ai rencontré des jeunes ambitieux. 



Et le grand défi est d'être choisi parmi des milliers de candidatures à assister au sommet global d'entrepreneuriat 2016 aux Silicon Valley en tant que délégué: (http://www.ges2016.org) . 

C'est un événement très important, ce sommet, 7ème édition du GES, a déjà été abrité par les États-Unis et les gouvernements de la Turquie, des Émirats Arabes-Unis, de la Malaisie, du Maroc, et du Kenya. L’édition 2016 du sommet mondial de l’entrepreneuriat se tient cette année aux Silicon Valley à Stanford University sur invitation du Président Barack OBAMA. 700 invités ont été choisis sur une liste de 10 000 potentiels candidats à travers le monde dont j'y suis.

http://africanmanager.com/tunisie-9-entrepreneurs-au-sommet-mondial-de-lentreprenariat/

AlloTabib est une solution développé en utilisant les nouvelles technologies .NET, met en oeuvre une architecture N-Tiers ( nLayer : Couche domain, Infrastructure, service, présentation...) et Domain Driven Design (Entities, Repositories, Domain/Application Services, DTO's...),il est implémenté en utilisant les meilleures pratiques telles que l'injection de dépendance IoC et pour ORM: Fluent NHibernate et le système de Log est optimisé utilisant Log4Net car il faut toujours garder trace pour la maintenance

Les derniers techniques ASP. NET MVC & Web API sont implémentés dans ce projet côté serveur. Sans oublier la couche présentation qui est développée en utilisant SPA: AngularJsBootstrap ... Donc, AlloTabib est un outil puissant vu qu'il utilise plusieurs technologies, en garantissant aussi une sécurité des données. AlloTabib est déployé sous Windows Azure, qui est nouveau pour moi donc à travers AlloTabib j'ai acquis des connaissances et je commence à préparer pour avoir certificat dans ce niveau afin d'évoluer dans ma carrière.

AlloTabib a été choisit aussi dans le programme de Microsoft Bizspark (https://www.microsoft.com/bizspark/startup/profile.aspx?Startup=556012) qui supportent les jeunes à déployer leurs projets sous Azure avec des services totalement gratuits comme les outils msdn, Windows, Office 365 (https://www.microsoft.com/bizspark/startup/default.aspx#/benefits). 

AlloTabib commence à avoir une présence médiatique très forte dans alarabiya, bonjouridee, thd, wajjahni, arabnet, gistnetwork ...


Après 7 ans d'expérience professionnelle, l'objectif est d'évoluer autrement, j'ai décidé de commencer mes préparations pour devenir MVP (https://mvp.microsoft.com) dans le développement des solutions web en utilisant les technologies .NET (Visual Studio and Development Technologies) pour la Tunisie, mais le problème est que malgré l’existence des compétences tunisiennes dans ce  domaine, il n'y a pas de communauté lié donc j'ai décidé de la créer avec d'autres doués par ces technologies : http://dotnet-tunisian-community.azurewebsites.net/ et jusqu'à aujourd'hui je suis satisfaite de l'évolution de cette communauté et des membres compétents qui s’entraident. (https://www.linkedin.com/groups/8494867) 
Mon blog : http://hamidarebai.blogspot.it/ dont je partage mes connaissances et mes tests sur les nouvelles technologies;


Durant cette année, j'ai passé par des échecs et par des réussites, il faut toujours apprendre et comme je l'ai dis et je le dis toujours en anglais :

http://english.alarabiya.net/en/business/economy/2016/06/21/Tunisian-startup-aims-to-be-Google-of-healthcare-in-country.html

vendredi 20 mai 2016

[16 May 2016 ] Microsoft Releases ASP.NET Core RC2


ASP.NET Core RC2 is available today with a lot of change comparing to ASP.NET 5 RC1, numerous improvements , with the updates allowing greater compatibility with more .NET frameworks.
“The release contains the RC2 of the .NET Core runtime and libraries. These libraries are everything that ends up in your ‘bin’ folder when you deploy an application. The tooling included (command-line tools, project tools, and Visual Studio tools) has been declared as a preview 1 release. This change allows those developers who are comfortable with using the runtime to move forward with their projects while the ASP.NET Core tools are completed.”
Microsoft declare that this new version if different from the last one, for example, in last version (RC1) a ASP.NET application that hosts libraries was run by DNX toolchain to execute Startup.cs, but now in the new version (RC2) the code wil be in a Program.co, allowing a single .NET toolchain to be used for ASP.NET Core apps and ASP.NET Hosting libraries.
As of RC2 an ASP.NET Core application is a .NET Core Console application that calls into ASP.NET specific libraries. What this means for ASP.NET Core apps is that the code that used to live in the ASP.NET Hosting libraries and automatically run your startup.cs now lives inside a Program.cs. This alignment means that a single .NET toolchain can be used for both .NET Core Console applications and ASP.NET Core applications. It also means that customers have more obvious control over the code that hosts and runs their ASP.NET Core app
IIS support is also integrated into ASP.NET Core RC2, a web server that uses ASP.NET Core Module to configure deploying and hosting applications. Microsoft confirm that RC2 will be rolled out to support Azure Web Applications, with that feature arriving next week.
A great example :
https://wildermuth.com/2016/05/13/Getting-Ready-for-ASP-NET-Core-RC2

For more details :
http://www.asp.net/core