# Okta in an ASP.NET Webform application

**URL:** <https://devforum.okta.com/t/okta-in-an-asp-net-webform-application/20600>\
**Category:** Questions\
**Created:** [May 11, 2022, 6:42pm UTC](https://devforum.okta.com/t/okta-in-an-asp-net-webform-application/20600 "2022-05-11T18:42:24Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![elcorzo75](https://avatars.discourse-cdn.com/v4/letter/e/df788c/32.png) [@elcorzo75](https://devforum.okta.com/u/elcorzo75)\
**Post date:** [May 11, 2022, 6:42pm UTC](https://devforum.okta.com/t/okta-in-an-asp-net-webform-application/20600/1 "2022-05-11T18:42:24Z")

</div>

I am trying to implement Okta in an [ASP.NET](http://ASP.NET) Webform application, I use the example: ([Secure Your ASP.NET Web Forms Application with OpenID Connect and Okta | Okta Developer](https://developer.okta.com/blog/2018/08/29/secure-webforms-with-openidconnect-okta)) , but when I run it it does not call the OKTA validation screen, it goes directly to the page that I put as a test on my Web ([https://www.mysite.com/main.aspx](https://www.mysite.com/main.aspx)), when I run the debug Request.IsAuthenticated = false, for which I should be directed to OKTA to validate myself, someone who can guide me.

---

<div class="post-metadata">

**Author:** ![erik](https://avatars.discourse-cdn.com/v4/letter/e/b5ac83/32.png) [@erik](https://devforum.okta.com/u/erik)\
**Post date:** [May 12, 2022, 5:01am UTC](https://devforum.okta.com/t/okta-in-an-asp-net-webform-application/20600/2 "2022-05-12T05:01:37Z")

</div>

Hello,  
I suggest running the Webform samples from,

> **[GitHub - okta/samples-aspnet-webforms: Okta + ASP.NET Web Forms](https://github.com/okta/samples-aspnet-webforms)**
>
> Okta + ASP.NET Web Forms. Contribute to okta/samples-aspnet-webforms development by creating an account on GitHub.

There is a Okta hosted login and a Self hosted login sample.

---

<div class="post-metadata">

**Author:** ![elcorzo75](https://avatars.discourse-cdn.com/v4/letter/e/df788c/32.png) [@elcorzo75](https://devforum.okta.com/u/elcorzo75)\
**Post date:** [May 12, 2022, 4:46pm UTC](https://devforum.okta.com/t/okta-in-an-asp-net-webform-application/20600/3 "2022-05-12T16:46:34Z")

</div>

I already did it and it runs fine, but how did you send the email and username to a session variable?

---

<div class="post-metadata">

**Author:** ![elcorzo75](https://avatars.discourse-cdn.com/v4/letter/e/df788c/32.png) [@elcorzo75](https://devforum.okta.com/u/elcorzo75)\
**Post date:** [May 12, 2022, 4:52pm UTC](https://devforum.okta.com/t/okta-in-an-asp-net-webform-application/20600/4 "2022-05-12T16:52:53Z")

</div>

with OpenID Connect, using [GitHub - okta/samples-aspnet-webforms: Okta + ASP.NET Web Forms](https://github.com/okta/samples-aspnet-webforms)

---

<div class="post-metadata">

**Author:** ![andrea](https://sea1.discourse-cdn.com/oktadev/user_avatar/devforum.okta.com/andrea/32/2172_2.png) [@andrea](https://devforum.okta.com/u/andrea)\
**Post date:** [February 12, 2024, 7:32pm UTC](https://devforum.okta.com/t/okta-in-an-asp-net-webform-application/20600/5 "2024-02-12T19:32:54Z")

</div>

Closed on February 12, 2024, 7:32pm UTC


