This article describes steps necessary to upgrade the web application to the new version, which is based on OWIN since version 2015.4. Upgrade is done only once, it is not necessary to perform such operation with each release.

Step-by-step guide 

  1. Make sure .NET framework in version 4.5.1 or higher is installed.
  2. Make sure ASP.NET MVC 4 is installed. Installation package is available at http://www.microsoft.com/en-us/download/details.aspx?id=30683.
  3. Download an OWIN based release of the web application.
  4. Deploy the files from the downloaded package.
  5. There is an upgrade/upgrade_2015.4.0.cmd script in the downloaded package. Execute it directly from upgrade directory, It will clear the obsolete files.
  6. Open web.config and make the following changes:

    <add key="webPages:Version" value="2.0.0.0"/>
    <add key="autoFormsAuthentication" value="false"/>
    <add key="enableSimpleMembership" value="false"/>
    <!--<authentication mode="Forms">
        <forms name="asapAuthCookie" timeout="10" />
    </authentication>//-->
    Authentication cookie settings (including session expire timeout) are now possible to change using Startup.cs User Management Configuration.
    <location path="Login">
    	<system.web>
    		<authorization>
    			<allow users="*" />
    		</authorization>
    	</system.web>
    </location>
    <location path="Recover">
    	<system.web>
    		<authorization>
    			<allow users="*" />
    		</authorization>
    	</system.web>
    </location>
    <add verb="*" path="Gateway.aspx" type="Origam.Server.Handlers.GatewayHandler, Origam.Server.Handlers" name="GatewayHandler"/>
    <add verb="*" path="SignOut.ashx" type="Origam.Server.Handlers.SignOutHandler, Origam.Server.Handlers" name="SignOutHandler"/>
    <add verb="*" path="ReportProblem.ashx" type="Origam.Server.Handlers.ReportProblemHandler, Origam.Server.Handlers" name="ReportProblemHandler"/>
    <add verb="*" path="GeoLocation.ashx" type="Origam.Server.Handlers.GeoLocationHandler, Origam.Server.Handlers" name="GeoLocationHandler"/>
    <defaultDocument>
    	<files>
    		<clear/>
            <add value="Portal.cshtml"/>
    	</files>
    </defaultDocument>
  7. Configure OWIN container through Startup.cs file. Its location is expected in App_Code folder of the application. Sample file is provided with the package as Startup.cs_. Sample file contains configuration for cookie authorization via Asp.Net Membership provider. 

  8. Switch the application to the application pool based on .NET 4.0.
  9. Make sure you have a record in the BusinessPartner table with UserName="guest".

If your application was configured to use Asp.Net Membership provider, your work is done and you should be able to log in to the system.

If your application is using AJAX login and sign out functionality, you need to update URLs. They're changed from /AjaxLogin.ashx and /AjaxSignOut.ashx to /AjaxLogin and /AjaxSignOut.

Related Articles