<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>ASP.Net Development Company in India &gt; Metasys Software Pvt Ltd.</title>
	<atom:link href="https://www.metasyssoftware.com/tag/asp-net-development-company-in-india/feed/" rel="self" type="application/rss+xml" />
	<link>https://www.metasyssoftware.com</link>
	<description>Unique People, Unique Solutions</description>
	<lastBuildDate>Mon, 10 Jun 2024 08:45:18 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=6.9.4</generator>

<image>
	<url>https://www.metasyssoftware.com/wp-content/uploads/2023/10/metasys-svg-.png</url>
	<title>ASP.Net Development Company in India &gt; Metasys Software Pvt Ltd.</title>
	<link>https://www.metasyssoftware.com</link>
	<width>32</width>
	<height>32</height>
</image> 
	<item>
		<title>How to Keep an Application Logged in to Avoid Session Timeout and Data Loss (Asp.net)?</title>
		<link>https://www.metasyssoftware.com/microsoft-technologies/how-to-keep-an-application-logged-in-to-avoid-session-timeout-and-data-loss-asp-net/</link>
		
		<dc:creator><![CDATA[meta_prasad]]></dc:creator>
		<pubDate>Thu, 06 Jul 2023 05:56:43 +0000</pubDate>
				<category><![CDATA[Microsoft Technologies]]></category>
		<category><![CDATA[ASP.Net Development Company in India]]></category>
		<category><![CDATA[ASP.NET]]></category>
		<category><![CDATA[ASP.Net developers]]></category>
		<guid isPermaLink="false">https://www.metasyssoftware.com/?p=6256</guid>

					<description><![CDATA[<p>Session Management is an important aspect to be taken care of while writing code. Several factors play a role in [&#8230;]</p>
The post <a href="https://www.metasyssoftware.com/microsoft-technologies/how-to-keep-an-application-logged-in-to-avoid-session-timeout-and-data-loss-asp-net/">How to Keep an Application Logged in to Avoid Session Timeout and Data Loss (Asp.net)?</a> appeared first on <a href="https://www.metasyssoftware.com">Metasys Software Pvt Ltd.</a>.]]></description>
										<content:encoded><![CDATA[<div id="pl-6256"  class="panel-layout" ><div id="pg-6256-0"  class="panel-grid panel-no-style" ><div id="pgc-6256-0-0"  class="panel-grid-cell" ><div id="panel-6256-0-0-0" class="so-panel widget widget_sow-editor panel-first-child panel-last-child" data-index="0" ><div
			
			class="so-widget-sow-editor so-widget-sow-editor-base"
			
		>
<div class="siteorigin-widget-tinymce textwidget">
	<p>Session Management is an important aspect to be taken care of while writing code. Several factors play a role in deciding your strategy and it is never one size fits all. It is important to understand the context and specific requirements of a business to determine the appropriate session duration.</p>
<p>In this context, the application was used as an internal application to gather data on all the work being completed by the construction crew. This was reviewed by the managers and supervisors and thereafter billers generated the invoices.</p>
<p>It was important here to allow for long session durations. The users wanted the ability to remain logged in even when the application might be idle for a long time, and with no data loss. This would not be recommended in the context of personal banking, where security and avoidance of session hacking are of far greater importance.</p>
<p>This article explains how you can maintain a session in ASP.Net and avoid getting logged out, even when the application is idle for a long time. This method will also help in preventing data loss.</p>
<p>We used Handler to maintain the session in ASP.Net.</p>
<p><h2><strong>Why Handler?</strong></h2>
</p>
<ul>
<li>Handler makes a simple post-back call to the server to keep the session alive.</li>
<li>In Handler, a session variable is accessed only if it is inherited by the interface IRequiresSessionState. The handler receives the request from the aspx page and, in turn, sends a response.</li>
</ul>
<p><strong>Implementation of Handler in our application using Asp.net and jQuery:</strong></p>
<p>We employ Handler in our application for user data maintenance and to prevent session time out.</p>
<p><strong>How Handler Works:</strong></p>
<ul>
<li>Create a handler by right-clicking on the website and adding an item by selecting a generic handler.  Eg:(KeepActive.ashx) - extension of handler is ASHX.</li>
<li>Make a call to the handler using jQuery function.</li>
</ul>
<p><strong>Code snippet:</strong></p>
<p><%@ WebHandler Language="C#" Class="KeepActive" %><br />
using System;<br />
using System.Web;<br />
using System.Web.SessionState;<br />
public class KeepActive : IHttpHandler, IRequiresSessionState<br />
{<br />
    public void ProcessRequest(HttpContext context)<br />
    {<br />
        try<br />
        {<br />
            context.Session["Active"] = DateTime.Now;<br />
        }<br />
        catch { }<br />
    }<br />
  }<br />
    public bool IsReusable<br />
    {<br />
        get<br />
        {<br />
            return false;<br />
        }<br />
    }<br />
}
</p>
<ul>
<li>After the handler is created, create a jQuery function named “setinterval”, which runs at an    interval to update session.</li>
<li>Please find the below jQuery code, which is called on load of the page and it has a function named “setinterval”, which get triggered after every five minutes:</li>
</ul>
<p><strong>Code snippet:</strong></p>
<p>window.onload = function () {<br />
var idleInterval = setInterval(timerIncrement, 300000); // for 5 minutes<br />
}</p>
<ul>
<li>The above function calls another function named “timerIncrement”, which triggers and calls handler named “KeepActive” after every five minutes. It is necessary to update the session and keep it alive</li>
</ul>
<p><strong>Code snippet:</strong></p>
<p>function timerIncrement() {<br />
idleTime = idleTime + 1;<br />
if (idleTime &gt; 1) { // Greater than 10 minutes<br />
if (typeof GetHiddenForemanReportID == 'function') {<br />
var foremanReportID = GetHiddenForemanReportID();<br />
jq.post("/KeepActive.ashx?foremanReportID=" + foremanReportID, null,     function () {<br />
});</p>
<p>MetaSys Software’s developers have successfully delivered applications using <a href="https://www.metasyssoftware.com/case-study-dotnet">ASP.Net Core</a> and .Net &amp; ASP.Net Framework. For more details, see <a href="https://www.metasyssoftware.com/dot-net">https://www.metasyssoftware.com/dot-net</a>. <a href="https://www.metasyssoftware.com/contact/">Contact us</a> with your project requirements now!</p>
</div>
</div></div></div></div></div>The post <a href="https://www.metasyssoftware.com/microsoft-technologies/how-to-keep-an-application-logged-in-to-avoid-session-timeout-and-data-loss-asp-net/">How to Keep an Application Logged in to Avoid Session Timeout and Data Loss (Asp.net)?</a> appeared first on <a href="https://www.metasyssoftware.com">Metasys Software Pvt Ltd.</a>.]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>Converting an MVC web APP to .Net Core Web App</title>
		<link>https://www.metasyssoftware.com/dot-net/converting-an-mvc-web-app-to-net-core-web-app/</link>
					<comments>https://www.metasyssoftware.com/dot-net/converting-an-mvc-web-app-to-net-core-web-app/#respond</comments>
		
		<dc:creator><![CDATA[meta_prasad]]></dc:creator>
		<pubDate>Mon, 13 Apr 2020 07:56:19 +0000</pubDate>
				<category><![CDATA[Dot Net]]></category>
		<category><![CDATA[DotNet framework]]></category>
		<category><![CDATA[DotNetCore 3.0 developers]]></category>
		<category><![CDATA[Dot Net application development DotNet Core 3.0]]></category>
		<category><![CDATA[ASP web application]]></category>
		<category><![CDATA[ASP Dot Net developer]]></category>
		<category><![CDATA[Web application development company]]></category>
		<category><![CDATA[ASP.Net Development Company in India]]></category>
		<category><![CDATA[DotNet run]]></category>
		<category><![CDATA[Dot NET Software Services India]]></category>
		<guid isPermaLink="false">https://www.metasyssoftware.com/?p=2996</guid>

					<description><![CDATA[<p>History Like many others, we have been working on MVC 5 based web applications since 2013. With Microsoft planning significant [&#8230;]</p>
The post <a href="https://www.metasyssoftware.com/dot-net/converting-an-mvc-web-app-to-net-core-web-app/">Converting an MVC web APP to .Net Core Web App</a> appeared first on <a href="https://www.metasyssoftware.com">Metasys Software Pvt Ltd.</a>.]]></description>
										<content:encoded><![CDATA[<p><strong>History</strong></p>
<p>Like many others, we have been working on MVC 5 based web applications since 2013. With Microsoft planning significant investment into the open-source development platform .Net core, we saw the advantage of migrating our current applications to the new platform sooner rather than later.<br />
The first version of .Net Core 1.0 was released by Microsoft in 2014, followed by several versions, most recently .Net 3.1.1 in January 2020. At the time that we started the migration in 2019, we found .Net 2.2 to be a stable version with a well-developed community advanced enough to answer our queries. The web application that we decided to convert to .Net Core was developed in 2017 on the .Net 4.5.1 MVC platform.</p>
<p><strong>Initial considerations</strong><br />
Evaluating the conversion risk is an essential first step before convincing the client to invest in the new technology. Several factors need to be considered, including the project timeline, the scale of the project and the available resources. Using a team that has worked with the technology for at least a year or two is the best option for reducing risk in such a conversion project. A great option is using interns as an additional resource, as the project provides them with the excitement of learning something new.</p>
<p><strong>HOW to start?</strong><br />
The first step is to check the old application with the tool called NET Portability Analyzer Tool. This tool analyzes assemblies and provides a detailed report on the .Net APIs that are missing for the applications or libraries to be portable on .Net Core. It is not a tool which will automatically convert the .NET MVC app to a .NET Core, but it is a useful initial guide towards identifying the portable and non-portable items.<br />
The tool details are available on the Microsoft website:<br />
https://docs.microsoft.com/en-us/dotnet/standard/analyzers/portability-analyzer<br />
The tool can be downloaded using the link: https://marketplace.visualstudio.com/items?itemName=ConnieYau.NETPortabilityAnalyzer</p>
<p>The screenshots below show some of the tool outputs:<br />
<strong>Portability Summary</strong></p>
<p><img fetchpriority="high" decoding="async" class="alignnone wp-image-2998 size-full" title="Portability summary" src="https://www.metasyssoftware.com/wp-content/uploads/Portability-summary-image-1.jpg" alt="Portability summary" width="975" height="254" /></p>
<p><strong>Details</strong></p>
<p><img decoding="async" class="alignnone wp-image-2999 size-full" title="Details image" src="https://www.metasyssoftware.com/wp-content/uploads/details-image-2.jpg" alt="Details image " width="975" height="206" /></p>
<p><strong>Missing Assemblies</strong></p>
<p><img decoding="async" class="alignnone wp-image-3000 size-full" title="Missing assemblies" src="https://www.metasyssoftware.com/wp-content/uploads/Missing-assemblies-3.jpg" alt="Missing assemblies " width="975" height="328" /></p>
<p><strong>Creating the new project</strong><br />
It is not useful to open the entire MVC project as a .Net Core project immediately in Visual Studio (VS) 2017, as it will result in a huge list of errors that are difficult to address one by one. A better approach is to create an empty project and copy a few models, controllers, views or corresponding files at a time into the newly created .Net Core project in the VS 2017 environment. After each addition, build the project, analyze and fix the errors.<br />
What were my next steps? Let me give you some technical bullets here.<br />
One of the important steps is to move the connection strings settings from Web.Config to JSON settings in the file named as AppSettings.JSON .<br />
It is necessary to add a middle layer file for the session and call it in the StartUp.cs file. so that all the session objects set on the Global. asax file that do not exist on the .Net Core project will go into the middle layer file and register as a service in StartUp.cs. The Session dependency is included by adding AddSession into ConfigureServices of StartUp.cs<br />
Convert all of your class libraries created separately to .Net standard Class Libraries wherever required by creating a .NET Standard Project and add the references wherever required for the new .NET Core Web App project you have created.<br />
All static files like Images, icons, CSS, JS, email templates need to be copied into WWWRoot. The file locations have to be changed across the project wherever they are referenced.<br />
The Route.config file should be replaced by adding the MapRoute in the StartUp.cs file.<br />
We can create Set and Get extension functions Like SetObject and GetObject for handling session operations as shown below</p>
<p><img loading="lazy" decoding="async" class="alignnone wp-image-3001 size-full" title="set object and get object" src="https://www.metasyssoftware.com/wp-content/uploads/set-object-and-get-object-image-4.png" alt="set object and get object" width="823" height="277" /></p>
<p>We have two parts in our project Web App and Web API so we have to add the DI (Dependency Injection) for calling WebAPIClient and HostingEnvironment (IWebAPIClient webapiclient, IHostingEnvironment env)</p>
<p><strong>What can be done on SSL redirection?</strong><br />
We have to add following setting in AppSettings.json file</p>
<p><img loading="lazy" decoding="async" class="alignnone wp-image-3002 size-full" title="image" src="https://www.metasyssoftware.com/wp-content/uploads/app-setting-image-5.jpg" alt="image" width="334" height="63" /></p>
<p>Also we have to add following code in Startup.cs</p>
<p><img loading="lazy" decoding="async" class="alignnone wp-image-3003 size-full" title="startup cs" src="https://www.metasyssoftware.com/wp-content/uploads/startup-cs-6.jpg" alt="startup cs" width="463" height="111" /></p>
<p>Third party Dlls<br />
Every project has some third party Dlls used in the project for a specific purpose. For our application, the third party Dlls like EPPlus, ICSharpCode.SharpZipLib library worked on the .NET Core project without any issues. However, it is possible that certain third party tool kits are not compatible with .NET Core. Some can be downloaded from NuGet or by contacting a third party vendor.<br />
There may be instances where third party assemblies used in the project do not work and cannot be bought from third party vendors. In this case, I would recommend finding a solution that omits the tool altogether. It pays to think of this early whilst updating any web app that might be migrated in the future. This way incompatible third party Dlls can be avoided in favor of compatible tools, in order to save work at the migration stage. One such example is Nreco PDF to Image renderer, which has a version that is compatible with .Net Core available from a third party vendor.</p>
<p>The technical points in this article refer to architectural changes, I will cover the common conversion issues and deployment in the next article so stay tuned…</p>
<p>For more details regarding the kind of ASP web application projects which we handle https://www.metasyssoftware.com/case-study-dotnet</p>The post <a href="https://www.metasyssoftware.com/dot-net/converting-an-mvc-web-app-to-net-core-web-app/">Converting an MVC web APP to .Net Core Web App</a> appeared first on <a href="https://www.metasyssoftware.com">Metasys Software Pvt Ltd.</a>.]]></content:encoded>
					
					<wfw:commentRss>https://www.metasyssoftware.com/dot-net/converting-an-mvc-web-app-to-net-core-web-app/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
	</channel>
</rss>
