Ir al contenido principal

Dealing with MOSS Session State

In the code for an SharePoint application page i'm getting NULL for HttpContext.Current.Session;
so I'm looking for information related to why this is happening.
Until now only found these blogs with information related to state and SharePoint:

Enabling Session State in SharePoint 2007 I first thought this was my problem but from this book (chapter 7: Database Security for SQL Session State), found that the session state tables live in my SharePoint services provider database (default created: SharedServices1_DB) and also found this blog(it fixes other issue with session state) about how to extract the sql script from command aspnet_regsql.exe

aspnet_regsql -sstype c –d [YOUR SSP DB NAME] -sqlexportonly fix.sql –ssadd

in my case

aspnet_regsql -S vpc03 -sstype c –d SharedServices1_DB -sqlexportonly fix.sql –ssadd

Note: i added the -S paramenter to specify my server name "vpc03".

Unfortunately I'm still stuck with Session NULL :(

Here was posted how to enable the session state in web.config of SharePoint application; only need to review this tag:

page enableSessionState="true"

Comentarios

Entradas populares de este blog

GNUstep ProjectCenter/Gorm/AClock running Ubuntu 10.04

Download sources GNUstep (stable or unstable) to compile; Dependencies First you need to check dependencies in ubuntu and install with sudo apt-get or search before with apt-cache command; almost every package ends with *-dev in ubuntu repositories this command will install all dependencies for compile: ~$ sudo apt-get install libffi-dev libssl-dev libxml2-dev libxslt1-dev libcairo2-dev libxt-dev GNUstep Make compiling GNUstep make is our first target; it's the primary package to compile GNUstep applications. get the package, untar and change into the folder and compile: ~$wget ftp://ftp.gnustep.org/pub/gnustep/core/gnustep-make-2.4.0.tar.gz ~$tar xzvf gnustep-make-2.4.0.tar.gz ~$cd gnustep-make-2.4.0/ ~$./configure --prefix=/usr/local/GNUstep/ --enable-native-objc-exceptions ~$make ~$sudo make -E install *NOTE: the options /usr/local/GNUstep/ is the folder where all the GNUstep is going to install. the second option --enable-native-objc-exceptions enable th...

Changing Background GWorkspace

GWorkspace application in GNUstep, is like the equivalent to Nautilus under GNOME. It has interesting features that I'm beginning to love, right now I believe GNUstep is for UNIX-geek-old-fashioned. Here is the screenshot for changing the background image, you need to go to Info->Preferences->Desktop (drop down) then click Choose button for search the image. I'm running GNUstep compiled in Ubuntu 10.04 and the image comes from the folder / usr/share/backgrounds/ Another really cute functionality of GWorkspace is start applications from their installation folder, you need to open the viewer from menu View->Viewer and go to the installation application folder (in my case compiled from sources: /usr/local/lib/GNUstep/Applications ) then a double-click starts the application (*.app)

meta:progid

The meta:progid attribute on the Page directive is necessary if the page will ever be opened in SharePoint Designer. You should include this as site pages are supposed to support customization and thus, be opened in SharePoint Designer. If you don't want to allow pages to be opened and customized in SharePoint Designer, then you should do that through permissions, not at the page level. Using ASP.NET 2.0 Code Behind Files in SharePoint v3 Sites SPFile.ProgID gets a string that identifies the application in which the file was created. That's all the meta:progid is about. It's a identifier for SharePoint and you probably should not use other attributes, they might cause run-time error. Ref: msdn forum thread explanation