Click here to Skip to main content
15,882,705 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more: , +
I have deployed the application in IIS Version 10 of Windows server 2019
the session is getting null when the page is redirected to another page from login. In Windows 11 IIS it's working fine

here is my Web.config code

	For more information on how to configure your ASP.NET application, please visit
	http://go.microsoft.com/fwlink/?LinkId=169433
	-->
<configuration>
	<configSections>
		<sectionGroup name="devExpress">
			<section name="themes" type="DevExpress.Web.ThemesConfigurationSection, DevExpress.Web.v18.2, Version=18.2.18.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a" requirePermission="false"/>
			<section name="compression" type="DevExpress.Web.CompressionConfigurationSection, DevExpress.Web.v18.2, Version=18.2.18.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a" requirePermission="false"/>
			<section name="settings" type="DevExpress.Web.SettingsConfigurationSection, DevExpress.Web.v18.2, Version=18.2.18.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a" requirePermission="false"/>
			<section name="errors" type="DevExpress.Web.ErrorsConfigurationSection, DevExpress.Web.v18.2, Version=18.2.18.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a" requirePermission="false"/>
			<section name="resources" type="DevExpress.Web.ResourcesConfigurationSection, DevExpress.Web.v18.2, Version=18.2.18.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a" requirePermission="false"/>
		</sectionGroup>
	</configSections>
	<appSettings>
		<add key="ValidationSettings:UnobtrusiveValidationMode" value="None"/>
		
	</appSettings>
	<connectionStrings>
		
		<add name="ConnectionString1" connectionString="Data Source=10.3.9.19;Initial Catalog=interglo;User ID=InterUser; Password=Inter!@#" providerName="System.Data.SqlClient"/>
	</connectionStrings>
	 <system.web>
 		<webServices>
			<protocols>
				<add name="HttpGet"/>
			</protocols>
		</webServices>
		<compilation debug="true" targetFramework="4.6.1">
			<assemblies>
				<add assembly="DevExpress.Web.v18.2, Version=18.2.18.0, Culture=neutral, PublicKeyToken=B88D1754D700E49A"/>
		 		 </assemblies>
		</compilation>
	  <httpRuntime targetFramework="4.6.1" />
    <sessionState mode="InProc" timeout="60"></sessionState>
		<customErrors mode="RemoteOnly" defaultRedirect="CustomError.aspx"/>
		<httpModules>
			<add type="DevExpress.Web.ASPxHttpHandlerModule, DevExpress.Web.v18.2, Version=18.2.18.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a" name="ASPxHttpHandlerModule"/>
		</httpModules>
		<httpHandlers>
			<add type="DevExpress.Web.ASPxHttpHandlerModule, DevExpress.Web.v18.2, Version=18.2.18.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a" verb="GET,POST" path="DX.ashx" validate="false"/>
			<add type="DevExpress.Web.ASPxUploadProgressHttpHandler, DevExpress.Web.v18.2, Version=18.2.18.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a" verb="GET,POST" path="ASPxUploadProgressHandlerPage.ashx" validate="false"/>
			<add validate="false" verb="GET,POST" path="DXXCD.axd" type="DevExpress.Web.ASPxHttpHandlerModule, DevExpress.Web.v18.2, Version=18.2.18.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a"/>
		</httpHandlers>
		<siteMap defaultProvider="MainSiteMap">
			<providers>
				<add name="Main" type="System.Web.XmlSiteMapProvider" siteMapFile="Web.sitemap"/>
				<add name="SiteMap" type="System.Web.XmlSiteMapProvider" siteMapFile="PM.sitemap"/>
				<add name="SiteMap" type="System.Web.XmlSiteMapProvider" siteMapFile="IRB.sitemap"/>
			</providers>
		</siteMap>
	</system.web>
	<system.codedom>
		<compilers>
			<compiler language="c#;cs;csharp" extension=".cs" type="Microsoft.CodeDom.Providers.DotNetCompilerPlatform.CSharpCodeProvider, Microsoft.CodeDom.Providers.DotNetCompilerPlatform, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" warningLevel="4" compilerOptions="/langversion:6 /nowarn:1659;1699;1701"/>
			<compiler language="vb;vbs;visualbasic;vbscript" extension=".vb" type="Microsoft.CodeDom.Providers.DotNetCompilerPlatform.VBCodeProvider, Microsoft.CodeDom.Providers.DotNetCompilerPlatform, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" warningLevel="4" compilerOptions="/langversion:14 /nowarn:41008 /define:_MYTYPE=\"Web\" /optionInfer+"/>
		</compilers>
	</system.codedom>
	<system.webServer>
		<modules>
			<add type="DevExpress.Web.ASPxHttpHandlerModule, DevExpress.Web.v18.2, Version=18.2.18.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a" name="ASPxHttpHandlerModule"/>
		</modules>
		<validation validateIntegratedModeConfiguration="false"/>
		<handlers>
			<add type="DevExpress.Web.ASPxHttpHandlerModule, DevExpress.Web.v18.2, Version=18.2.18.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a" verb="GET,POST" path="DX.ashx" name="ASPxHttpHandlerModule" preCondition="integratedMode"/>
			<add type="DevExpress.Web.ASPxUploadProgressHttpHandler, DevExpress.Web.v18.2, Version=18.2.18.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a" verb="GET,POST" path="ASPxUploadProgressHandlerPage.ashx" name="ASPxUploadProgressHandler" preCondition="integratedMode"/>
			<add name="ASPxChartDesignerHandlerModule" preCondition="integratedMode" verb="GET,POST" path="DXXCD.axd" type="DevExpress.Web.ASPxHttpHandlerModule, DevExpress.Web.v18.2, Version=18.2.18.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a"/>
		</handlers>
	</system.webServer>
	<devExpress>
		<themes enableThemesAssembly="true" styleSheetTheme="" theme="" customThemeAssemblies="" baseColor="" font=""/>
		<compression enableHtmlCompression="false" enableCallbackCompression="true" enableResourceCompression="true" enableResourceMerging="true"/>
		<settings accessibilityCompliant="false" doctypeMode="Html5" rightToLeft="false" embedRequiredClientLibraries="false" checkReferencesToExternalScripts="false" ieCompatibilityVersion="edge" bootstrapMode="" protectControlState="true"/>
		<errors callbackErrorRedirectUrl=""/>
	</devExpress>
</configuration>


What I have tried:

https://serverfault.com/questions/596782/incorrect-asp-net-session-data-returned-intermittently[^]

https://stackoverflow.com/questions/3515947/losing-session-state[^]
Posted
Updated 28-May-23 2:30am
v2

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900