Need Help Authentication loses HttpContext??

We have both a custom data extension and a custom authentication extension for Reporting Services 2000.
Reports with one dataset work great, but reports with more than one dataset fail because the Authentication extension call GetUserInfo no longer has an HttpContext when the second dataset calls into it.
I've seen several people post this same problem on other forums but no answers. Documentation of an msdn article states "the security extension will always be loaded in the Report Server app domain" so I don't understand how we could lose the context.
Additionally, ALL samples of an authentication extension I've looked at have GetUserInfo coded the same way:
Code Snippet
Public Sub GetUserInfo(ByRef userIdentity As System.Security.Principal.IIdentity, ByRef userId As System.IntPtr) Implements Microsoft.ReportingServices.Interfaces.IAuthenticationExtension.GetUserInfo
If Not System.Web.HttpContext.Current Is Nothing _
AndAlso Not System.Web.HttpContext.Current.User Is Nothing Then
userIdentity = System.Web.HttpContext.Current.User.Identity
Else
userIdentity =
Nothing
End If
userId = IntPtr.Zero
End Sub
Any help or insights would be GREATLY appreciated - thanks, Ken.

OK, Wanted to share what I have found after opening a ticket with MS.
What we wanted to accomplish:
To dynamically change our connection string per userID so we could hit multiple instances of the same database structure. We did this by using the UserID stored in the HTTPContext. However, multiple datasets in a report caused Reportings Services to spawn new threads to access the data and RS did not persist the HTTPContext to these threads.
The GetUserInfo problem was a red herring- this did indeed always have access to the HTTPContext which was part of our Authentication extension. The Data extension was the real problem as we didn't have the HTTPContext during creation of our Connection object. What we found out from MS is that Reporting Services doesn't guarantee calls to be made on the asp.net worker thread and indeed in some instances even reports with one dataset failed.
Workaround:
Reports build with RS have access to a global variable UserID - this is actually retrieved from either WindowsIndentity or FormsIdentity based on authentication. Thus I added a report parameter UserID with a non-queried default value of =User!UserID to each report, and then created a parameter @UserID for every dataset with the value of =Parameters!UserID.Value.
In the connection object if I don't have my HTTPContext, I default to a known database so the code doesn't fail. Then in the Command object's execute reader, I loop through the parameters until I find @UserID. I now can recreate my connection object based on the UserID and set this connection as my Command's connection and return the datareader from the correct database. I make sure the connection is closed by always specifying the CloseConnection behavior during the datareader creation.
Whew!!! A bit cheesy, but it is allowing us to do what we need. Hopefully this will help anyone else that needs it.

Similar Messages

  • I need help authenticating my outgoing server settings in setting up my work email on my Galaxy S5.  It says unable to authenticate or connect to server and I even called helpdesk at my email support and they tried every possible port (80, 25, 3535 or 465

    I need help authenticating my outgoing server settings in setting up my work email on my Galaxy S5.  It says unable to authenticate or connect to server and I even called helpdesk at my email support and they tried every possible port (80, 25, 3535 or 465 SSL) and none of them work. Please help!

    You will need to get the required info to create/access the account with an email client from your school.
    Are you currently accessing the account with an email client on your computer - if you have a Mac with the Mail.app, or if you have a PC with Outlook Express, etc.? If so, you can get the required account settings there.

  • Really need help: authenticating via iPlanet Directory LDAP

    ok. I've created my security realm provider with the iplanetAuthenticator. Now,
    how do I protect a directory in my ear file and how do I password protect a /servlet/
    that I have with a login and password? Do I need to modify my web.xml? If so,
    does anyone have any samples I can take a look at?
    The docs aren't also clear on the user I must setup in the ldap directory and
    how that works...Can someone help?

    the samples has a sample on how to setup security
    or you can use console to setup security on specific resources in your case
    urls.
    -kiran
    "Franko" <[email protected]> wrote in message
    news:3f79f5e1$[email protected]..
    >
    ok. I've created my security realm provider with the iplanetAuthenticator.Now,
    how do I protect a directory in my ear file and how do I password protecta /servlet/
    that I have with a login and password? Do I need to modify my web.xml? Ifso,
    does anyone have any samples I can take a look at?
    The docs aren't also clear on the user I must setup in the ldap directoryand
    how that works...Can someone help?

  • Need help authenticating to smb server

    I'm running a Linux machine at work with a samba share. My home user is Tom but the user on the smb share is tom. This creates a problem in being able to alter a document...I think. I notice that everything is labeled user Tom went it is mounted...when it should be tom.
    Is this why I can't change documents (meaning make correction within a document then try to save it) on my share? If so, is there a work around?
    Thanks,
    tom

    Thanks Don for the confirmation. I kind of thought that too. But if I change my home system, isn't that going to mess up my local files or will they change too when I change my user? Also, having never needing to do this before, how do I change my user on 10.4.8? Is this going to mess up my keychain or any GPG items?
    Thanks,
    Tom

  • Need Help -- Authentication without form

    Hi,
    I would connect to SGD by typing an url like what i do to connect to an application for example http://server/sgd/launcher.jsp?u=root&p=xxxxxxx&o=gnome-edit , but i didnt find a solution
    So can you help me?
    Thanks

    I have some questions about the java file .
    C:\\MyTCC C:\\MyTCC\\file.prt \???
    <TCC Location>: what is it? how can i find it????
    <Port File> same question
    Also i tryied to only authenticate via java code but i had many exceptions, the script was:
            IServiceLocator locator = new ServiceLocator("http://xxx.yyyy.com/");
            SessionBean session = new SessionBean(locator);
            try
                // Authenticate the session.
                session.authenticate("root", "xxxxxxx", "qwe", "en");
           }and the exception:
    Exception in thread "main" java.lang.NoClassDefFoundError: org/apache/axis/encoding/SerializerFactory
            at com.tarantella.tta.webservices.client.apis.apache.ServiceLocator.getWebtopSession(ServiceLocator.java:347)
            at com.tarantella.tta.webservices.client.apis.apache.ServiceLocator.getWebtopSession(ServiceLocator.java:334)
            at com.tarantella.tta.webservices.client.views.SessionBean.authenticate(SessionBean.java:201)
            at javaapplication4.test.main(test.java:37)
    Caused by: java.lang.ClassNotFoundException: org.apache.axis.encoding.SerializerFactory
            at java.net.URLClassLoader$1.run(URLClassLoader.java:202)
            at java.security.AccessController.doPrivileged(Native Method)
            at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
            at java.lang.ClassLoader.loadClass(ClassLoader.java:307)
            at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
            at java.lang.ClassLoader.loadClass(ClassLoader.java:248)
            ... 4 more
    Java Result: 1Edited by: Ben_midou on Jun 2, 2010 2:56 AM

  • Need help authenticating

    I've worked through some beginning exercises just fine, but started again and can't get going.  I have the application below, and when I debug I get no messages, neither success nor failure information in the console.  I can't see a typo, and everything is compiling fine.
    I can verify the account and room name.
    Any hints would be greatly appreciated.  Must be a typo, but I can't see it.
    Thanks-
    Matt
    PS-Not worried about showing credentials as this is just a testing account.
    ?xml version="1.0" encoding="utf-8"?>
    <s:Application xmlns:fx="http://ns.adobe.com/mxml/2009"
        xmlns:s="library://ns.adobe.com/flex/spark"
        xmlns:mx="library://ns.adobe.com/flex/mx"
        minWidth="955"
        minHeight="600"
        xmlns:rtc="http://ns.adobe.com/rtc">
        <fx:Declarations>
            <!-- Place non-visual elements (e.g., services, value objects) here -->
            <rtc:ConnectSessionContainer width="100%"
                height="100%"
                roomURL="https://collaboration.adobelivecycle.com/lcsf/lcsf100">
                <rtc:authenticator>
                    <rtc:AdobeHSAuthenticator userName="[email protected]"
                        password="lcsflcsf"/>
                </rtc:authenticator>
            </rtc:ConnectSessionContainer>
        </fx:Declarations>
    </s:Application>

    Hi there,
    Take your ConnectSessionContainer and put it in the body of the app, rather
    than the declarations, and this code should work. (CSC is a container, like
    a Canvas, so it's really a UI component).
      nigel

  • Need help - nano loses bookmarked place in long mp3

    I have had a nano for a few weeks and just recently have come upon this problem. i play long mp3 (45-50 min length) lectures. often i will pause in the middle of them. when i start back, the nano starts in a different place than i left off, usually somewhere in the beginning of the track. this happens whether i turn off the nano in between or leave it on.
    has anyone else had this problem or does anyone have a solution for it? thanks!

    I have had a nano for a few weeks and just recently have come upon this problem. i play long mp3 (45-50 min length) lectures. often i will pause in the middle of them. when i start back, the nano starts in a different place than i left off, usually somewhere in the beginning of the track. this happens whether i turn off the nano in between or leave it on.
    has anyone else had this problem or does anyone have a solution for it? thanks!

  • My daughter has spitefully changed my password and has refused to tell me. I have so much medical information that I can not lose. Is there anyway to get around this problem. Please I need Help fast.

    My daughter has spitefully changed my password and has refused to tell me. I have so much medical information that I can not lose. Is there anyway to get around this problem. Please I need Help fast.

    Connect the iPod to your syncing computer and restore it via iTunes.  However, if iTunes asks for the unknown passcode you need to place the iPod in recovery mode and then restore the iPod from backup.  For recovey mode see:
    iPhone and iPod touch: Unable to update or restore
    "If you cannot remember the passcode, you will need to restore your device using the computer with which you last synced it. This allows you to reset your passcode and resync the data from the device (or restore from a backup). If you restore on a different computer that was never synced with the device, you will be able to unlock the device for use and remove the passcode, but your data will not be present. Refer to Updating and restoring iPhone and iPod touch software."
    Above is from:
    http://support.apple.com/kb/ht1212

  • My ipod touch is in DFU mode 5g I need help, do not want to lose my data, please help in Spanish

    I need help, do not want to lose my data, PLEASE HELP IN SPANISH

    Una vez que el dispositivo está pidiendo ser restaurado con iTunes ... ya es demasiado tarde para salvar nada ... y usted debe continuar con la recuperación de ...
    Vea aquí> http://support.apple.com/kb/HT1808
    Es posible que tenga que probar más de una vez ... Asegúrese de seguir todos los pasos ...
    Tómese su tiempo ... Preste especial atención a los pasos 3 y 4.
    Para minimizar la pérdida ...
    Después de haber recuperado su dispositivo ...
    Re-sincronizar su contenido o restauración de la última copia de seguridad ...
    Restaurar desde copia de seguridad> http://support.apple.com/kb/ht1766
    Once the Device is asking to be Restored with iTunes... it is too late to save anything... and you must continue with the Recovery...
    See Here  >  http://support.apple.com/kb/HT1808
    You may need to try this More than Once...  Be sure to Follow ALL the Steps...
    Take your time... Pay particular attention to Steps 3 and 4.
    To minimise loss...
    After you have Recovered your Device...
    Re-Sync your Content or Restore from the most recent Backup...
    Restore from Backup  >  http://support.apple.com/kb/ht1766

  • Help needed on Authentication...

    Hiii folks...
    I need help in doing an authentication on the oc4j container(10g) using a database with user credentials...
    Thanx..
    vijay

    It looks like the header variable (XXX_REMOTE_USER or whatever you're using) is not getting passed, so that the SSO login page appears. Given that the Basic over LDAP scheme works (I'm assuming that you simply switch schemes in the OAM Policy Domain to verify this?) the only thing I can think of is that you are setting the header variable in the authentication actions only. If this is the case, please try adding the header variable also to the Authorisation Success actions in the Policy Domain that protects /sso/auth/ and see if that makes a difference.
    Regards,
    Colin

  • How do I preserve the embedded hyperlinks when printing to .pdf?   I am using Acrobat Pro XI for Mac, and when I export to .pdf the existing hyperlinks lose functionality.   I assume it's just the flick of the right button – I just need help finding that

    How do I preserve the embedded hyperlinks when printing to .pdf? 
    I am using Acrobat Pro XI for Mac, and when I export to .pdf the existing hyperlinks lose functionality.   I assume it’s just the flick of the right button – I just need help finding that button. 
    Can you help?  Thanks!

    How:  MS Word to .pdf by Command P, hitting the PDF button, and then the button for "save as Adobe pdf"
    I didn't have this problem at all on prior versions of Adobe on my PC.   This isn't a Mac attack, is it?

  • Need help big time. I need to change my apple ID but the original email address I set it up under is no longer used so i can't get my proper password sent to me. I don't want to set up a new account and lose all my old apps I have purchased.

    need help.  Before I set up my I-pad i need to regain access to my I-Tunes account, easy enough. The problem is I cannot re-set password.  I have tried to re-set and send to my designated email but it does not work. How can i get someone from Apple on the phone to help?

    Have you forgotten your password? - if so, you have a problem if the email address has gone dead.
    If you know your password, go to the iTunes Store, click on Account. log in and you can change the associated email address.
    If you don't know your password, and have no email address, you are going to have problems because it's difficult to see how Apple are going to identify you as the authorised owner of the account. Contact iTunes Support: go to http://www.apple.com/support/itunes/ - click on 'Other iTunes Store Features' in the list and then on 'Podcasts'. You will see a link to either 'Express Lane', which will guide you eventually to some contact options, or you may see a link to email them.

  • Need some help in Los Angeles

    working on a music video that needs some help. I own Final Cut and Color. Done the edit and it looks great but it needs help polishing and I have no idea what to do. Planning on showing the video this friday night in hollywood and I want it to blow people away. Is there anyone in the area would be willing to help? Please contact me ASAP. Thanks Ray

    if you can give me a call that would be best, I can tell you what I need to accomplish. Thanks
    818 935 5079

  • My iPhone 4S randomly loses contacts, even if I have re-entered them into the phone. Tonight 12 of the contacts I text to are no longer in my address book. Their text window just shows their phone number. I need help.

    I need help with this problem, is there a solution?

    Mine continue to do the same thing. I have stopped my contacts from syncing with icloud (not that they were anyways) and re-entered a bunch. 5 minutes later some are missing phone numbers or are completely missing altogether. What is causing this and how can I stop it??

  • Disk utility can't repair disk, back up and restore files......I need help, I'm worried I'll lose all my photos, files etc

    Mac started hanging up while streamlining a kids show. Restarted and got the screen with the apple and the circle. restarted with control-option p and r. Ran disk repairitem got the following results;
    invalid index key,
    it rebuilds catalog b-tree,
    volume repair complete,
    updating boot support partitions for the volume as required,
    Error disk utility can't repair disk
    I'm then prompted to back up all files, reformat the disk and restore backed up files.
    Obviously need help here as I think I'm in danger of losing my files, photos etc if I don't do this right.
    Can anyone help
    Steve

    You might want to back up the disk as soon as possible, do the repair, then back it up again. First time will have the issues that Disk Utility can't fix, however, you'll have the data saved.  Then, once you get things repaired, make a new backup, and go from there.
    If you're going to use a hard drive directly connected to your iMac for backup, this is what I mentioned earlier: http://twelvesouth.com/products/backpack/ Great way to use space behind the iMac without adding something else to the desk top. You can buy it through Apple online/stores or Amazon, and there are probably other sources too.
    For external hard drives, I like those sold by OWC at http://eshop.macsales.com/shop/firewire/ as many of them use Oxford chip sets, wihch work well with macs (I've used several for years with no issues). Most pre-packaged drive/cases have a 3 year warranty, although you can buy a case and add your own hard drive. I like Western Digital Scorpio Blacks that have a 5 year warranty.

Maybe you are looking for

  • Can't view LR metadata modifications on Windows Explorer? What gives?

    Hi all, This is my first question to the community, I searched for the answer to this problem here and elsewhere but not able to find out why, hope you can help. I'm coming to grips with managing data in LR but I've stumbled upon a snag. I'm using LR

  • Replacing Shipment Pending.   How long does it normally take for it to be shipped?

    The website says one week, from when they received it. But I was told something different when I called in (was told 10 bus days)  I have been told by a friend that Apple will NOT ship a replacement phone back until they have one available that is th

  • How to unlock the scroll in touch pad hp dv6

    It get locked time to time the scroll which is on the touch pad in laptop HP pavillion dv6000. Pls. help me to sort this out.

  • Problem with Dreamweaver 8

    I'm having a problem with Dreamweaver 8. I installed it earlier and worked just fine, but then since I've shut down and restarted my computer dreamweaver will not open. It will come up with the loading screen, and then automatically closed. I can't g

  • Can I use my old iPhone AC Adapter with my new iPad mini

    Just bough myself a new mini retina but was wondering if I could use my old iPhone 4 AC power adapter with it i.e. plug the new lightining to USB to AC Adapter. The iPad's power adapter is a bit bulky and anything so I don't end up taking a hundred p