Running DNN v 6.2.3 (141)
I wrote a MVC controller inheriting from DnnController with an action method that takes two parameters, including a portalID per other discussions I have read.
Here is the chrome developer tool request/response log.
-
-
-
- Request Headersview source
-
-
-
-
-
-
-
-
-
-
-
-
-
- Request Payload
-
- Response Headersview source
-
-
-
-
-
-
-
-
-
-
-
-
-
-
My understanding is that by putting portalID into the URL of the AJAX post, the DNN runtime should not think I am changing portal. But as the request/response above shows, I am passing in the current portalID of the referrer, and the DNN forms auth cookie is still being removed.
I am using a Razor script to make the call, using the DNN controller framework to get the current portalID:
Here is a snipper:
@{
String p = "";
DotNetNuke.Entities.Users.UserInfo u = DotNetNuke.Entities.Users.UserController.GetCurrentUserInfo();
Boolean anon = (!String.IsNullOrEmpty(u.Username) && u.PortalID >= 0 && this.Context.Request.Cookies[FormsAuthentication.FormsCookieName] != null);
....
<script type="text/javascript">
$(document).ready(function () {
// initialize menu
$(function () {
$.ajax({
url: '@url',
type: 'POST',
data: {
portalID: @u.PortalID,
where I actually use the current user's portalID to pass to the method detailed in the request/response information above.
BTW, I have tried doing this with a POST (as above) and as a GET, with the same results. Ultimately, the service method is defining cookies in the response stream to enable SSO with an external system that already has SSO.
I appreciate any help.
Kyle