I haven't seen that in work, and have made myself some code that automaticly creates users and add them to a subscrtion. Mail me if you want the code at anders.hattestad(at)objectware.no
Not getting this to work.
Have set the subscription page to allow anonymous users and and changed in IIS to allow all users and all anonymous users.
Is there a step-by-step instruction to not get the login page mailed, but the actual content?! An impersonation of some kind?
The site is an intranet with MultiplexingMembershipProvider with ADProvider and EPiserverMembershipProvider.
Does the subscribers get emails but the links in the subscription mail shows the login window?
Hi Per. Correct!
Emails har sent but the mail shows a login page instead of the intended content. I guess the scheduler doesnt have sufficent/wrong user rights.
If you check the actual links in the email do they point to an actual page or the /util/login.aspx?
When the sceduling job processes the subscription it creates an Iprincipal of the current subscriber and gets all the roles for that user.
An accesscheck is then made on every possible change that should be sent out. So if you get mails sent they should be the actual links to the page.
If you then get the login page following the links in the subscription mail do the pages have Everyone set for read access?
No links in the email, just showing a login form. https://dl.dropbox.com/u/16789570/ScreenShot005.png
Im not able to find the scheduler that process the page.
The subscription page in EPi is set to allow Everyone and even Anonymous read access.
The subscriptionjob takes the profile.Username and creates a Iprincipal object that is used to check acess rights.
So when creating the profile for the subscriber (in your subscription page) the profile.name must be the username used when logging in.
If not all accesschecks will fail in the subscription job.
When the subscriptinjob is run it goes through all profiles in your database.
For each profile it gets all subscribed pages.
For each of the subscribed pages it tries to get all changed pages below (and here the access check is performed). So it's not enough for the user to be able to subscribe to pages. If they don't have access to the pages below they will not get any links in the mail.
If the current subscriber doesn't have read access no subscription link for the email will be created.
The subscription job is a scheduled plugin in the EPiServer.Personalization namespace. I have a very custom subscription so I have modifed both the subsription job and the handler that creates the actual mail.
No, not finding this at all.
Must a override be done to get this work?
Lacking some documentation about this...
The subscription functionality is located in EPiServer.dll in the EPiServer.Personalization namespace.
If you wan't to modify that stuff you need do your own version. If you don't have reflector you need to get it. Then you can check how EPiServers implementation is done.
Ok debugged some now.
It gets the story from url: /Templates/Emails/SubscriptionUpdate.aspx?id=100&epslanguage=sv&story=37
When I navigate to the address I see it of course. https://dl.dropbox.com/u/16789570/prenumeration.png
only here it breaks
HttpWebRequest request = (HttpWebRequest)WebRequest.Create(url);
request.Timeout = 10000;
HttpWebResponse response = (HttpWebResponse)request.GetResponse();// << breaks here
StreamReader responseStream = new StreamReader(response.GetResponseStream(), Encoding.UTF8);
string html = responseStream.ReadToEnd();
a basepage:
protected override void OnInit(EventArgs e)
{
if (CurrentUser == null) //<< CurrentUser is null
throw new AccessDeniedException();
if (Header != null)
Header.Title = GetDisplayName(CurrentPage);
base.OnInit(e);
}
So on the request part, how do i impersonate user in code?
Hi
Is there anyway of using the episerver subscription module without the user having to log in. I was considering users being able to add there email address to a subscription table but my problem is getting the pages that have been added or changed in order to send the notification to the email addresses specified.
Louise