<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0">
  <channel>
    <title>CodeProject Latest postings for ASP.NET</title>
    <link>https://www.codeproject.com</link>
    <description>Latest postings for ASP.NET from CodeProject</description>
    <language>en-us</language>
    <image>
      <title>CodeProject Latest postings for ASP.NET</title>
      <url>https://www.codeproject.com/App_Themes/Std/Img/logo100x30.gif</url>
      <link>https://www.codeproject.com</link>
      <width>100</width>
      <height>30</height>
      <description>CodeProject</description>
    </image>
    <copyright>Copyright  CodeProject, 1999-2024</copyright>
    <webMaster>Webmaster@codeproject.com (Webmaster)</webMaster>
    <lastBuildDate>Tue, 16 Jul 2024 13:56:00 GMT</lastBuildDate>
    <ttl>20</ttl>
    <generator>C# Hand-coded goodness</generator>
    <item>
      <title>HOW TO ANSWER A QUESTION</title>
      <description>Apologies for the shouting but this is important.&lt;br /&gt;
&lt;br /&gt;
When answering a question please:&lt;br /&gt;
&lt;ol&gt;&lt;li&gt;Read the question carefully&lt;br /&gt;
&lt;/li&gt;&lt;li&gt;Understand that English isn't everyone's first language so be lenient of bad spelling and grammar&lt;br /&gt;
&lt;/li&gt;&lt;li&gt;If a question is poorly phrased then either ask for clarification, ignore it, or mark it down. &lt;b&gt;Insults are not welcome&lt;/b&gt;&lt;br /&gt;
&lt;/li&gt;&lt;li&gt;If the question is inappropriate then click the 'vote to remove message' button&lt;br /&gt;
&lt;/li&gt;&lt;/ol&gt;&lt;br /&gt;
Insults, slap-downs and sarcasm aren't welcome. Let's work to help developers, not make them feel stupid. &lt;br /&gt;
&lt;br /&gt;
&lt;div class="ForumSig"&gt;cheers,&lt;br /&gt;
Chris Maunder&lt;br /&gt;
&lt;br /&gt;
The Code Project Co-founder&lt;br /&gt;
Microsoft C++ MVP&lt;/div&gt;</description>
      <author>Chris Maunder</author>
      <link>https://www.codeproject.com/Messages/3117208/HOW-TO-ANSWER-A-QUESTION</link>
      <pubDate>Mon, 13 Jul 2009 08:39:00 GMT</pubDate>
      <guid>3_3117208</guid>
      <subject>ASP.NET</subject>
    </item>
    <item>
      <title>Api call connection resets</title>
      <description>Hello, &lt;br /&gt;
&lt;br /&gt;
In an ASP .Net Core 8 API, we have an issue with the processing of a call that lasts longer than 2 minutes.&lt;br /&gt;
It lasts long because we have to parse a ton of files (call can be 5-6 minutes), we know this should be improved, but that's beside the point here.&lt;br /&gt;
&lt;br /&gt;
In a previous version of this API (.Net Framework 4.8), this call used to last just as long, and the API did not reset the connection.&lt;br /&gt;
&lt;br /&gt;
In the .Net 8 version, we get such a message :&lt;br /&gt;
&lt;br /&gt;
Connection id "xxx" reset. &lt;br /&gt;
Connection id "xxx" sending FIN because: "The Socket transport's send loop completed gracefully."&lt;br /&gt;
Connection id "xxx" disconnecting. &lt;br /&gt;
&lt;br /&gt;
After some googling and copilot'ing, we found that this seems related to Kestrel configuration, so we tried several things:&lt;br /&gt;
&lt;br /&gt;
- serverOptions.Limits.KeepAliveTimeout = TimeSpan.FromMinutes(5);&lt;br /&gt;
- Changed a few parameters related to timeouts in IIS&lt;br /&gt;
- Changed the timeout parameter from the client app calling the API&lt;br /&gt;
&lt;br /&gt;
.. but nothing works.&lt;br /&gt;
&lt;br /&gt;
Does anyone have experience with this ?&lt;br /&gt;
&lt;br /&gt;
It's clear that the timeout duration has to be adjusted somewhere, but we have no idea where to look.&lt;br /&gt;
&lt;br /&gt;
Thanks in advance &lt;img src="https://www.codeproject.com/script/Forums/Images/smiley_smile.gif" align="top" alt="Smile | :)" /&gt;</description>
      <author>Fred2834</author>
      <link>https://www.codeproject.com/Messages/6010099/Api-call-connection-resets</link>
      <pubDate>Tue, 16 Jul 2024 13:56:00 GMT</pubDate>
      <guid>3_6010099</guid>
      <subject>ASP.NET</subject>
    </item>
    <item>
      <title>Do ASP.net MVC5 apps require Full trust on IIS10?</title>
      <description>I have an ASP.net MVC5 app publish on a host provider.&lt;br /&gt;
CAS trust level is FULL and app runs fine.&lt;br /&gt;
&lt;br /&gt;
I want to move the app to another host but they only sport CAS Trust level High and below.&lt;br /&gt;
&lt;br /&gt;
I found this reference earlier:&lt;br /&gt;
&lt;br /&gt;
"ASP.NET MVC 5 does not support running in anything other than full trust. Microsoft have provided guidance for hosters to move away from using CAS trust levels and use proper OS-level isolation instead."&lt;br /&gt;
&lt;br /&gt;
and forwarded it to the new provider.&lt;br /&gt;
They responded that they are running IIS10 and Windows Server 2019 and the statement above does not apply.&lt;br /&gt;
&lt;br /&gt;
Could someone please answer definitively as to whether ASP.Net MVS5 apps require FULL Trust level on IIS10/Server 2019? Current link to source would be appreciated.</description>
      <author>Jean Vallee</author>
      <link>https://www.codeproject.com/Messages/6008990/Do-ASP-net-MVC5-apps-require-Full-trust-on-IIS10</link>
      <pubDate>Mon, 08 Jul 2024 14:40:00 GMT</pubDate>
      <guid>3_6008990</guid>
      <subject>ASP.NET</subject>
    </item>
    <item>
      <title>Change Code Access Security Level on Plesk</title>
      <description>I built a simple 1 page site with Visual Studio 2022 using asp.net. It has a few buttons that display some images and 2 links to a subdomain. No additional modules were used... just published with straight VS.&lt;br /&gt;
&lt;br /&gt;
The host I am using has the CAS trust level default as FULL and it works successfully if I leave it that way. &lt;br /&gt;
&lt;br /&gt;
Now I want to change hosts and the new host does not support a FULL CAS Trust Level, only HIGH.&lt;br /&gt;
&lt;br /&gt;
This is my web.config:&lt;br /&gt;
&lt;br /&gt;
&lt;div class='pre-lang' id='premain970790'&gt;&lt;div&gt;&lt;/div&gt;&lt;div class='pre-action-link'&gt;&lt;span id='copycode970790' class='copy-code' data-index='970790' style='visibility:hidden'&gt;&lt;svg xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' version='1.1' viewBox='0 0 460 460' style='width: 16px;height:16px;' xml:space='preserve'&gt;&lt;g&gt;&lt;path d='M425.934,0H171.662c-18.122,0-32.864,14.743-32.864,32.864v77.134h30V32.864c0-1.579,1.285-2.864,2.864-2.864h254.272     c1.579,0,2.864,1.285,2.864,2.864v254.272c0,1.58-1.285,2.865-2.864,2.865h-74.729v30h74.729 c18.121,0,32.864-14.743,32.864-32.865V32.864C458.797,14.743,444.055,0,425.934,0z'&gt;&lt;/path&gt;&lt;path d='M288.339,139.998H34.068c-18.122,0-32.865,14.743-32.865,32.865v254.272C1.204,445.257,15.946,460,34.068,460h254.272 c18.122,0,32.865-14.743,32.865-32.864V172.863C321.206,154.741,306.461,139.998,288.339,139.998z M288.341,430H34.068    c-1.58,0-2.865-1.285-2.865-2.864V172.863c0-1.58,1.285-2.865,2.865-2.865h254.272c1.58,0,2.865,1.285,2.865,2.865v254.273h0.001 C291.206,428.715,289.92,430,288.341,430z'&gt;&lt;/path&gt;&lt;/g&gt;&lt;/svg&gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;
&lt;pre id='pre970790' style='margin-top:0;' data-allowShrink='True' data-collapse='False'&gt;
&amp;lt;?xml version=&lt;span class="code-string"&gt;"&lt;/span&gt;&lt;span class="code-string"&gt;1.0"&lt;/span&gt; encoding=&lt;span class="code-string"&gt;"&lt;/span&gt;&lt;span class="code-string"&gt;utf-8"&lt;/span&gt;?&amp;gt;
&amp;lt;!--
  For more information on how to configure your ASP.NET application, please visit
  https:&lt;span class="code-comment"&gt;//&lt;/span&gt;&lt;span class="code-comment"&gt;go.microsoft.com/fwlink/?LinkId=301880&lt;/span&gt;
  --&amp;gt;
&amp;lt;configuration&amp;gt;
  &amp;lt;appSettings&amp;gt;
    &amp;lt;add key=&lt;span class="code-string"&gt;"&lt;/span&gt;&lt;span class="code-string"&gt;webpages:Version"&lt;/span&gt; &lt;span class="code-sdkkeyword"&gt;value&lt;/span&gt;=&lt;span class="code-string"&gt;"&lt;/span&gt;&lt;span class="code-string"&gt;3.0.0.0"&lt;/span&gt; /&amp;gt;
    &amp;lt;add key=&lt;span class="code-string"&gt;"&lt;/span&gt;&lt;span class="code-string"&gt;webpages:Enabled"&lt;/span&gt; &lt;span class="code-sdkkeyword"&gt;value&lt;/span&gt;=&lt;span class="code-string"&gt;"&lt;/span&gt;&lt;span class="code-string"&gt;false"&lt;/span&gt; /&amp;gt;
    &amp;lt;add key=&lt;span class="code-string"&gt;"&lt;/span&gt;&lt;span class="code-string"&gt;ClientValidationEnabled"&lt;/span&gt; &lt;span class="code-sdkkeyword"&gt;value&lt;/span&gt;=&lt;span class="code-string"&gt;"&lt;/span&gt;&lt;span class="code-string"&gt;true"&lt;/span&gt; /&amp;gt;
    &amp;lt;add key=&lt;span class="code-string"&gt;"&lt;/span&gt;&lt;span class="code-string"&gt;UnobtrusiveJavaScriptEnabled"&lt;/span&gt; &lt;span class="code-sdkkeyword"&gt;value&lt;/span&gt;=&lt;span class="code-string"&gt;"&lt;/span&gt;&lt;span class="code-string"&gt;true"&lt;/span&gt; /&amp;gt;
  &lt;span class="code-keyword"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="code-leadattribute"&gt;appSettings&lt;/span&gt;&lt;span class="code-keyword"&gt;&amp;gt;&lt;/span&gt;
  &amp;lt;system.web&amp;gt;
    &amp;lt;customErrors mode=&lt;span class="code-string"&gt;"&lt;/span&gt;&lt;span class="code-string"&gt;Off"&lt;/span&gt; /&amp;gt;
    &amp;lt;compilation targetFramework=&lt;span class="code-string"&gt;"&lt;/span&gt;&lt;span class="code-string"&gt;4.8"&lt;/span&gt; tempDirectory=&lt;span class="code-string"&gt;"&lt;/span&gt;&lt;span class="code-string"&gt;D:\InetPub\vhosts\permitlvonline.com\tmp"&lt;/span&gt; /&amp;gt;
    &amp;lt;httpRuntime targetFramework=&lt;span class="code-string"&gt;"&lt;/span&gt;&lt;span class="code-string"&gt;4.8"&lt;/span&gt; /&amp;gt;
    &amp;lt;securityPolicy&amp;gt;
      &amp;lt;trustLevel name=&lt;span class="code-string"&gt;"&lt;/span&gt;&lt;span class="code-string"&gt;Full"&lt;/span&gt; policyFile=&lt;span class="code-string"&gt;"&lt;/span&gt;&lt;span class="code-string"&gt;internal"&lt;/span&gt; /&amp;gt;
      &amp;lt;trustLevel name=&lt;span class="code-string"&gt;"&lt;/span&gt;&lt;span class="code-string"&gt;High"&lt;/span&gt; policyFile=&lt;span class="code-string"&gt;"&lt;/span&gt;&lt;span class="code-string"&gt;web_hightrust.config"&lt;/span&gt; /&amp;gt;
      &amp;lt;trustLevel name=&lt;span class="code-string"&gt;"&lt;/span&gt;&lt;span class="code-string"&gt;Medium"&lt;/span&gt; policyFile=&lt;span class="code-string"&gt;"&lt;/span&gt;&lt;span class="code-string"&gt;web_mediumtrust.config"&lt;/span&gt; /&amp;gt;
      &amp;lt;trustLevel name=&lt;span class="code-string"&gt;"&lt;/span&gt;&lt;span class="code-string"&gt;Low"&lt;/span&gt; policyFile=&lt;span class="code-string"&gt;"&lt;/span&gt;&lt;span class="code-string"&gt;web_lowtrust.config"&lt;/span&gt; /&amp;gt;
      &amp;lt;trustLevel name=&lt;span class="code-string"&gt;"&lt;/span&gt;&lt;span class="code-string"&gt;Minimal"&lt;/span&gt; policyFile=&lt;span class="code-string"&gt;"&lt;/span&gt;&lt;span class="code-string"&gt;web_minimaltrust.config"&lt;/span&gt; /&amp;gt;
    &lt;span class="code-keyword"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="code-leadattribute"&gt;securityPolicy&lt;/span&gt;&lt;span class="code-keyword"&gt;&amp;gt;&lt;/span&gt;
    &amp;lt;trust level=&lt;span class="code-string"&gt;"&lt;/span&gt;&lt;span class="code-string"&gt;High"&lt;/span&gt; /&amp;gt;
  &lt;span class="code-keyword"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="code-leadattribute"&gt;system.web&lt;/span&gt;&lt;span class="code-keyword"&gt;&amp;gt;&lt;/span&gt;
  &amp;lt;runtime&amp;gt;
    &amp;lt;assemblyBinding xmlns=&lt;span class="code-string"&gt;"&lt;/span&gt;&lt;span class="code-string"&gt;urn:schemas-microsoft-com:asm.v1"&lt;/span&gt;&amp;gt;
      &amp;lt;dependentAssembly&amp;gt;
        &amp;lt;assemblyIdentity name=&lt;span class="code-string"&gt;"&lt;/span&gt;&lt;span class="code-string"&gt;Antlr3.Runtime"&lt;/span&gt; publicKeyToken=&lt;span class="code-string"&gt;"&lt;/span&gt;&lt;span class="code-string"&gt;eb42632606e9261f"&lt;/span&gt; /&amp;gt;
        &amp;lt;bindingRedirect oldVersion=&lt;span class="code-string"&gt;"&lt;/span&gt;&lt;span class="code-string"&gt;0.0.0.0-3.5.0.2"&lt;/span&gt; newVersion=&lt;span class="code-string"&gt;"&lt;/span&gt;&lt;span class="code-string"&gt;3.5.0.2"&lt;/span&gt; /&amp;gt;
      &lt;span class="code-keyword"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="code-leadattribute"&gt;dependentAssembly&lt;/span&gt;&lt;span class="code-keyword"&gt;&amp;gt;&lt;/span&gt;
      &amp;lt;dependentAssembly&amp;gt;
        &amp;lt;assemblyIdentity name=&lt;span class="code-string"&gt;"&lt;/span&gt;&lt;span class="code-string"&gt;Newtonsoft.Json"&lt;/span&gt; publicKeyToken=&lt;span class="code-string"&gt;"&lt;/span&gt;&lt;span class="code-string"&gt;30ad4fe6b2a6aeed"&lt;/span&gt; /&amp;gt;
        &amp;lt;bindingRedirect oldVersion=&lt;span class="code-string"&gt;"&lt;/span&gt;&lt;span class="code-string"&gt;0.0.0.0-12.0.0.0"&lt;/span&gt; newVersion=&lt;span class="code-string"&gt;"&lt;/span&gt;&lt;span class="code-string"&gt;12.0.0.0"&lt;/span&gt; /&amp;gt;
      &lt;span class="code-keyword"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="code-leadattribute"&gt;dependentAssembly&lt;/span&gt;&lt;span class="code-keyword"&gt;&amp;gt;&lt;/span&gt;
      &amp;lt;dependentAssembly&amp;gt;
        &amp;lt;assemblyIdentity name=&lt;span class="code-string"&gt;"&lt;/span&gt;&lt;span class="code-string"&gt;System.Web.Optimization"&lt;/span&gt; publicKeyToken=&lt;span class="code-string"&gt;"&lt;/span&gt;&lt;span class="code-string"&gt;31bf3856ad364e35"&lt;/span&gt; /&amp;gt;
        &amp;lt;bindingRedirect oldVersion=&lt;span class="code-string"&gt;"&lt;/span&gt;&lt;span class="code-string"&gt;1.0.0.0-1.1.0.0"&lt;/span&gt; newVersion=&lt;span class="code-string"&gt;"&lt;/span&gt;&lt;span class="code-string"&gt;1.1.0.0"&lt;/span&gt; /&amp;gt;
      &lt;span class="code-keyword"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="code-leadattribute"&gt;dependentAssembly&lt;/span&gt;&lt;span class="code-keyword"&gt;&amp;gt;&lt;/span&gt;
      &amp;lt;dependentAssembly&amp;gt;
        &amp;lt;assemblyIdentity name=&lt;span class="code-string"&gt;"&lt;/span&gt;&lt;span class="code-string"&gt;WebGrease"&lt;/span&gt; publicKeyToken=&lt;span class="code-string"&gt;"&lt;/span&gt;&lt;span class="code-string"&gt;31bf3856ad364e35"&lt;/span&gt; /&amp;gt;
        &amp;lt;bindingRedirect oldVersion=&lt;span class="code-string"&gt;"&lt;/span&gt;&lt;span class="code-string"&gt;0.0.0.0-1.6.5135.21930"&lt;/span&gt; newVersion=&lt;span class="code-string"&gt;"&lt;/span&gt;&lt;span class="code-string"&gt;1.6.5135.21930"&lt;/span&gt; /&amp;gt;
      &lt;span class="code-keyword"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="code-leadattribute"&gt;dependentAssembly&lt;/span&gt;&lt;span class="code-keyword"&gt;&amp;gt;&lt;/span&gt;
      &amp;lt;dependentAssembly&amp;gt;
        &amp;lt;assemblyIdentity name=&lt;span class="code-string"&gt;"&lt;/span&gt;&lt;span class="code-string"&gt;System.Web.Helpers"&lt;/span&gt; publicKeyToken=&lt;span class="code-string"&gt;"&lt;/span&gt;&lt;span class="code-string"&gt;31bf3856ad364e35"&lt;/span&gt; /&amp;gt;
        &amp;lt;bindingRedirect oldVersion=&lt;span class="code-string"&gt;"&lt;/span&gt;&lt;span class="code-string"&gt;1.0.0.0-3.0.0.0"&lt;/span&gt; newVersion=&lt;span class="code-string"&gt;"&lt;/span&gt;&lt;span class="code-string"&gt;3.0.0.0"&lt;/span&gt; /&amp;gt;
      &lt;span class="code-keyword"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="code-leadattribute"&gt;dependentAssembly&lt;/span&gt;&lt;span class="code-keyword"&gt;&amp;gt;&lt;/span&gt;
      &amp;lt;dependentAssembly&amp;gt;
        &amp;lt;assemblyIdentity name=&lt;span class="code-string"&gt;"&lt;/span&gt;&lt;span class="code-string"&gt;System.Web.WebPages"&lt;/span&gt; publicKeyToken=&lt;span class="code-string"&gt;"&lt;/span&gt;&lt;span class="code-string"&gt;31bf3856ad364e35"&lt;/span&gt; /&amp;gt;
        &amp;lt;bindingRedirect oldVersion=&lt;span class="code-string"&gt;"&lt;/span&gt;&lt;span class="code-string"&gt;1.0.0.0-3.0.0.0"&lt;/span&gt; newVersion=&lt;span class="code-string"&gt;"&lt;/span&gt;&lt;span class="code-string"&gt;3.0.0.0"&lt;/span&gt; /&amp;gt;
      &lt;span class="code-keyword"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="code-leadattribute"&gt;dependentAssembly&lt;/span&gt;&lt;span class="code-keyword"&gt;&amp;gt;&lt;/span&gt;
      &amp;lt;dependentAssembly&amp;gt;
        &amp;lt;assemblyIdentity name=&lt;span class="code-string"&gt;"&lt;/span&gt;&lt;span class="code-string"&gt;System.Web.Mvc"&lt;/span&gt; publicKeyToken=&lt;span class="code-string"&gt;"&lt;/span&gt;&lt;span class="code-string"&gt;31bf3856ad364e35"&lt;/span&gt; /&amp;gt;
        &amp;lt;bindingRedirect oldVersion=&lt;span class="code-string"&gt;"&lt;/span&gt;&lt;span class="code-string"&gt;1.0.0.0-5.2.7.0"&lt;/span&gt; newVersion=&lt;span class="code-string"&gt;"&lt;/span&gt;&lt;span class="code-string"&gt;5.2.7.0"&lt;/span&gt; /&amp;gt;
      &lt;span class="code-keyword"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="code-leadattribute"&gt;dependentAssembly&lt;/span&gt;&lt;span class="code-keyword"&gt;&amp;gt;&lt;/span&gt;
    &lt;span class="code-keyword"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="code-leadattribute"&gt;assemblyBinding&lt;/span&gt;&lt;span class="code-keyword"&gt;&amp;gt;&lt;/span&gt;
  &lt;span class="code-keyword"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="code-leadattribute"&gt;runtime&lt;/span&gt;&lt;span class="code-keyword"&gt;&amp;gt;&lt;/span&gt;
  &amp;lt;system.codedom&amp;gt;
  &lt;span class="code-keyword"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="code-leadattribute"&gt;system.codedom&lt;/span&gt;&lt;span class="code-keyword"&gt;&amp;gt;&lt;/span&gt;
&lt;span class="code-keyword"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="code-leadattribute"&gt;configuration&lt;/span&gt;&lt;span class="code-keyword"&gt;&amp;gt;&lt;/span&gt;
&amp;lt;!--ProjectGuid: 341B6D57-1384-4224-8AC6-C7F85BF0A4E3--&amp;gt;&lt;/pre&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;div class='pre-lang' id='premain141602'&gt;&lt;div&gt;&lt;/div&gt;&lt;div class='pre-action-link'&gt;&lt;span id='copycode141602' class='copy-code' data-index='141602' style='visibility:hidden'&gt;&lt;svg xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' version='1.1' viewBox='0 0 460 460' style='width: 16px;height:16px;' xml:space='preserve'&gt;&lt;g&gt;&lt;path d='M425.934,0H171.662c-18.122,0-32.864,14.743-32.864,32.864v77.134h30V32.864c0-1.579,1.285-2.864,2.864-2.864h254.272     c1.579,0,2.864,1.285,2.864,2.864v254.272c0,1.58-1.285,2.865-2.864,2.865h-74.729v30h74.729 c18.121,0,32.864-14.743,32.864-32.865V32.864C458.797,14.743,444.055,0,425.934,0z'&gt;&lt;/path&gt;&lt;path d='M288.339,139.998H34.068c-18.122,0-32.865,14.743-32.865,32.865v254.272C1.204,445.257,15.946,460,34.068,460h254.272 c18.122,0,32.865-14.743,32.865-32.864V172.863C321.206,154.741,306.461,139.998,288.339,139.998z M288.341,430H34.068    c-1.58,0-2.865-1.285-2.865-2.864V172.863c0-1.58,1.285-2.865,2.865-2.865h254.272c1.58,0,2.865,1.285,2.865,2.865v254.273h0.001 C291.206,428.715,289.92,430,288.341,430z'&gt;&lt;/path&gt;&lt;/g&gt;&lt;/svg&gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;
&lt;pre id='pre141602' style='margin-top:0;' data-allowShrink='True' data-collapse='False'&gt;
I placed the web_hightrust.config file &lt;span class="code-keyword"&gt;in&lt;/span&gt; the same folder &lt;span class="code-keyword"&gt;as&lt;/span&gt; web.config.

This &lt;span class="code-keyword"&gt;is&lt;/span&gt; the error message generated &lt;span class="code-sdkkeyword"&gt;when&lt;/span&gt; I &lt;span class="code-keyword"&gt;set&lt;/span&gt; CAS trust level to High. (instead of Full)

[SecurityException: Request &lt;span class="code-keyword"&gt;for&lt;/span&gt; the permission of type &lt;span class="code-string"&gt;&amp;#39;&lt;/span&gt;&lt;span class="code-string"&gt;System.Security.Permissions.SecurityPermission, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089&amp;#39;&lt;/span&gt; failed.]
   System.Security.CodeAccessSecurityEngine.Check(&lt;span class="code-sdkkeyword"&gt;Object&lt;/span&gt; demand, StackCrawlMark&amp;amp; stackMark, &lt;span class="code-sdkkeyword"&gt;Boolean&lt;/span&gt; isPermSet) +0
   System.Security.CodeAccessPermission.Demand() +57
   System.Web.HttpContext.System.IServiceProvider.GetService(Type service) +79
   System.Web.WebPages.UrlRewriterHelper.IsUrlRewriterTurnedOn(HttpContextBase httpContext) +128
   System.Web.WebPages.UrlRewriterHelper.WasRequestRewritten(HttpContextBase httpContext) +16
   System.Web.WebPages.UrlUtil.GenerateClientUrlInternal(HttpContextBase httpContext, &lt;span class="code-sdkkeyword"&gt;String&lt;/span&gt; contentPath) +167
   System.Web.WebPages.UrlUtil.GenerateClientUrlInternal(HttpContextBase httpContext, &lt;span class="code-sdkkeyword"&gt;String&lt;/span&gt; contentPath) +113
   System.Web.WebPages.UrlUtil.GenerateClientUrl(HttpContextBase httpContext, &lt;span class="code-sdkkeyword"&gt;String&lt;/span&gt; basePath, &lt;span class="code-sdkkeyword"&gt;String&lt;/span&gt; path, Object[] pathParts) +150
   ASP._Page_Views_Shared__Layout_cshtml.Execute() +620
   System.Web.WebPages.WebPageBase.ExecutePageHierarchy() +252
   System.Web.Mvc.WebViewPage.ExecutePageHierarchy() +148
   System.Web.WebPages.WebPageBase.ExecutePageHierarchy(WebPageContext pageContext, TextWriter writer, WebPageRenderingBase startPage) +122
   System.Web.WebPages.&amp;lt;&amp;gt;c__DisplayClass40_0.&amp;lt;RenderPageCore&amp;gt;b__0(TextWriter writer) +309
   System.Web.WebPages.HelperResult.WriteTo(TextWriter writer) +18
   System.Web.WebPages.WebPageBase.Write(HelperResult result) +108
   System.Web.WebPages.WebPageBase.RenderSurrounding(&lt;span class="code-sdkkeyword"&gt;String&lt;/span&gt; partialViewName, Action`1 body) +89
   System.Web.WebPages.WebPageBase.PopContext() +310
   System.Web.Mvc.BuildManagerCompiledView.Render(ViewContext viewContext, TextWriter writer) +152
   System.Web.Mvc.ViewResultBase.ExecuteResult(ControllerContext context) +378
   System.Web.Mvc.ControllerActionInvoker.InvokeActionResult(ControllerContext controllerContext, ActionResult actionResult) +17
   System.Web.Mvc.ControllerActionInvoker.InvokeActionResultFilterRecursive(IList`1 filters, &lt;span class="code-sdkkeyword"&gt;Int32&lt;/span&gt; filterIndex, ResultExecutingContext preContext, ControllerContext controllerContext, ActionResult actionResult) +91
   System.Web.Mvc.ControllerActionInvoker.InvokeActionResultFilterRecursive(IList`1 filters, &lt;span class="code-sdkkeyword"&gt;Int32&lt;/span&gt; filterIndex, ResultExecutingContext preContext, ControllerContext controllerContext, ActionResult actionResult) +795
   System.Web.Mvc.ControllerActionInvoker.InvokeActionResultWithFilters(ControllerContext controllerContext, IList`1 filters, ActionResult actionResult) +81
   System.Web.Mvc.Async.&amp;lt;&amp;gt;c__DisplayClass3_6.&amp;lt;BeginInvokeAction&amp;gt;b__4() +262
   System.Web.Mvc.Async.&amp;lt;&amp;gt;c__DisplayClass3_1.&amp;lt;BeginInvokeAction&amp;gt;b__1(IAsyncResult asyncResult) +188
   System.Web.Mvc.Async.WrappedAsyncResultBase`1.End() +60
   System.Web.Mvc.Async.AsyncControllerActionInvoker.EndInvokeAction(IAsyncResult asyncResult) +38
   System.Web.Mvc.&amp;lt;&amp;gt;c.&amp;lt;BeginExecuteCore&amp;gt;b__152_1(IAsyncResult asyncResult, ExecuteCoreState innerState) +29
   System.Web.Mvc.Async.WrappedAsyncVoid`1.CallEndDelegate(IAsyncResult asyncResult) +73
   System.Web.Mvc.Async.WrappedAsyncResultBase`1.End() +60
   System.Web.Mvc.Controller.EndExecuteCore(IAsyncResult asyncResult) +52
   System.Web.Mvc.&amp;lt;&amp;gt;c.&amp;lt;BeginExecute&amp;gt;b__151_2(IAsyncResult asyncResult, Controller controller) +17
   System.Web.Mvc.Async.WrappedAsyncVoid`1.CallEndDelegate(IAsyncResult asyncResult) +39
   System.Web.Mvc.Async.WrappedAsyncResultBase`1.End() +60
   System.Web.Mvc.Controller.EndExecute(IAsyncResult asyncResult) +38
   System.Web.Mvc.Controller.System.Web.Mvc.Async.IAsyncController.EndExecute(IAsyncResult asyncResult) +14
   System.Web.Mvc.&amp;lt;&amp;gt;c.&amp;lt;BeginProcessRequest&amp;gt;b__20_1(IAsyncResult asyncResult, ProcessRequestState innerState) +43
   System.Web.Mvc.Async.WrappedAsyncVoid`1.CallEndDelegate(IAsyncResult asyncResult) +73
   System.Web.Mvc.Async.WrappedAsyncResultBase`1.End() +60
   System.Web.Mvc.MvcHandler.EndProcessRequest(IAsyncResult asyncResult) +38
   System.Web.Mvc.MvcHandler.System.Web.IHttpAsyncHandler.EndProcessRequest(IAsyncResult result) +13
   System.Web.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +431
   System.Web.HttpApplication.ExecuteStepImpl(IExecutionStep step) +75
   System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean&amp;amp; completedSynchronously) +158


Version Information: Microsoft .NET Framework Version:&lt;span class="code-digit"&gt;4&lt;/span&gt;.&lt;span class="code-digit"&gt;0&lt;/span&gt;.&lt;span class="code-digit"&gt;30319&lt;/span&gt;; ASP.NET Version:&lt;span class="code-digit"&gt;4&lt;/span&gt;.&lt;span class="code-digit"&gt;8&lt;/span&gt;.&lt;span class="code-digit"&gt;4718&lt;/span&gt;.&lt;span class="code-digit"&gt;0&lt;/span&gt; &lt;/pre&gt;&lt;br /&gt;
&lt;br /&gt;
I asked my current host for tech assistance and they did not have an answer but suggested I comment code out of the &amp;lt;system.codedom&amp;gt; section. There is no code to comment out so it's obvious they did not even look at my web.config file.&lt;br /&gt;
&lt;br /&gt;
What do I need to change either in web.config or VS to get it change to a CAS level of HIGH?</description>
      <author>Jean Vallee</author>
      <link>https://www.codeproject.com/Messages/6008412/Change-Code-Access-Security-Level-on-Plesk</link>
      <pubDate>Wed, 03 Jul 2024 17:51:00 GMT</pubDate>
      <guid>3_6008412</guid>
      <subject>ASP.NET</subject>
    </item>
    <item>
      <title>ASP.NET Web Application Deploy on IIS problem : Image / Icon not display</title>
      <description>Hi Sir,&lt;br /&gt;
&lt;br /&gt;
I'm already develop asp.net web application using Visual Studio 2019, when i want to publish the wep app on IIS, all the icon / image on my page not appear. Also no all folder that i create such as Images folder , Logs Folder not included in publish folder.&lt;br /&gt;
&lt;br /&gt;
Can anyone help me? Really appreciate. Thanks</description>
      <author>SHAHROL AZMI BIN AMZAT</author>
      <link>https://www.codeproject.com/Messages/6005399/ASP-NET-Web-Application-Deploy-on-IIS-problem-Imag</link>
      <pubDate>Thu, 13 Jun 2024 02:56:00 GMT</pubDate>
      <guid>3_6005399</guid>
      <subject>ASP.NET</subject>
    </item>
    <item>
      <title>How to point an application to a new DB server</title>
      <description>I have created a test ASP.NET Core MVC application in VS 2022.&lt;br /&gt;
&lt;br /&gt;
I configured individual authentication so it automatically created a database in the &lt;code&gt;(localdb)\MSSQLLocalDB&lt;/code&gt; database server for all authentication chores.&lt;br /&gt;
&lt;br /&gt;
I need to deploy the test application to a web server along with its database.&lt;br /&gt;
&lt;br /&gt;
Where in the application do I point it to the web server's database server? The appsettings.json file doesn't contain a connection string for the (localdb), so I don't know if that's the right place for a different connection string.&lt;br /&gt;
&lt;br /&gt;
If you could point me in the right direction, I'll be grateful.&lt;br /&gt;
&lt;div class="signature"&gt;The difficult we do right away...&lt;br /&gt;
...the impossible takes slightly longer.&lt;/div&gt;</description>
      <author>Richard Andrew x64</author>
      <link>https://www.codeproject.com/Messages/6004548/How-to-point-an-application-to-a-new-DB-server</link>
      <pubDate>Thu, 06 Jun 2024 15:05:00 GMT</pubDate>
      <guid>3_6004548</guid>
      <subject>ASP.NET</subject>
    </item>
    <item>
      <title>How C Programming Principles Shape C# .NET Development</title>
      <description>&lt;div class='pre-lang' id='premain309091'&gt;&lt;div&gt;&lt;/div&gt;&lt;div class='pre-action-link'&gt;&lt;span id='copycode309091' class='copy-code' data-index='309091' style='visibility:hidden'&gt;&lt;svg xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' version='1.1' viewBox='0 0 460 460' style='width: 16px;height:16px;' xml:space='preserve'&gt;&lt;g&gt;&lt;path d='M425.934,0H171.662c-18.122,0-32.864,14.743-32.864,32.864v77.134h30V32.864c0-1.579,1.285-2.864,2.864-2.864h254.272     c1.579,0,2.864,1.285,2.864,2.864v254.272c0,1.58-1.285,2.865-2.864,2.865h-74.729v30h74.729 c18.121,0,32.864-14.743,32.864-32.865V32.864C458.797,14.743,444.055,0,425.934,0z'&gt;&lt;/path&gt;&lt;path d='M288.339,139.998H34.068c-18.122,0-32.865,14.743-32.865,32.865v254.272C1.204,445.257,15.946,460,34.068,460h254.272 c18.122,0,32.865-14.743,32.865-32.864V172.863C321.206,154.741,306.461,139.998,288.339,139.998z M288.341,430H34.068    c-1.58,0-2.865-1.285-2.865-2.864V172.863c0-1.58,1.285-2.865,2.865-2.865h254.272c1.58,0,2.865,1.285,2.865,2.865v254.273h0.001 C291.206,428.715,289.92,430,288.341,430z'&gt;&lt;/path&gt;&lt;/g&gt;&lt;/svg&gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;
&lt;pre id='pre309091' style='margin-top:0;' data-allowShrink='True' data-collapse='False'&gt;
How &lt;span class="code-keyword"&gt;do&lt;/span&gt; C programming principles influence C# .NET development, and how can understanding C help &lt;span class="code-keyword"&gt;in&lt;/span&gt; mastering C#? Discuss the similarities &lt;span class="code-keyword"&gt;in&lt;/span&gt; syntax, differences &lt;span class="code-keyword"&gt;in&lt;/span&gt; memory management, the role of pointers, object-oriented programming concepts, platform independence, and use &lt;span class="code-keyword"&gt;case&lt;/span&gt; differences. Share your experiences and insights on transitioning &lt;span class="code-sdkkeyword"&gt;from&lt;/span&gt; C to C#.&lt;/pre&gt;</description>
      <author>Member 16280786</author>
      <link>https://www.codeproject.com/Messages/6004534/How-C-Programming-Principles-Shape-Csharp-NET-Deve</link>
      <pubDate>Thu, 06 Jun 2024 13:53:00 GMT</pubDate>
      <guid>3_6004534</guid>
      <subject>ASP.NET</subject>
    </item>
    <item>
      <title>assertion failed : unrecognized tag script</title>
      <description>how to fix "assertion failed : unrecognized tag script" error&lt;br /&gt;
&lt;div class="signature"&gt;Anant Patil&lt;br /&gt;
Broadllyne Technology&lt;br /&gt;
&lt;/div&gt;</description>
      <author>Patil Anant</author>
      <link>https://www.codeproject.com/Messages/5991719/assertion-failed-unrecognized-tag-script</link>
      <pubDate>Sat, 09 Mar 2024 13:07:00 GMT</pubDate>
      <guid>3_5991719</guid>
      <subject>ASP.NET</subject>
    </item>
    <item>
      <title>is it hard to add new module into Umbraco CMS?</title>
      <description>I want to build my own gallery module and add it into Umbraco CMS.&lt;br /&gt;
&lt;br /&gt;
is it difficult to do this?&lt;br /&gt;
&lt;div class="signature"&gt;diligent hands rule....&lt;/div&gt;</description>
      <author>Southmountain</author>
      <link>https://www.codeproject.com/Messages/5986493/is-it-hard-to-add-new-module-into-Umbraco-CMS</link>
      <pubDate>Wed, 07 Feb 2024 19:23:00 GMT</pubDate>
      <guid>3_5986493</guid>
      <subject>ASP.NET</subject>
    </item>
    <item>
      <title>UI library for ASP.NET Core MVC  Razor</title>
      <description>I am planning the development of ASP.NET Core MVC  Razor application and am looking for FREE library of some quality that supports MVC/Razor development. I see plenty of commercial libraries like Kendo UI that can be used, but I am looking for something like Open Source Material Design. As far as I know, Material UI is usable only from SPA/React, and I want to develop MVC/Razor application that is Round-trip (Request/Response), not an SPA application like React.</description>
      <author>Mark Pelf </author>
      <link>https://www.codeproject.com/Messages/5976871/UI-library-for-ASP-NET-Core-MVC-Razor</link>
      <pubDate>Fri, 08 Dec 2023 16:18:00 GMT</pubDate>
      <guid>3_5976871</guid>
      <subject>ASP.NET</subject>
    </item>
    <item>
      <title>Coding Help</title>
      <description>Hello&lt;br /&gt;
&lt;br /&gt;
Please note that I am sorry to take anyone's time out of whatever busy life they might have. So I have a professional class project which unfortunatly is related to coding even though its just about the first and last time this is supposed to happen. I am supposed to write a .net code in VS for windows VM that will show ip address of the VM from a browser. I am not a programmer nor any career close to that so I am completely stuck and dont want to just call it a day without trying every possible avenue on the internet. I have been on this for 24hrs trying on my own with different online forums even chatgpt/Bard but to no avail so I need help. Just help write the code to help a brother out please. I saw that VS has a bunch of asp.net templates so I kept shoveling between asp.net core web api and asp.net web app (razor pages) but no luck. This project is in aws and its part of the requirement I need to complete the project.&lt;br /&gt;
&lt;br /&gt;
Am gratefull</description>
      <author>appache05</author>
      <link>https://www.codeproject.com/Messages/5974685/Coding-Help</link>
      <pubDate>Sat, 25 Nov 2023 05:04:00 GMT</pubDate>
      <guid>3_5974685</guid>
      <subject>ASP.NET</subject>
    </item>
    <item>
      <title>What should I start reading to get to where I want to go?</title>
      <description>I am a consultant, not a developer, so I mainly develop small customizations to my company's software as opposed to coding entire applications from scratch and selling them.&lt;br /&gt;
&lt;br /&gt;
I have basic experience with HTML, though admittedly I've never personally written HTML code that has a div tag.  I'm somewhat familiar with XML style sheets but it's been awhile.  I remember that classic ASP code basically just dynamically produced HTML and sent it from the server to the client - I'm honestly not sure whether or not ASP.Net does the same thing.  I'm somewhat familiar with JavaScript and VBScript and somewhat understand the difference between client-side code and server-side code.  I've heard that there's this thing called Ajax - all I really know about it is that it makes it easier to write client-side code that actually interacts with the server.  I've heard that my company's website uses the React framework but I don't know what that is.  Regardless, ASP.Net web parts can be coded and then "pasted into" custom areas on the company's website.  There are very rare needs to code entire ASPX web pages, but the ASCX controls are used a LOT.&lt;br /&gt;
&lt;br /&gt;
I need to get to the point where I can code reasonably complex and dynamic ASP.Net web parts to paste into the main website.  There are frequent business needs for which the right technical solution is either client-side code, server-side code or both.  In most cases, the user interface is fairly simple, but I've seen some get fairly complex, i.e. the entire form can change based on a selection in a dropdown (i.e. a dropdown could include 4 or 5 different reports they can generate, and the input into each report could be totally different).  I've also seen web parts that actually have a dynamic number of dropdowns on them (how that could POSSIBLY be the most efficient user interface for a given business need is beyond me, but I've seen it happen.&lt;br /&gt;
&lt;br /&gt;
So here's the question - based on what little I know, what should I start studying/reading/practicing to get to where I can reach my goal?  Any suggested online training sites and/or books I could buy to start learning?&lt;br /&gt;
&lt;br /&gt;
Hope I elucidated the question sufficiently for it to be actionable.&lt;br /&gt;
&lt;br /&gt;
Thanks&lt;br /&gt;
DalTXColtsFan</description>
      <author>DalTXColtsFan</author>
      <link>https://www.codeproject.com/Messages/5974234/What-should-I-start-reading-to-get-to-where-I-want</link>
      <pubDate>Tue, 21 Nov 2023 22:46:00 GMT</pubDate>
      <guid>3_5974234</guid>
      <subject>ASP.NET</subject>
    </item>
    <item>
      <title>SelectedIndexChanged for DropDown not fired when first item selected</title>
      <description>I wish it was a little easier to post screenshots here, but what's going on is my SelectedIndexChanged event handler is being triggered if I choose any item in the dropdown OTHER THAN THE TOP ONE.  When I choose the top item in the dropdown, Page_Load is getting fired, but not SelectedIndexChanged.  What's going on?&lt;br /&gt;
&lt;br /&gt;
&lt;div class='pre-lang' id='premain553252'&gt;&lt;div&gt;&lt;/div&gt;&lt;div class='pre-action-link'&gt;&lt;span id='copycode553252' class='copy-code' data-index='553252' style='visibility:hidden'&gt;&lt;svg xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' version='1.1' viewBox='0 0 460 460' style='width: 16px;height:16px;' xml:space='preserve'&gt;&lt;g&gt;&lt;path d='M425.934,0H171.662c-18.122,0-32.864,14.743-32.864,32.864v77.134h30V32.864c0-1.579,1.285-2.864,2.864-2.864h254.272     c1.579,0,2.864,1.285,2.864,2.864v254.272c0,1.58-1.285,2.865-2.864,2.865h-74.729v30h74.729 c18.121,0,32.864-14.743,32.864-32.865V32.864C458.797,14.743,444.055,0,425.934,0z'&gt;&lt;/path&gt;&lt;path d='M288.339,139.998H34.068c-18.122,0-32.865,14.743-32.865,32.865v254.272C1.204,445.257,15.946,460,34.068,460h254.272 c18.122,0,32.865-14.743,32.865-32.864V172.863C321.206,154.741,306.461,139.998,288.339,139.998z M288.341,430H34.068    c-1.58,0-2.865-1.285-2.865-2.864V172.863c0-1.58,1.285-2.865,2.865-2.865h254.272c1.58,0,2.865,1.285,2.865,2.865v254.273h0.001 C291.206,428.715,289.92,430,288.341,430z'&gt;&lt;/path&gt;&lt;/g&gt;&lt;/svg&gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;
&lt;pre id='pre553252' style='margin-top:0;' data-allowShrink='True' data-collapse='False'&gt;
&lt;span class="code-pagedirective"&gt;&amp;lt;%@&lt;/span&gt;&lt;span class="code-attribute"&gt; &lt;/span&gt;&lt;span class="code-leadattribute"&gt;Control&lt;/span&gt;&lt;span class="code-attribute"&gt; &lt;/span&gt;&lt;span class="code-attribute"&gt;Language&lt;/span&gt;&lt;span class="code-keyword"&gt;="&lt;/span&gt;&lt;span class="code-keyword"&gt;C#"&lt;/span&gt;&lt;span class="code-attribute"&gt; &lt;/span&gt;&lt;span class="code-attribute"&gt;AutoEventWireup&lt;/span&gt;&lt;span class="code-keyword"&gt;="&lt;/span&gt;&lt;span class="code-keyword"&gt;true"&lt;/span&gt;&lt;span class="code-attribute"&gt; &lt;/span&gt;&lt;span class="code-attribute"&gt;CodeBehind&lt;/span&gt;&lt;span class="code-keyword"&gt;="&lt;/span&gt;&lt;span class="code-keyword"&gt;First2023WebUserControl.ascx.cs"&lt;/span&gt;&lt;span class="code-attribute"&gt; &lt;/span&gt;&lt;span class="code-attribute"&gt;Inherits&lt;/span&gt;&lt;span class="code-keyword"&gt;="&lt;/span&gt;&lt;span class="code-keyword"&gt;First2023Control.UserControls.First2023WebUserControl"&lt;/span&gt;&lt;span class="code-attribute"&gt; &lt;/span&gt;&lt;span class="code-pagedirective"&gt;%&amp;gt;&lt;/span&gt;
&lt;span class="code-keyword"&gt;&amp;lt;&lt;/span&gt;&lt;span class="code-leadattribute"&gt;asp:Label&lt;/span&gt;&lt;span class="code-attribute"&gt; &lt;/span&gt;&lt;span class="code-attribute"&gt;ID&lt;/span&gt;&lt;span class="code-keyword"&gt;="&lt;/span&gt;&lt;span class="code-keyword"&gt;Label1"&lt;/span&gt;&lt;span class="code-attribute"&gt; &lt;/span&gt;&lt;span class="code-attribute"&gt;runat&lt;/span&gt;&lt;span class="code-keyword"&gt;="&lt;/span&gt;&lt;span class="code-keyword"&gt;server"&lt;/span&gt;&lt;span class="code-attribute"&gt; &lt;/span&gt;&lt;span class="code-attribute"&gt;Text&lt;/span&gt;&lt;span class="code-keyword"&gt;="&lt;/span&gt;&lt;span class="code-keyword"&gt;Hello Year 2023"&lt;/span&gt;&lt;span class="code-keyword"&gt;&amp;gt;&lt;/span&gt;&lt;span class="code-keyword"&gt;&amp;lt;&lt;/span&gt;&lt;span class="code-leadattribute"&gt;/asp:Label&lt;/span&gt;&lt;span class="code-keyword"&gt;&amp;gt;&lt;/span&gt;
&lt;span class="code-keyword"&gt;&amp;lt;&lt;/span&gt;&lt;span class="code-leadattribute"&gt;p&lt;/span&gt;&lt;span class="code-keyword"&gt;&amp;gt;&lt;/span&gt;
    &amp;#160;&lt;span class="code-keyword"&gt;&amp;lt;&lt;/span&gt;&lt;span class="code-leadattribute"&gt;/p&lt;/span&gt;&lt;span class="code-keyword"&gt;&amp;gt;&lt;/span&gt;
Category:&lt;span class="code-keyword"&gt;&amp;lt;&lt;/span&gt;&lt;span class="code-leadattribute"&gt;asp:DropDownList&lt;/span&gt;&lt;span class="code-attribute"&gt; &lt;/span&gt;&lt;span class="code-attribute"&gt;ID&lt;/span&gt;&lt;span class="code-keyword"&gt;="&lt;/span&gt;&lt;span class="code-keyword"&gt;ddlCategory"&lt;/span&gt;&lt;span class="code-attribute"&gt; &lt;/span&gt;&lt;span class="code-attribute"&gt;runat&lt;/span&gt;&lt;span class="code-keyword"&gt;="&lt;/span&gt;&lt;span class="code-keyword"&gt;server"&lt;/span&gt;&lt;span class="code-attribute"&gt; &lt;/span&gt;&lt;span class="code-attribute"&gt;AutoPostBack&lt;/span&gt;&lt;span class="code-keyword"&gt;="&lt;/span&gt;&lt;span class="code-keyword"&gt;True"&lt;/span&gt;&lt;span class="code-attribute"&gt; &lt;/span&gt;&lt;span class="code-attribute"&gt;OnSelectedIndexChanged&lt;/span&gt;&lt;span class="code-keyword"&gt;="&lt;/span&gt;&lt;span class="code-keyword"&gt;ddlCategory_SelectedIndexChanged"&lt;/span&gt;&lt;span class="code-keyword"&gt;&amp;gt;&lt;/span&gt;
&lt;span class="code-keyword"&gt;&amp;lt;&lt;/span&gt;&lt;span class="code-leadattribute"&gt;/asp:DropDownList&lt;/span&gt;&lt;span class="code-keyword"&gt;&amp;gt;&lt;/span&gt;
&lt;span class="code-keyword"&gt;&amp;lt;&lt;/span&gt;&lt;span class="code-leadattribute"&gt;p&lt;/span&gt;&lt;span class="code-keyword"&gt;&amp;gt;&lt;/span&gt;
    Subcategory:
    &lt;span class="code-keyword"&gt;&amp;lt;&lt;/span&gt;&lt;span class="code-leadattribute"&gt;asp:DropDownList&lt;/span&gt;&lt;span class="code-attribute"&gt; &lt;/span&gt;&lt;span class="code-attribute"&gt;ID&lt;/span&gt;&lt;span class="code-keyword"&gt;="&lt;/span&gt;&lt;span class="code-keyword"&gt;ddlSubcategory"&lt;/span&gt;&lt;span class="code-attribute"&gt; &lt;/span&gt;&lt;span class="code-attribute"&gt;runat&lt;/span&gt;&lt;span class="code-keyword"&gt;="&lt;/span&gt;&lt;span class="code-keyword"&gt;server"&lt;/span&gt;&lt;span class="code-attribute"&gt; &lt;/span&gt;&lt;span class="code-attribute"&gt;AutoPostBack&lt;/span&gt;&lt;span class="code-keyword"&gt;="&lt;/span&gt;&lt;span class="code-keyword"&gt;True"&lt;/span&gt;&lt;span class="code-keyword"&gt;&amp;gt;&lt;/span&gt;
    &lt;span class="code-keyword"&gt;&amp;lt;&lt;/span&gt;&lt;span class="code-leadattribute"&gt;/asp:DropDownList&lt;/span&gt;&lt;span class="code-keyword"&gt;&amp;gt;&lt;/span&gt;
&lt;span class="code-keyword"&gt;&amp;lt;&lt;/span&gt;&lt;span class="code-leadattribute"&gt;/p&lt;/span&gt;&lt;span class="code-keyword"&gt;&amp;gt;&lt;/span&gt;
&lt;span class="code-keyword"&gt;&amp;lt;&lt;/span&gt;&lt;span class="code-leadattribute"&gt;p&lt;/span&gt;&lt;span class="code-keyword"&gt;&amp;gt;&lt;/span&gt;
    &lt;span class="code-keyword"&gt;&amp;lt;&lt;/span&gt;&lt;span class="code-leadattribute"&gt;asp:Label&lt;/span&gt;&lt;span class="code-attribute"&gt; &lt;/span&gt;&lt;span class="code-attribute"&gt;ID&lt;/span&gt;&lt;span class="code-keyword"&gt;="&lt;/span&gt;&lt;span class="code-keyword"&gt;Label2"&lt;/span&gt;&lt;span class="code-attribute"&gt; &lt;/span&gt;&lt;span class="code-attribute"&gt;runat&lt;/span&gt;&lt;span class="code-keyword"&gt;="&lt;/span&gt;&lt;span class="code-keyword"&gt;server"&lt;/span&gt;&lt;span class="code-attribute"&gt; &lt;/span&gt;&lt;span class="code-attribute"&gt;Text&lt;/span&gt;&lt;span class="code-keyword"&gt;="&lt;/span&gt;&lt;span class="code-keyword"&gt;Label"&lt;/span&gt;&lt;span class="code-keyword"&gt;&amp;gt;&lt;/span&gt;&lt;span class="code-keyword"&gt;&amp;lt;&lt;/span&gt;&lt;span class="code-leadattribute"&gt;/asp:Label&lt;/span&gt;&lt;span class="code-keyword"&gt;&amp;gt;&lt;/span&gt;
&lt;span class="code-keyword"&gt;&amp;lt;&lt;/span&gt;&lt;span class="code-leadattribute"&gt;/p&lt;/span&gt;&lt;span class="code-keyword"&gt;&amp;gt;&lt;/span&gt;
&lt;span class="code-keyword"&gt;&amp;lt;&lt;/span&gt;&lt;span class="code-leadattribute"&gt;asp:Button&lt;/span&gt;&lt;span class="code-attribute"&gt; &lt;/span&gt;&lt;span class="code-attribute"&gt;ID&lt;/span&gt;&lt;span class="code-keyword"&gt;="&lt;/span&gt;&lt;span class="code-keyword"&gt;Button1"&lt;/span&gt;&lt;span class="code-attribute"&gt; &lt;/span&gt;&lt;span class="code-attribute"&gt;runat&lt;/span&gt;&lt;span class="code-keyword"&gt;="&lt;/span&gt;&lt;span class="code-keyword"&gt;server"&lt;/span&gt;&lt;span class="code-attribute"&gt; &lt;/span&gt;&lt;span class="code-attribute"&gt;OnClick&lt;/span&gt;&lt;span class="code-keyword"&gt;="&lt;/span&gt;&lt;span class="code-keyword"&gt;Button1_Click"&lt;/span&gt;&lt;span class="code-attribute"&gt; &lt;/span&gt;&lt;span class="code-attribute"&gt;Text&lt;/span&gt;&lt;span class="code-keyword"&gt;="&lt;/span&gt;&lt;span class="code-keyword"&gt;Button"&lt;/span&gt;&lt;span class="code-attribute"&gt; &lt;/span&gt;&lt;span class="code-keyword"&gt;/&lt;/span&gt;&lt;span class="code-keyword"&gt;&amp;gt;&lt;/span&gt;
&lt;span class="code-keyword"&gt;&amp;lt;&lt;/span&gt;&lt;span class="code-leadattribute"&gt;asp:Label&lt;/span&gt;&lt;span class="code-attribute"&gt; &lt;/span&gt;&lt;span class="code-attribute"&gt;ID&lt;/span&gt;&lt;span class="code-keyword"&gt;="&lt;/span&gt;&lt;span class="code-keyword"&gt;Label3"&lt;/span&gt;&lt;span class="code-attribute"&gt; &lt;/span&gt;&lt;span class="code-attribute"&gt;runat&lt;/span&gt;&lt;span class="code-keyword"&gt;="&lt;/span&gt;&lt;span class="code-keyword"&gt;server"&lt;/span&gt;&lt;span class="code-attribute"&gt; &lt;/span&gt;&lt;span class="code-attribute"&gt;Text&lt;/span&gt;&lt;span class="code-keyword"&gt;="&lt;/span&gt;&lt;span class="code-keyword"&gt;Label"&lt;/span&gt;&lt;span class="code-keyword"&gt;&amp;gt;&lt;/span&gt;&lt;span class="code-keyword"&gt;&amp;lt;&lt;/span&gt;&lt;span class="code-leadattribute"&gt;/asp:Label&lt;/span&gt;&lt;span class="code-keyword"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;div class='pre-lang' id='premain95208'&gt;&lt;div&gt;&lt;/div&gt;&lt;div class='pre-action-link'&gt;&lt;span id='copycode95208' class='copy-code' data-index='95208' style='visibility:hidden'&gt;&lt;svg xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' version='1.1' viewBox='0 0 460 460' style='width: 16px;height:16px;' xml:space='preserve'&gt;&lt;g&gt;&lt;path d='M425.934,0H171.662c-18.122,0-32.864,14.743-32.864,32.864v77.134h30V32.864c0-1.579,1.285-2.864,2.864-2.864h254.272     c1.579,0,2.864,1.285,2.864,2.864v254.272c0,1.58-1.285,2.865-2.864,2.865h-74.729v30h74.729 c18.121,0,32.864-14.743,32.864-32.865V32.864C458.797,14.743,444.055,0,425.934,0z'&gt;&lt;/path&gt;&lt;path d='M288.339,139.998H34.068c-18.122,0-32.865,14.743-32.865,32.865v254.272C1.204,445.257,15.946,460,34.068,460h254.272 c18.122,0,32.865-14.743,32.865-32.864V172.863C321.206,154.741,306.461,139.998,288.339,139.998z M288.341,430H34.068    c-1.58,0-2.865-1.285-2.865-2.864V172.863c0-1.58,1.285-2.865,2.865-2.865h254.272c1.58,0,2.865,1.285,2.865,2.865v254.273h0.001 C291.206,428.715,289.92,430,288.341,430z'&gt;&lt;/path&gt;&lt;/g&gt;&lt;/svg&gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;
&lt;pre id='pre95208' style='margin-top:0;' data-allowShrink='True' data-collapse='False'&gt;
&lt;span class="code-keyword"&gt;protected&lt;/span&gt; &lt;span class="code-keyword"&gt;void&lt;/span&gt; Page_Load(&lt;span class="code-keyword"&gt;object&lt;/span&gt; sender, EventArgs e)
{

        Label3.Text = &lt;span class="code-string"&gt;"&lt;/span&gt;&lt;span class="code-string"&gt;In Page Load selected index is "&lt;/span&gt; + ddlCategory.SelectedIndex.ToString();
        XXXDbSupport objDBSupport = &lt;span class="code-keyword"&gt;new&lt;/span&gt; XXXDbSupport();
        DbCommand objDBCommand = objDBSupport.CreateDbCommand();
        objDBCommand.CommandType = CommandType.Text;
        &lt;span class="code-keyword"&gt;string&lt;/span&gt; sSQL = &lt;span class="code-string"&gt;"&lt;/span&gt;&lt;span class="code-string"&gt;select distinct isnull(Category,&amp;#39;(blank)&amp;#39;) as ProdCat from xxx_product order by isnull(Category,&amp;#39;(blank)&amp;#39;)"&lt;/span&gt;;
        objDBCommand.CommandText = sSQL;
        DataTable objDBTable = objDBSupport.FillDataTable(objDBCommand);
        &lt;span class="code-keyword"&gt;if&lt;/span&gt; (objDBTable.Rows.Count &amp;gt; &lt;span class="code-digit"&gt;0&lt;/span&gt;)
        {
            ddlCategory.DataTextField = &lt;span class="code-string"&gt;"&lt;/span&gt;&lt;span class="code-string"&gt;ProdCat"&lt;/span&gt;;
            ddlCategory.DataValueField = &lt;span class="code-string"&gt;"&lt;/span&gt;&lt;span class="code-string"&gt;ProdCat"&lt;/span&gt;;
            ddlCategory.DataSource = objDBTable;
            ddlCategory.DataBind();
        }
        &lt;span class="code-keyword"&gt;else&lt;/span&gt;
        {
            ddlCategory.Text = &lt;span class="code-string"&gt;"&lt;/span&gt;&lt;span class="code-string"&gt;n/a"&lt;/span&gt;;
        }

}

&lt;span class="code-keyword"&gt;protected&lt;/span&gt; &lt;span class="code-keyword"&gt;void&lt;/span&gt; ddlCategory_SelectedIndexChanged(&lt;span class="code-keyword"&gt;object&lt;/span&gt; sender, EventArgs e)
{
    Label2.Text = &lt;span class="code-string"&gt;"&lt;/span&gt;&lt;span class="code-string"&gt;The selected index changed to "&lt;/span&gt; + ddlCategory.SelectedIndex.ToString();
    XXXDbSupport objDBSupport = &lt;span class="code-keyword"&gt;new&lt;/span&gt; XXXDbSupport();
    DbCommand objDBCommand = objDBSupport.CreateDbCommand();
    objDBCommand.CommandType = CommandType.Text;
    &lt;span class="code-keyword"&gt;string&lt;/span&gt; sSQL = &lt;span class="code-string"&gt;"&lt;/span&gt;&lt;span class="code-string"&gt;select distinct isnull(SubCategory,&amp;#39;(blank)&amp;#39;) as SubCat from xxx_product "&lt;/span&gt;;
    &lt;span class="code-keyword"&gt;if&lt;/span&gt; (ddlCategory.Text == &lt;span class="code-string"&gt;"&lt;/span&gt;&lt;span class="code-string"&gt;(blank)"&lt;/span&gt;)
    {
        sSQL = sSQL + &lt;span class="code-string"&gt;"&lt;/span&gt;&lt;span class="code-string"&gt;where isnull(Category,&amp;#39;(blank)&amp;#39;) = &amp;#39;(blank)&amp;#39; order by isnull(SubCategory,&amp;#39;(blank)&amp;#39;)"&lt;/span&gt;;
    }
    &lt;span class="code-keyword"&gt;else&lt;/span&gt;
    {
        sSQL = sSQL + &lt;span class="code-string"&gt;"&lt;/span&gt;&lt;span class="code-string"&gt;where Category = &amp;#39;"&lt;/span&gt; + ddlCategory.Text + &lt;span class="code-string"&gt;"&lt;/span&gt;&lt;span class="code-string"&gt;&amp;#39; order by isnull(SubCategory,&amp;#39;(blank)&amp;#39;)"&lt;/span&gt;;
    }
    objDBCommand.CommandText = sSQL;
    DataTable objDBTable = objDBSupport.FillDataTable(objDBCommand);
    &lt;span class="code-keyword"&gt;if&lt;/span&gt; (objDBTable.Rows.Count &amp;gt; &lt;span class="code-digit"&gt;0&lt;/span&gt;)
    {
        ddlSubcategory.DataTextField = &lt;span class="code-string"&gt;"&lt;/span&gt;&lt;span class="code-string"&gt;SubCat"&lt;/span&gt;;
        ddlSubcategory.DataValueField = &lt;span class="code-string"&gt;"&lt;/span&gt;&lt;span class="code-string"&gt;SubCat"&lt;/span&gt;;
        ddlSubcategory.DataSource = objDBTable;
        ddlSubcategory.DataBind();
    }
    &lt;span class="code-keyword"&gt;else&lt;/span&gt;
    {
        ddlSubcategory.Text = &lt;span class="code-string"&gt;"&lt;/span&gt;&lt;span class="code-string"&gt;n/a"&lt;/span&gt;;
    }

}
&lt;/pre&gt;</description>
      <author>DalTXColtsFan</author>
      <link>https://www.codeproject.com/Messages/5973509/SelectedIndexChanged-for-DropDown-not-fired-when-f</link>
      <pubDate>Fri, 17 Nov 2023 18:41:00 GMT</pubDate>
      <guid>3_5973509</guid>
      <subject>ASP.NET</subject>
    </item>
    <item>
      <title>Dumb it down for one who's basically a beginner</title>
      <description>OK, I'll put this in as few words as possible, and please bear with me if I am not clear, I'm still relatively new to this stuff:&lt;br /&gt;
&lt;br /&gt;
So my company has a website we roll out to our customers, and the developers provided a base class to the consultants to use to create custom web parts.  The website has a "design mode" built into it where an admin can divide the page up into sections, and basically assign a custom web part to that section of the page.  The ascx and dll for the web part obviously have to be on the IIS server where the website can "see" it.  I'm not sure exactly how that works technologically, i.e. if it's a master page with individual pages or if it's like a div or whatever.&lt;br /&gt;
&lt;br /&gt;
Anyway, I tried to create a simple webpart with two dropdowns, one of which depends on the other, and a button.  The labels and dropdowns appear to be initializing correctly.  When I click the button, it correctly updates the label but it clears the dropdowns.  Changing the selection in either dropdown appears to re-initialize the entire form including clearing the dropdowns.&lt;br /&gt;
&lt;br /&gt;
Lastly, I could be wrong but I don't believe that the code in ddlCategory_SelectedIndexChanged is getting fired as a result of the dropdown getting clicked - I think it's only getting ran when I call it explicitly.  Again, I could be wrong, but I feel like any time a "postback" is issued, only Page_Load is getting fired off, and the controls are all getting cleared/initialized before any of the code in Page_Load is actually run.&lt;br /&gt;
&lt;br /&gt;
I'll pause there for a moment - does anyone see anything in *my* code that could be causing this incorrect result?  Before I talk about how I could troubleshoot it within the framework of the rest of my company's website let's establish that.&lt;br /&gt;
&lt;br /&gt;
Thanks&lt;br /&gt;
DTXCF&lt;br /&gt;
&lt;br /&gt;
&lt;div class='pre-lang' id='premain389632'&gt;&lt;div&gt;&lt;/div&gt;&lt;div class='pre-action-link'&gt;&lt;span id='copycode389632' class='copy-code' data-index='389632' style='visibility:hidden'&gt;&lt;svg xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' version='1.1' viewBox='0 0 460 460' style='width: 16px;height:16px;' xml:space='preserve'&gt;&lt;g&gt;&lt;path d='M425.934,0H171.662c-18.122,0-32.864,14.743-32.864,32.864v77.134h30V32.864c0-1.579,1.285-2.864,2.864-2.864h254.272     c1.579,0,2.864,1.285,2.864,2.864v254.272c0,1.58-1.285,2.865-2.864,2.865h-74.729v30h74.729 c18.121,0,32.864-14.743,32.864-32.865V32.864C458.797,14.743,444.055,0,425.934,0z'&gt;&lt;/path&gt;&lt;path d='M288.339,139.998H34.068c-18.122,0-32.865,14.743-32.865,32.865v254.272C1.204,445.257,15.946,460,34.068,460h254.272 c18.122,0,32.865-14.743,32.865-32.864V172.863C321.206,154.741,306.461,139.998,288.339,139.998z M288.341,430H34.068    c-1.58,0-2.865-1.285-2.865-2.864V172.863c0-1.58,1.285-2.865,2.865-2.865h254.272c1.58,0,2.865,1.285,2.865,2.865v254.273h0.001 C291.206,428.715,289.92,430,288.341,430z'&gt;&lt;/path&gt;&lt;/g&gt;&lt;/svg&gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;
&lt;pre id='pre389632' style='margin-top:0;' data-allowShrink='True' data-collapse='False'&gt;
&lt;span class="code-pagedirective"&gt;&amp;lt;%@&lt;/span&gt;&lt;span class="code-attribute"&gt; &lt;/span&gt;&lt;span class="code-leadattribute"&gt;Control&lt;/span&gt;&lt;span class="code-attribute"&gt; &lt;/span&gt;&lt;span class="code-attribute"&gt;Language&lt;/span&gt;&lt;span class="code-keyword"&gt;="&lt;/span&gt;&lt;span class="code-keyword"&gt;C#"&lt;/span&gt;&lt;span class="code-attribute"&gt; &lt;/span&gt;&lt;span class="code-attribute"&gt;AutoEventWireup&lt;/span&gt;&lt;span class="code-keyword"&gt;="&lt;/span&gt;&lt;span class="code-keyword"&gt;true"&lt;/span&gt;&lt;span class="code-attribute"&gt; &lt;/span&gt;&lt;span class="code-attribute"&gt;CodeBehind&lt;/span&gt;&lt;span class="code-keyword"&gt;="&lt;/span&gt;&lt;span class="code-keyword"&gt;First2023WebUserControl.ascx.cs"&lt;/span&gt;&lt;span class="code-attribute"&gt; &lt;/span&gt;&lt;span class="code-attribute"&gt;Inherits&lt;/span&gt;&lt;span class="code-keyword"&gt;="&lt;/span&gt;&lt;span class="code-keyword"&gt;First2023Control.UserControls.First2023WebUserControl"&lt;/span&gt;&lt;span class="code-attribute"&gt; &lt;/span&gt;&lt;span class="code-pagedirective"&gt;%&amp;gt;&lt;/span&gt;
&lt;span class="code-keyword"&gt;&amp;lt;&lt;/span&gt;&lt;span class="code-leadattribute"&gt;asp:Label&lt;/span&gt;&lt;span class="code-attribute"&gt; &lt;/span&gt;&lt;span class="code-attribute"&gt;ID&lt;/span&gt;&lt;span class="code-keyword"&gt;="&lt;/span&gt;&lt;span class="code-keyword"&gt;Label1"&lt;/span&gt;&lt;span class="code-attribute"&gt; &lt;/span&gt;&lt;span class="code-attribute"&gt;runat&lt;/span&gt;&lt;span class="code-keyword"&gt;="&lt;/span&gt;&lt;span class="code-keyword"&gt;server"&lt;/span&gt;&lt;span class="code-attribute"&gt; &lt;/span&gt;&lt;span class="code-attribute"&gt;Text&lt;/span&gt;&lt;span class="code-keyword"&gt;="&lt;/span&gt;&lt;span class="code-keyword"&gt;Hello Year 2023"&lt;/span&gt;&lt;span class="code-keyword"&gt;&amp;gt;&lt;/span&gt;&lt;span class="code-keyword"&gt;&amp;lt;&lt;/span&gt;&lt;span class="code-leadattribute"&gt;/asp:Label&lt;/span&gt;&lt;span class="code-keyword"&gt;&amp;gt;&lt;/span&gt;
&lt;span class="code-keyword"&gt;&amp;lt;&lt;/span&gt;&lt;span class="code-leadattribute"&gt;p&lt;/span&gt;&lt;span class="code-keyword"&gt;&amp;gt;&lt;/span&gt;
    &amp;#160;&lt;span class="code-keyword"&gt;&amp;lt;&lt;/span&gt;&lt;span class="code-leadattribute"&gt;/p&lt;/span&gt;&lt;span class="code-keyword"&gt;&amp;gt;&lt;/span&gt;
Category:&lt;span class="code-keyword"&gt;&amp;lt;&lt;/span&gt;&lt;span class="code-leadattribute"&gt;asp:DropDownList&lt;/span&gt;&lt;span class="code-attribute"&gt; &lt;/span&gt;&lt;span class="code-attribute"&gt;ID&lt;/span&gt;&lt;span class="code-keyword"&gt;="&lt;/span&gt;&lt;span class="code-keyword"&gt;ddlCategory"&lt;/span&gt;&lt;span class="code-attribute"&gt; &lt;/span&gt;&lt;span class="code-attribute"&gt;runat&lt;/span&gt;&lt;span class="code-keyword"&gt;="&lt;/span&gt;&lt;span class="code-keyword"&gt;server"&lt;/span&gt;&lt;span class="code-attribute"&gt; &lt;/span&gt;&lt;span class="code-attribute"&gt;AutoPostBack&lt;/span&gt;&lt;span class="code-keyword"&gt;="&lt;/span&gt;&lt;span class="code-keyword"&gt;True"&lt;/span&gt;&lt;span class="code-attribute"&gt; &lt;/span&gt;&lt;span class="code-attribute"&gt;OnSelectedIndexChanged&lt;/span&gt;&lt;span class="code-keyword"&gt;="&lt;/span&gt;&lt;span class="code-keyword"&gt;ddlCategory_SelectedIndexChanged"&lt;/span&gt;&lt;span class="code-keyword"&gt;&amp;gt;&lt;/span&gt;
&lt;span class="code-keyword"&gt;&amp;lt;&lt;/span&gt;&lt;span class="code-leadattribute"&gt;/asp:DropDownList&lt;/span&gt;&lt;span class="code-keyword"&gt;&amp;gt;&lt;/span&gt;
&lt;span class="code-keyword"&gt;&amp;lt;&lt;/span&gt;&lt;span class="code-leadattribute"&gt;p&lt;/span&gt;&lt;span class="code-keyword"&gt;&amp;gt;&lt;/span&gt;
    Subcategory:
    &lt;span class="code-keyword"&gt;&amp;lt;&lt;/span&gt;&lt;span class="code-leadattribute"&gt;asp:DropDownList&lt;/span&gt;&lt;span class="code-attribute"&gt; &lt;/span&gt;&lt;span class="code-attribute"&gt;ID&lt;/span&gt;&lt;span class="code-keyword"&gt;="&lt;/span&gt;&lt;span class="code-keyword"&gt;ddlSubcategory"&lt;/span&gt;&lt;span class="code-attribute"&gt; &lt;/span&gt;&lt;span class="code-attribute"&gt;runat&lt;/span&gt;&lt;span class="code-keyword"&gt;="&lt;/span&gt;&lt;span class="code-keyword"&gt;server"&lt;/span&gt;&lt;span class="code-attribute"&gt; &lt;/span&gt;&lt;span class="code-attribute"&gt;AutoPostBack&lt;/span&gt;&lt;span class="code-keyword"&gt;="&lt;/span&gt;&lt;span class="code-keyword"&gt;True"&lt;/span&gt;&lt;span class="code-keyword"&gt;&amp;gt;&lt;/span&gt;
    &lt;span class="code-keyword"&gt;&amp;lt;&lt;/span&gt;&lt;span class="code-leadattribute"&gt;/asp:DropDownList&lt;/span&gt;&lt;span class="code-keyword"&gt;&amp;gt;&lt;/span&gt;
&lt;span class="code-keyword"&gt;&amp;lt;&lt;/span&gt;&lt;span class="code-leadattribute"&gt;/p&lt;/span&gt;&lt;span class="code-keyword"&gt;&amp;gt;&lt;/span&gt;
&lt;span class="code-keyword"&gt;&amp;lt;&lt;/span&gt;&lt;span class="code-leadattribute"&gt;p&lt;/span&gt;&lt;span class="code-keyword"&gt;&amp;gt;&lt;/span&gt;
    &lt;span class="code-keyword"&gt;&amp;lt;&lt;/span&gt;&lt;span class="code-leadattribute"&gt;asp:Label&lt;/span&gt;&lt;span class="code-attribute"&gt; &lt;/span&gt;&lt;span class="code-attribute"&gt;ID&lt;/span&gt;&lt;span class="code-keyword"&gt;="&lt;/span&gt;&lt;span class="code-keyword"&gt;Label2"&lt;/span&gt;&lt;span class="code-attribute"&gt; &lt;/span&gt;&lt;span class="code-attribute"&gt;runat&lt;/span&gt;&lt;span class="code-keyword"&gt;="&lt;/span&gt;&lt;span class="code-keyword"&gt;server"&lt;/span&gt;&lt;span class="code-attribute"&gt; &lt;/span&gt;&lt;span class="code-attribute"&gt;Text&lt;/span&gt;&lt;span class="code-keyword"&gt;="&lt;/span&gt;&lt;span class="code-keyword"&gt;Label"&lt;/span&gt;&lt;span class="code-keyword"&gt;&amp;gt;&lt;/span&gt;&lt;span class="code-keyword"&gt;&amp;lt;&lt;/span&gt;&lt;span class="code-leadattribute"&gt;/asp:Label&lt;/span&gt;&lt;span class="code-keyword"&gt;&amp;gt;&lt;/span&gt;
&lt;span class="code-keyword"&gt;&amp;lt;&lt;/span&gt;&lt;span class="code-leadattribute"&gt;/p&lt;/span&gt;&lt;span class="code-keyword"&gt;&amp;gt;&lt;/span&gt;
&lt;span class="code-keyword"&gt;&amp;lt;&lt;/span&gt;&lt;span class="code-leadattribute"&gt;asp:Button&lt;/span&gt;&lt;span class="code-attribute"&gt; &lt;/span&gt;&lt;span class="code-attribute"&gt;ID&lt;/span&gt;&lt;span class="code-keyword"&gt;="&lt;/span&gt;&lt;span class="code-keyword"&gt;Button1"&lt;/span&gt;&lt;span class="code-attribute"&gt; &lt;/span&gt;&lt;span class="code-attribute"&gt;runat&lt;/span&gt;&lt;span class="code-keyword"&gt;="&lt;/span&gt;&lt;span class="code-keyword"&gt;server"&lt;/span&gt;&lt;span class="code-attribute"&gt; &lt;/span&gt;&lt;span class="code-attribute"&gt;OnClick&lt;/span&gt;&lt;span class="code-keyword"&gt;="&lt;/span&gt;&lt;span class="code-keyword"&gt;Button1_Click"&lt;/span&gt;&lt;span class="code-attribute"&gt; &lt;/span&gt;&lt;span class="code-attribute"&gt;Text&lt;/span&gt;&lt;span class="code-keyword"&gt;="&lt;/span&gt;&lt;span class="code-keyword"&gt;Button"&lt;/span&gt;&lt;span class="code-attribute"&gt; &lt;/span&gt;&lt;span class="code-keyword"&gt;/&lt;/span&gt;&lt;span class="code-keyword"&gt;&amp;gt;&lt;/span&gt;
&lt;span class="code-keyword"&gt;&amp;lt;&lt;/span&gt;&lt;span class="code-leadattribute"&gt;asp:Label&lt;/span&gt;&lt;span class="code-attribute"&gt; &lt;/span&gt;&lt;span class="code-attribute"&gt;ID&lt;/span&gt;&lt;span class="code-keyword"&gt;="&lt;/span&gt;&lt;span class="code-keyword"&gt;Label3"&lt;/span&gt;&lt;span class="code-attribute"&gt; &lt;/span&gt;&lt;span class="code-attribute"&gt;runat&lt;/span&gt;&lt;span class="code-keyword"&gt;="&lt;/span&gt;&lt;span class="code-keyword"&gt;server"&lt;/span&gt;&lt;span class="code-attribute"&gt; &lt;/span&gt;&lt;span class="code-attribute"&gt;Text&lt;/span&gt;&lt;span class="code-keyword"&gt;="&lt;/span&gt;&lt;span class="code-keyword"&gt;Label"&lt;/span&gt;&lt;span class="code-keyword"&gt;&amp;gt;&lt;/span&gt;&lt;span class="code-keyword"&gt;&amp;lt;&lt;/span&gt;&lt;span class="code-leadattribute"&gt;/asp:Label&lt;/span&gt;&lt;span class="code-keyword"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
using System;&lt;br /&gt;
using System.Collections.Generic;&lt;br /&gt;
using System.Data;&lt;br /&gt;
using System.Data.Common;&lt;br /&gt;
using System.Linq;&lt;br /&gt;
using System.Web;&lt;br /&gt;
using System.Web.UI;&lt;br /&gt;
using System.Web.UI.WebControls;&lt;br /&gt;
using Custom1.Custom2.Web.Framework;&lt;br /&gt;
&lt;br /&gt;
namespace First2023Control.UserControls&lt;br /&gt;
{&lt;br /&gt;
    //public partial class First2023WebUserControl : System.Web.UI.UserControl&lt;br /&gt;
    public partial class First2023WebUserControl : Custom1.Custom2.Web.Framework.UserControlBase&lt;br /&gt;
    {&lt;br /&gt;
        [Property(DisplayName = "Message Text")]&lt;br /&gt;
        public string MessageText&lt;br /&gt;
        {&lt;br /&gt;
            get&lt;br /&gt;
            {&lt;br /&gt;
                return Label1.Text;&lt;br /&gt;
            }&lt;br /&gt;
            set&lt;br /&gt;
            {&lt;br /&gt;
                Label1.Text = value;&lt;br /&gt;
            }&lt;br /&gt;
        }&lt;br /&gt;
        protected void Page_Load(object sender, EventArgs e)&lt;br /&gt;
        {&lt;br /&gt;
&lt;br /&gt;
            if (IsPostBack == false)&lt;br /&gt;
            {&lt;br /&gt;
                ddlCategory.Items.Add("FirstCat");&lt;br /&gt;
                ddlCategory.Items.Add("SecondCat");&lt;br /&gt;
                ddlCategory_SelectedIndexChanged(sender, e);&lt;br /&gt;
            }&lt;br /&gt;
            else&lt;br /&gt;
            {&lt;br /&gt;
                Label1.Text = "I posted back";&lt;br /&gt;
            }&lt;br /&gt;
        }&lt;br /&gt;
&lt;br /&gt;
        protected void ddlCategory_SelectedIndexChanged(object sender, EventArgs e)&lt;br /&gt;
        {&lt;br /&gt;
            Label2.Text = "The selected index changed";&lt;br /&gt;
            if (ddlCategory.SelectedValue == "FirstCat")&lt;br /&gt;
            {&lt;br /&gt;
                ddlSubcategory.Items.Clear();&lt;br /&gt;
                ddlSubcategory.Items.Add("FirstCatFirstSubCat");&lt;br /&gt;
                ddlSubcategory.Items.Add("FirstCatSecondSubCat");&lt;br /&gt;
            }&lt;br /&gt;
            else&lt;br /&gt;
            {&lt;br /&gt;
                ddlSubcategory.Items.Clear();&lt;br /&gt;
                ddlSubcategory.Items.Add("SecondCatFirstSubCat");&lt;br /&gt;
                ddlSubcategory.Items.Add("SecondCatSecondSubCat");&lt;br /&gt;
            }&lt;br /&gt;
&lt;br /&gt;
        }&lt;br /&gt;
&lt;br /&gt;
        protected void Button1_Click(object sender, EventArgs e)&lt;br /&gt;
        {&lt;br /&gt;
            Label3.Text = "Someone clicked the button";&lt;br /&gt;
        }&lt;br /&gt;
    }&lt;br /&gt;
}</description>
      <author>DalTXColtsFan</author>
      <link>https://www.codeproject.com/Messages/5973064/Dumb-it-down-for-one-whos-basically-a-beginner</link>
      <pubDate>Wed, 15 Nov 2023 16:31:00 GMT</pubDate>
      <guid>3_5973064</guid>
      <subject>ASP.NET</subject>
    </item>
    <item>
      <title>can't build blazor library in azure pipeline</title>
      <description>When I try to build my project with azure pipeline (or even my PC), using that command line:&lt;br /&gt;

&lt;div class='pre-lang' id='premain389632'&gt;&lt;div&gt;&lt;/div&gt;&lt;div class='pre-action-link'&gt;&lt;span id='copycode389632' class='copy-code' data-index='389632' style='visibility:hidden'&gt;&lt;svg xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' version='1.1' viewBox='0 0 460 460' style='width: 16px;height:16px;' xml:space='preserve'&gt;&lt;g&gt;&lt;path d='M425.934,0H171.662c-18.122,0-32.864,14.743-32.864,32.864v77.134h30V32.864c0-1.579,1.285-2.864,2.864-2.864h254.272     c1.579,0,2.864,1.285,2.864,2.864v254.272c0,1.58-1.285,2.865-2.864,2.865h-74.729v30h74.729 c18.121,0,32.864-14.743,32.864-32.865V32.864C458.797,14.743,444.055,0,425.934,0z'&gt;&lt;/path&gt;&lt;path d='M288.339,139.998H34.068c-18.122,0-32.865,14.743-32.865,32.865v254.272C1.204,445.257,15.946,460,34.068,460h254.272 c18.122,0,32.865-14.743,32.865-32.864V172.863C321.206,154.741,306.461,139.998,288.339,139.998z M288.341,430H34.068    c-1.58,0-2.865-1.285-2.865-2.864V172.863c0-1.58,1.285-2.865,2.865-2.865h254.272c1.58,0,2.865,1.285,2.865,2.865v254.273h0.001 C291.206,428.715,289.92,430,288.341,430z'&gt;&lt;/path&gt;&lt;/g&gt;&lt;/svg&gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;
&lt;pre id='pre389632' style='margin-top:0;' data-allowShrink='True' data-collapse='False'&gt;
dotnet.exe publish C:\..\Produce.csproj --configuration Release -r win-x64 --self-contained &lt;span class="code-keyword"&gt;true&lt;/span&gt; --output C:\..\Produce5&lt;/pre&gt;
&lt;br /&gt;
I got same version number as my computer and this error, all the time, almost immediately:
&lt;div class='pre-lang' id='premain496487'&gt;&lt;div&gt;&lt;/div&gt;&lt;div class='pre-action-link'&gt;&lt;span id='copycode496487' class='copy-code' data-index='496487' style='visibility:hidden'&gt;&lt;svg xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' version='1.1' viewBox='0 0 460 460' style='width: 16px;height:16px;' xml:space='preserve'&gt;&lt;g&gt;&lt;path d='M425.934,0H171.662c-18.122,0-32.864,14.743-32.864,32.864v77.134h30V32.864c0-1.579,1.285-2.864,2.864-2.864h254.272     c1.579,0,2.864,1.285,2.864,2.864v254.272c0,1.58-1.285,2.865-2.864,2.865h-74.729v30h74.729 c18.121,0,32.864-14.743,32.864-32.865V32.864C458.797,14.743,444.055,0,425.934,0z'&gt;&lt;/path&gt;&lt;path d='M288.339,139.998H34.068c-18.122,0-32.865,14.743-32.865,32.865v254.272C1.204,445.257,15.946,460,34.068,460h254.272 c18.122,0,32.865-14.743,32.865-32.864V172.863C321.206,154.741,306.461,139.998,288.339,139.998z M288.341,430H34.068    c-1.58,0-2.865-1.285-2.865-2.864V172.863c0-1.58,1.285-2.865,2.865-2.865h254.272c1.58,0,2.865,1.285,2.865,2.865v254.273h0.001 C291.206,428.715,289.92,430,288.341,430z'&gt;&lt;/path&gt;&lt;/g&gt;&lt;/svg&gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;
&lt;pre id='pre496487' style='margin-top:0;' data-allowShrink='True' data-collapse='False'&gt;
MSBuild version &lt;span class="code-digit"&gt;17&lt;/span&gt;.&lt;span class="code-digit"&gt;7&lt;/span&gt;.1+971bf70db &lt;span class="code-keyword"&gt;for&lt;/span&gt; .NET
...
C:\Program Files\dotnet\sdk\7.&lt;span class="code-digit"&gt;0&lt;/span&gt;.400\Sdks\Microsoft.NET.Sdk.BlazorWebAssembly\targets\Microsoft.NET.Sdk.BlazorWebAssembly.&lt;span class="code-digit"&gt;6_0&lt;/span&gt;.targets(&lt;span class="code-digit"&gt;325&lt;/span&gt;,&lt;span class="code-digit"&gt;5&lt;/span&gt;)
error MSB4018: 
The &lt;span class="code-string"&gt;"&lt;/span&gt;&lt;span class="code-string"&gt;GenerateBlazorWebAssemblyBootJson"&lt;/span&gt; task failed unexpectedly. [C:\...\Parts.Production.Blazor.csproj]
System.IO.IOException: The process cannot access the file &lt;span class="code-string"&gt;&amp;#39;&lt;/span&gt;&lt;span class="code-string"&gt;C:\..\Parts.Production.Blazor\obj\Release\net7.0\blazor.boot.json&amp;#39;&lt;/span&gt; because it &lt;span class="code-keyword"&gt;is&lt;/span&gt; being used by another process. [C:\..\Parts.Production.Blazor.csproj]&lt;/pre&gt;
&lt;br /&gt;
The funny thing is, the whole thing build fine with visual studio!&lt;br /&gt;
Any idea what's wrong, or what I could do?&lt;br /&gt;
&lt;br /&gt;
Perhaps, Visual Studio 2022 is not using &lt;code&gt;Microsoft.NET.Sdk.BlazorWebAssembly.6_0.targets&lt;/code&gt; and I too can avoid it with the command line?&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;REMARK&lt;/b&gt;&lt;br /&gt;
adding &lt;code&gt;-maxcpucount:1&lt;/code&gt; to the command line fixes this build job step, but it's a lot slower (obviously) and the whole solution pipeline build job still fails because it's now taking more than an hour...  &lt;img src="https://codeproject.freetls.fastly.net/script/Forums/Images/smiley_rolleyes.gif" align="top" alt="Roll eyes | :rolleyes:" /&gt; &lt;br /&gt;

&lt;div class="signature"&gt;A new &lt;a href="https://github.com/superlloyd/Galador.Reflection"&gt;.NET Serializer&lt;/a&gt;&lt;br /&gt;
All in one &lt;a href="http://github.com/superlloyd/MenuRibbon/"&gt;Menu-Ribbon Bar&lt;/a&gt;&lt;br /&gt;
Taking over the world since 1371!&lt;/div&gt;</description>
      <author>Super Lloyd</author>
      <link>https://www.codeproject.com/Messages/5960911/cant-build-blazor-library-in-azure-pipeline</link>
      <pubDate>Thu, 07 Sep 2023 03:08:00 GMT</pubDate>
      <guid>3_5960911</guid>
      <subject>ASP.NET</subject>
    </item>
    <item>
      <title>Blazor component debugging</title>
      <description>I have an existing MVC app, to which I added some Blazor components on some pages.&lt;br /&gt;
I.e. instead of starting a new fully Blazor app, I am trying to extend the functionality of an existing app.&lt;br /&gt;
&lt;br /&gt;
I am using WebAssembly rendering, particularly as they are interactive components (updating the UI, doing web service calls, etc..)&lt;br /&gt;
&lt;br /&gt;
It's all working very well except... I can't use breakpoint / debug the components! &lt;img src="https://codeproject.global.ssl.fastly.net/script/Forums/Images/smiley_redface.gif" align="top" alt="Blush | :O" /&gt; &lt;br /&gt;
Any clue on how to enable debugging of Blazor component on an MVC view?&lt;br /&gt;

&lt;div class="signature"&gt;A new &lt;a href="https://github.com/superlloyd/Galador.Reflection"&gt;.NET Serializer&lt;/a&gt;&lt;br /&gt;
All in one &lt;a href="http://github.com/superlloyd/MenuRibbon/"&gt;Menu-Ribbon Bar&lt;/a&gt;&lt;br /&gt;
Taking over the world since 1371!&lt;/div&gt;</description>
      <author>Super Lloyd</author>
      <link>https://www.codeproject.com/Messages/5958662/Blazor-component-debugging</link>
      <pubDate>Thu, 24 Aug 2023 00:16:00 GMT</pubDate>
      <guid>3_5958662</guid>
      <subject>ASP.NET</subject>
    </item>
    <item>
      <title>HTML SELECT CONTROL  WITH RUNAT="SERVER</title>
      <description>How cam i keep the data source of htmlselect control after postback ?&lt;br /&gt;
( I have 14 select controls  and don ot wantto load data from db)  &lt;br /&gt;
**I need the control to not do postback  when changed and have both server and client script there for I diddn't use</description>
      <author>tchia_k</author>
      <link>https://www.codeproject.com/Messages/5954483/HTML-SELECT-CONTROL-WITH-RUNATequals-SERVER</link>
      <pubDate>Sun, 30 Jul 2023 13:53:00 GMT</pubDate>
      <guid>3_5954483</guid>
      <subject>ASP.NET</subject>
    </item>
    <item>
      <title>"Context.UserIdentifier" of SignalR is always null when I use CustomAuthenticationStateProvider in Blazor Server App</title>
      <description>I'm working on Blazor server App project. I have the following codes for CustomAuthenticationStateProvider:&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;CustomAuthenticationStateProvider.cs&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;div class='pre-lang' id='premain843082'&gt;&lt;div&gt;&lt;/div&gt;&lt;div class='pre-action-link'&gt;&lt;span id='copycode843082' class='copy-code' data-index='843082' style='visibility:hidden'&gt;&lt;svg xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' version='1.1' viewBox='0 0 460 460' style='width: 16px;height:16px;' xml:space='preserve'&gt;&lt;g&gt;&lt;path d='M425.934,0H171.662c-18.122,0-32.864,14.743-32.864,32.864v77.134h30V32.864c0-1.579,1.285-2.864,2.864-2.864h254.272     c1.579,0,2.864,1.285,2.864,2.864v254.272c0,1.58-1.285,2.865-2.864,2.865h-74.729v30h74.729 c18.121,0,32.864-14.743,32.864-32.865V32.864C458.797,14.743,444.055,0,425.934,0z'&gt;&lt;/path&gt;&lt;path d='M288.339,139.998H34.068c-18.122,0-32.865,14.743-32.865,32.865v254.272C1.204,445.257,15.946,460,34.068,460h254.272 c18.122,0,32.865-14.743,32.865-32.864V172.863C321.206,154.741,306.461,139.998,288.339,139.998z M288.341,430H34.068    c-1.58,0-2.865-1.285-2.865-2.864V172.863c0-1.58,1.285-2.865,2.865-2.865h254.272c1.58,0,2.865,1.285,2.865,2.865v254.273h0.001 C291.206,428.715,289.92,430,288.341,430z'&gt;&lt;/path&gt;&lt;/g&gt;&lt;/svg&gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;
&lt;pre id='pre843082' style='margin-top:0;' data-allowShrink='True' data-collapse='False'&gt;
&lt;span class="code-keyword"&gt;public&lt;/span&gt; &lt;span class="code-keyword"&gt;class&lt;/span&gt; CustomAuthenticationStateProvider : AuthenticationStateProvider
    {
        &lt;span class="code-keyword"&gt;private&lt;/span&gt; &lt;span class="code-keyword"&gt;readonly&lt;/span&gt; ProtectedSessionStorage _sessionStorage;
        &lt;span class="code-keyword"&gt;private&lt;/span&gt; ClaimsPrincipal _anonymous = &lt;span class="code-keyword"&gt;new&lt;/span&gt; ClaimsPrincipal(&lt;span class="code-keyword"&gt;new&lt;/span&gt; ClaimsIdentity());
        &lt;span class="code-keyword"&gt;public&lt;/span&gt; CustomAuthenticationStateProvider(ProtectedSessionStorage sessionStorage)
        {
            _sessionStorage = sessionStorage;
        }

        &lt;span class="code-keyword"&gt;public&lt;/span&gt; &lt;span class="code-keyword"&gt;override&lt;/span&gt; &lt;span class="code-keyword"&gt;async&lt;/span&gt; Task&amp;lt;AuthenticationState&amp;gt; GetAuthenticationStateAsync()
        {
            &lt;span class="code-keyword"&gt;try&lt;/span&gt;
            {
                &lt;span class="code-keyword"&gt;var&lt;/span&gt; userSessionStorageResult = &lt;span class="code-keyword"&gt;await&lt;/span&gt; _sessionStorage.GetAsync&amp;lt;UserSession&amp;gt;(&lt;span class="code-string"&gt;"&lt;/span&gt;&lt;span class="code-string"&gt;UserSession"&lt;/span&gt;);
                &lt;span class="code-keyword"&gt;var&lt;/span&gt; userSession = userSessionStorageResult.Success ? userSessionStorageResult.Value : &lt;span class="code-keyword"&gt;null&lt;/span&gt;;
                &lt;span class="code-keyword"&gt;if&lt;/span&gt; (userSession == &lt;span class="code-keyword"&gt;null&lt;/span&gt;)
                {
                    &lt;span class="code-keyword"&gt;return&lt;/span&gt; &lt;span class="code-keyword"&gt;await&lt;/span&gt; Task.FromResult(&lt;span class="code-keyword"&gt;new&lt;/span&gt; AuthenticationState(_anonymous));
                }
                &lt;span class="code-keyword"&gt;var&lt;/span&gt; claimsPrincipal = &lt;span class="code-keyword"&gt;new&lt;/span&gt; ClaimsPrincipal(&lt;span class="code-keyword"&gt;new&lt;/span&gt; ClaimsIdentity(&lt;span class="code-keyword"&gt;new&lt;/span&gt; List&amp;lt;Claim&amp;gt; {
                &lt;span class="code-keyword"&gt;new&lt;/span&gt; Claim(ClaimTypes.Name, userSession.Username),
                &lt;span class="code-keyword"&gt;new&lt;/span&gt; Claim(ClaimTypes.Role, userSession.UserRole),
                &lt;span class="code-keyword"&gt;new&lt;/span&gt; Claim(ClaimTypes.NameIdentifier, userSession.UserId.ToString())
            }, &lt;span class="code-string"&gt;"&lt;/span&gt;&lt;span class="code-string"&gt;Jwt"&lt;/span&gt;));

                &lt;span class="code-keyword"&gt;return&lt;/span&gt; &lt;span class="code-keyword"&gt;await&lt;/span&gt; Task.FromResult(&lt;span class="code-keyword"&gt;new&lt;/span&gt; AuthenticationState(claimsPrincipal));
            }
            &lt;span class="code-keyword"&gt;catch&lt;/span&gt; (Exception)
            {
                &lt;span class="code-keyword"&gt;return&lt;/span&gt; &lt;span class="code-keyword"&gt;await&lt;/span&gt; Task.FromResult(&lt;span class="code-keyword"&gt;new&lt;/span&gt; AuthenticationState(_anonymous));
            }
        }

        &lt;span class="code-keyword"&gt;public&lt;/span&gt; &lt;span class="code-keyword"&gt;async&lt;/span&gt; Task UpdateAuthenticationState(UserSession userSession)
        {
            ClaimsPrincipal claimsPrincipal;

            &lt;span class="code-keyword"&gt;if&lt;/span&gt; (userSession != &lt;span class="code-keyword"&gt;null&lt;/span&gt;)
            {
                &lt;span class="code-keyword"&gt;await&lt;/span&gt; _sessionStorage.SetAsync(&lt;span class="code-string"&gt;"&lt;/span&gt;&lt;span class="code-string"&gt;UserSession"&lt;/span&gt;, userSession);
                &lt;span class="code-keyword"&gt;await&lt;/span&gt; _sessionStorage.SetAsync(&lt;span class="code-string"&gt;"&lt;/span&gt;&lt;span class="code-string"&gt;Token"&lt;/span&gt;, userSession.TokenText);
                claimsPrincipal = &lt;span class="code-keyword"&gt;new&lt;/span&gt; ClaimsPrincipal(&lt;span class="code-keyword"&gt;new&lt;/span&gt; ClaimsIdentity(&lt;span class="code-keyword"&gt;new&lt;/span&gt; List&amp;lt;Claim&amp;gt;
                {
                    &lt;span class="code-keyword"&gt;new&lt;/span&gt; Claim(ClaimTypes.Name, userSession.Username),
                    &lt;span class="code-keyword"&gt;new&lt;/span&gt; Claim(ClaimTypes.Role, userSession.UserRole),
                    &lt;span class="code-keyword"&gt;new&lt;/span&gt; Claim(ClaimTypes.NameIdentifier, userSession.UserId.ToString())
                }));
            }
            &lt;span class="code-keyword"&gt;else&lt;/span&gt;
            {
                &lt;span class="code-keyword"&gt;await&lt;/span&gt; _sessionStorage.DeleteAsync(&lt;span class="code-string"&gt;"&lt;/span&gt;&lt;span class="code-string"&gt;UserSession"&lt;/span&gt;);
                claimsPrincipal = _anonymous;
            }

            NotifyAuthenticationStateChanged(Task.FromResult(&lt;span class="code-keyword"&gt;new&lt;/span&gt; AuthenticationState(claimsPrincipal)));
        }
    }&lt;/pre&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;UserSession.cs&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;div class='pre-lang' id='premain130856'&gt;&lt;div&gt;&lt;/div&gt;&lt;div class='pre-action-link'&gt;&lt;span id='copycode130856' class='copy-code' data-index='130856' style='visibility:hidden'&gt;&lt;svg xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' version='1.1' viewBox='0 0 460 460' style='width: 16px;height:16px;' xml:space='preserve'&gt;&lt;g&gt;&lt;path d='M425.934,0H171.662c-18.122,0-32.864,14.743-32.864,32.864v77.134h30V32.864c0-1.579,1.285-2.864,2.864-2.864h254.272     c1.579,0,2.864,1.285,2.864,2.864v254.272c0,1.58-1.285,2.865-2.864,2.865h-74.729v30h74.729 c18.121,0,32.864-14.743,32.864-32.865V32.864C458.797,14.743,444.055,0,425.934,0z'&gt;&lt;/path&gt;&lt;path d='M288.339,139.998H34.068c-18.122,0-32.865,14.743-32.865,32.865v254.272C1.204,445.257,15.946,460,34.068,460h254.272 c18.122,0,32.865-14.743,32.865-32.864V172.863C321.206,154.741,306.461,139.998,288.339,139.998z M288.341,430H34.068    c-1.58,0-2.865-1.285-2.865-2.864V172.863c0-1.58,1.285-2.865,2.865-2.865h254.272c1.58,0,2.865,1.285,2.865,2.865v254.273h0.001 C291.206,428.715,289.92,430,288.341,430z'&gt;&lt;/path&gt;&lt;/g&gt;&lt;/svg&gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;
&lt;pre id='pre130856' style='margin-top:0;' data-allowShrink='True' data-collapse='False'&gt;
&lt;span class="code-keyword"&gt;public&lt;/span&gt; &lt;span class="code-keyword"&gt;class&lt;/span&gt; UserSession
{
    &lt;span class="code-keyword"&gt;public&lt;/span&gt; &lt;span class="code-keyword"&gt;int&lt;/span&gt; UserId { &lt;span class="code-keyword"&gt;get&lt;/span&gt;; &lt;span class="code-keyword"&gt;set&lt;/span&gt;; }
    &lt;span class="code-keyword"&gt;public&lt;/span&gt; &lt;span class="code-keyword"&gt;string&lt;/span&gt; Username { &lt;span class="code-keyword"&gt;get&lt;/span&gt;; &lt;span class="code-keyword"&gt;set&lt;/span&gt;; }
    &lt;span class="code-keyword"&gt;public&lt;/span&gt; &lt;span class="code-keyword"&gt;string&lt;/span&gt; UserRole { &lt;span class="code-keyword"&gt;get&lt;/span&gt;; &lt;span class="code-keyword"&gt;set&lt;/span&gt;; }
    &lt;span class="code-keyword"&gt;public&lt;/span&gt; &lt;span class="code-keyword"&gt;string&lt;/span&gt; Name { &lt;span class="code-keyword"&gt;get&lt;/span&gt;; &lt;span class="code-keyword"&gt;set&lt;/span&gt;; }
    &lt;span class="code-keyword"&gt;public&lt;/span&gt; &lt;span class="code-keyword"&gt;string&lt;/span&gt; TokenText { &lt;span class="code-keyword"&gt;get&lt;/span&gt;; &lt;span class="code-keyword"&gt;set&lt;/span&gt;; }
}
&lt;/pre&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;LoginController:&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;div class='pre-lang' id='premain138043'&gt;&lt;div&gt;&lt;/div&gt;&lt;div class='pre-action-link'&gt;&lt;span id='copycode138043' class='copy-code' data-index='138043' style='visibility:hidden'&gt;&lt;svg xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' version='1.1' viewBox='0 0 460 460' style='width: 16px;height:16px;' xml:space='preserve'&gt;&lt;g&gt;&lt;path d='M425.934,0H171.662c-18.122,0-32.864,14.743-32.864,32.864v77.134h30V32.864c0-1.579,1.285-2.864,2.864-2.864h254.272     c1.579,0,2.864,1.285,2.864,2.864v254.272c0,1.58-1.285,2.865-2.864,2.865h-74.729v30h74.729 c18.121,0,32.864-14.743,32.864-32.865V32.864C458.797,14.743,444.055,0,425.934,0z'&gt;&lt;/path&gt;&lt;path d='M288.339,139.998H34.068c-18.122,0-32.865,14.743-32.865,32.865v254.272C1.204,445.257,15.946,460,34.068,460h254.272 c18.122,0,32.865-14.743,32.865-32.864V172.863C321.206,154.741,306.461,139.998,288.339,139.998z M288.341,430H34.068    c-1.58,0-2.865-1.285-2.865-2.864V172.863c0-1.58,1.285-2.865,2.865-2.865h254.272c1.58,0,2.865,1.285,2.865,2.865v254.273h0.001 C291.206,428.715,289.92,430,288.341,430z'&gt;&lt;/path&gt;&lt;/g&gt;&lt;/svg&gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;
&lt;pre id='pre138043' style='margin-top:0;' data-allowShrink='True' data-collapse='False'&gt;
&lt;span class="code-bracket"&gt;[&lt;/span&gt;&lt;span class="code-sdkkeyword"&gt;Route&lt;/span&gt;(&lt;span class="code-string"&gt;"&lt;/span&gt;&lt;span class="code-string"&gt;api/[controller]/[action]"&lt;/span&gt;)]
    [ApiController]
    &lt;span class="code-keyword"&gt;public&lt;/span&gt; &lt;span class="code-keyword"&gt;class&lt;/span&gt; ApiLoginController : ControllerBase
    {
        &lt;span class="code-keyword"&gt;private&lt;/span&gt; &lt;span class="code-keyword"&gt;readonly&lt;/span&gt; SqliteContext _sqlServerContext;
        &lt;span class="code-keyword"&gt;private&lt;/span&gt; &lt;span class="code-keyword"&gt;readonly&lt;/span&gt; IConfiguration _configuration;
        &lt;span class="code-keyword"&gt;private&lt;/span&gt; &lt;span class="code-keyword"&gt;readonly&lt;/span&gt; IUserService _userService;

        &lt;span class="code-keyword"&gt;public&lt;/span&gt; ApiLoginController(SqliteContext sqlServerContext, IConfiguration configuration, IUserService userService)
        {
            _sqlServerContext = sqlServerContext;
            _configuration = configuration;
            _userService = userService;
        }

        [HttpPost]
        &lt;span class="code-keyword"&gt;public&lt;/span&gt; &lt;span class="code-keyword"&gt;async&lt;/span&gt; Task&amp;lt;IActionResult&amp;gt; LoginSystem([FromBody] UserLoginVM loginModel)
        {
            &lt;span class="code-keyword"&gt;var&lt;/span&gt; user = &lt;span class="code-keyword"&gt;await&lt;/span&gt; _sqlServerContext.Users.Include(x =&amp;gt; x.RoleRefNavigation)
                .FirstOrDefaultAsync(x =&amp;gt; x.Username == loginModel.Username &amp;amp;&amp;amp; x.IsActive);
            &lt;span class="code-keyword"&gt;if&lt;/span&gt; (user == &lt;span class="code-keyword"&gt;null&lt;/span&gt;)
            {
                &lt;span class="code-keyword"&gt;return&lt;/span&gt; BadRequest(&lt;span class="code-string"&gt;"&lt;/span&gt;&lt;span class="code-string"&gt;Invalid credentials."&lt;/span&gt;);
            }

            &lt;span class="code-keyword"&gt;if&lt;/span&gt; (!MatchPasswordHash(loginModel.Password, user.Password, user.SaltPassword))
            {
                &lt;span class="code-keyword"&gt;return&lt;/span&gt; BadRequest(&lt;span class="code-string"&gt;"&lt;/span&gt;&lt;span class="code-string"&gt;Invalid credentials."&lt;/span&gt;);
            }
            &lt;span class="code-keyword"&gt;if&lt;/span&gt; (!user.IsActive)
            {
                &lt;span class="code-keyword"&gt;return&lt;/span&gt; StatusCode(&lt;span class="code-digit"&gt;403&lt;/span&gt;, &lt;span class="code-string"&gt;"&lt;/span&gt;&lt;span class="code-string"&gt;User is not active."&lt;/span&gt;);
            }
            &lt;span class="code-keyword"&gt;if&lt;/span&gt; (user.IsLocked)
            {
                DateTime setDate = (DateTime)user.LockUntil;
                DateTime current = DateTime.Now;
                &lt;span class="code-keyword"&gt;if&lt;/span&gt; (setDate &amp;gt; current)
                {
                    &lt;span class="code-keyword"&gt;return&lt;/span&gt; StatusCode(&lt;span class="code-digit"&gt;403&lt;/span&gt;, &lt;span class="code-string"&gt;"&lt;/span&gt;&lt;span class="code-string"&gt;User is restricted."&lt;/span&gt;);
                }
                &lt;span class="code-keyword"&gt;await&lt;/span&gt; _userService.UnsetUserLimits(user.UserId);
            }

            user.RoleRefNavigation = &lt;span class="code-keyword"&gt;await&lt;/span&gt; _sqlServerContext.Roles.FirstOrDefaultAsync(x =&amp;gt; x.RoleId == user.RoleRef);
            &lt;span class="code-keyword"&gt;string&lt;/span&gt; token = CreateToken(user);

            &lt;span class="code-keyword"&gt;var&lt;/span&gt; data = &lt;span class="code-keyword"&gt;new&lt;/span&gt;
            {
                tokenText = token,
                username = user.Username,
                userId = user.UserId.ToString(),
                name = user.Name,
                role = user.RoleRefNavigation.User_Role
            };

            &lt;span class="code-keyword"&gt;await&lt;/span&gt; _userService.RegisterLoginTime(user.UserId);

            &lt;span class="code-keyword"&gt;return&lt;/span&gt; Ok(data);
        }

        &lt;span class="code-keyword"&gt;private&lt;/span&gt; &lt;span class="code-keyword"&gt;string&lt;/span&gt; CreateToken(User user)
        {
            List&amp;lt;Claim&amp;gt; claims = &lt;span class="code-keyword"&gt;new&lt;/span&gt; List&amp;lt;Claim&amp;gt;()
            {
                &lt;span class="code-keyword"&gt;new&lt;/span&gt; Claim(ClaimTypes.NameIdentifier, user.Username),
                &lt;span class="code-keyword"&gt;new&lt;/span&gt; Claim(ClaimTypes.Role, user.RoleRefNavigation.User_Role),
                &lt;span class="code-keyword"&gt;new&lt;/span&gt; Claim(type: &lt;span class="code-string"&gt;"&lt;/span&gt;&lt;span class="code-string"&gt;UserId"&lt;/span&gt;, &lt;span class="code-sdkkeyword"&gt;value&lt;/span&gt;: user.UserId.ToString())
            };

            &lt;span class="code-keyword"&gt;var&lt;/span&gt; key = &lt;span class="code-keyword"&gt;new&lt;/span&gt; SymmetricSecurityKey(Encoding.UTF8.GetBytes(_configuration.GetSection(&lt;span class="code-string"&gt;"&lt;/span&gt;&lt;span class="code-string"&gt;Jwt:Key"&lt;/span&gt;).Value!));
            &lt;span class="code-keyword"&gt;var&lt;/span&gt; creds = &lt;span class="code-keyword"&gt;new&lt;/span&gt; SigningCredentials(key, SecurityAlgorithms.HmacSha512Signature);
            &lt;span class="code-keyword"&gt;var&lt;/span&gt; token = &lt;span class="code-keyword"&gt;new&lt;/span&gt; JwtSecurityToken(
                claims: claims,
                issuer: _configuration[&lt;span class="code-string"&gt;"&lt;/span&gt;&lt;span class="code-string"&gt;Jwt:Issuer"&lt;/span&gt;],
                audience: _configuration[&lt;span class="code-string"&gt;"&lt;/span&gt;&lt;span class="code-string"&gt;Jwt:Issuer"&lt;/span&gt;],
                expires: DateTime.Now.AddHours(&lt;span class="code-digit"&gt;8&lt;/span&gt;),
                signingCredentials: creds
                );

            &lt;span class="code-keyword"&gt;var&lt;/span&gt; jwt = &lt;span class="code-keyword"&gt;new&lt;/span&gt; JwtSecurityTokenHandler().WriteToken(token);

            &lt;span class="code-keyword"&gt;return&lt;/span&gt; jwt;
        }

        &lt;span class="code-keyword"&gt;private&lt;/span&gt; &lt;span class="code-keyword"&gt;bool&lt;/span&gt; MatchPasswordHash(&lt;span class="code-keyword"&gt;string&lt;/span&gt; passwordText, byte[] password, byte[] passwordKey)
        {
            &lt;span class="code-keyword"&gt;using&lt;/span&gt; (&lt;span class="code-keyword"&gt;var&lt;/span&gt; hmac = &lt;span class="code-keyword"&gt;new&lt;/span&gt; HMACSHA512(passwordKey))
            {
                &lt;span class="code-keyword"&gt;var&lt;/span&gt; passwordHash = hmac.ComputeHash(Encoding.UTF8.GetBytes(passwordText));

                &lt;span class="code-keyword"&gt;for&lt;/span&gt; (&lt;span class="code-keyword"&gt;int&lt;/span&gt; i = &lt;span class="code-digit"&gt;0&lt;/span&gt;; i &amp;lt; passwordHash.Length; i++)
                {
                    &lt;span class="code-keyword"&gt;if&lt;/span&gt; (passwordHash[i] != password[i])
                    {
                        &lt;span class="code-keyword"&gt;return&lt;/span&gt; &lt;span class="code-keyword"&gt;false&lt;/span&gt;;
                    }
                }
                &lt;span class="code-keyword"&gt;return&lt;/span&gt; &lt;span class="code-keyword"&gt;true&lt;/span&gt;;
            }
        }
    }&lt;/pre&gt;&lt;br /&gt;
&lt;br /&gt;
The problem is that when I check Context.User?.Claims.FirstOrDefault(x =&amp;gt; x.Type == ClaimTypes.NameIdentifier)?.Value; in SignalR hub, Context.UserIdentifier is always null. How can I fix this?</description>
      <author>Alex Wright 2022</author>
      <link>https://www.codeproject.com/Messages/5953269/Context-UserIdentifier-of-SignalR-is-always-null-w</link>
      <pubDate>Fri, 21 Jul 2023 13:45:00 GMT</pubDate>
      <guid>3_5953269</guid>
      <subject>ASP.NET</subject>
    </item>
    <item>
      <title>Is is possible to import an excel file with hyperlinks?</title>
      <description>I have an excel file with five (5) columns.&lt;br /&gt;
&lt;br /&gt;
All the records in the second column are hyperlinked.&lt;br /&gt;
&lt;br /&gt;
When I tried importing the file to SQL Server, the hyperlinks are gone.&lt;br /&gt;
&lt;br /&gt;
I have spent almost 4 days googling to see if there is a way to do import this excel file with hyperlink either to a SQL Server DB or asp.net application but to no avail.&lt;br /&gt;
&lt;br /&gt;
Wondering if any of you experts has an idea how to do solve this problem?&lt;br /&gt;
&lt;br /&gt;
Many thanks in advance.</description>
      <author>samflex</author>
      <link>https://www.codeproject.com/Messages/5952437/Is-is-possible-to-import-an-excel-file-with-hyperl</link>
      <pubDate>Mon, 17 Jul 2023 03:25:00 GMT</pubDate>
      <guid>3_5952437</guid>
      <subject>ASP.NET</subject>
    </item>
    <item>
      <title>Illustrating ad emails</title>
      <description>Hi guys&lt;br /&gt;
I am writing a tool for meeting management in my organization so I use ews managed api to call the exchange server&lt;br /&gt;
What I need to do is showing the ad user emails just like when you press to button in the outlook &lt;br /&gt;
Anyone can help me with this&lt;br /&gt;
&lt;div class="signature"&gt;Help people,so poeple can help you.&lt;/div&gt;</description>
      <author>Ali Al Omairi(Abu AlHassan)</author>
      <link>https://www.codeproject.com/Messages/5951472/Illustrating-ad-emails</link>
      <pubDate>Mon, 10 Jul 2023 12:35:00 GMT</pubDate>
      <guid>3_5951472</guid>
      <subject>ASP.NET</subject>
    </item>
  </channel>
</rss>