.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Top 5 Contributors of the Month
Post New Web Links

SessionState works in VWD 2010 Debug, IIS 5.1 but not on WS2008 (IIS7.5)

Posted By:      Posted Date: September 08, 2010    Points: 0   Category :ASP.Net
Hi,I'm building a site using the .NET 4 framework using routing and MasterPages.Because I'm using both routing and MasterPages, I can't see any way how to get value from control on the previous page. To solve this I've used the code behind to store the control's value in a session variable. Is there a way to retrieve a value from a control using PreviousPage or something when using Routing and MasterPages?This works fine in VWD debug mode and in IIS 5.1, but when I try to deploy it on my Windows Server 2008 (IIS7.5) machine, it get this error:Session state can only be used when enableSessionState is set to true, either in a configuration file or in the Page directive. Please also make sure that System.Web.SessionStateModule or a custom session state module is included in the <configuration>\<system.web>\<httpModules> section in the application configuration.Here is a copy of my web.config file:<configuration> <appSettings></appSettings> <system.webServer> <handlers></handlers> <modules> <remove name="UrlRoutingModule-4.0"/> <add name="UrlRoutingModule-4.0" type="System.Web.Routing.UrlRoutingModule" preCondition=""/> </modules> </system.webServer> <connectionStrings> </connectionStrings> <system.web>

View Complete Post

More Related Resource Links

Extreme ASP.NET: Search Engine Optimization with ASP.NET 4.0, Visual Studio 2010 and IIS7


In this article, the author takes a look at SEO practices that the reader can apply when using the latest Microsoft Web technologies.

Scott Allen

MSDN Magazine September 2009

Visual Studio 2010, MVC2.0, IIS7, .NET4 deployment problem

I have a problem where I can get an MVC2.0 application using .NET3.5 running in IIS, but when I upgrade it to .NET4.0, the browser just reports error 500 Internal Server Error. The problem is easy to replicate as follows.  Firstly, to show it works with .NET3.5: Create a new MVC2.0 application in Visual Studio 2010, using the inbuilt starter template. Run the application using the development server, and the Home & About pages display fine. Publish the application to a directory. Copy the directory to a subdirectory under inetpub/wwwroot on my Vista computer, running IIS7 Create a new application in IIS Manager & select the DefaultAppPool (integrated pipeline) Browse the application and Home & About pages are displayed. Then the problem I have is after upgrading to .NET4.0: Change to .NET4.0 for the project in Visual Studio Build & this runs fine with the development server. Publish the application & set up IIS as before, except choosing the application pool ASP.NET v4.0 (integrated pipeline) Browse the application, and I get the 500 Internal Server Error I'm guessing there is some extra configuration required - can anyone help? I've deliberately used the default MVC installation to eliminate any variables caused by my programming .. Thanks in advance, Steve

SharePoint 2010 AD FS 2.0 Integration - login works then fails, looping back to the adfs server

Hello, I setup SharePoint 2010 Claims auth with AD FS 2.0 following this post: http://blogs.technet.com/b/speschka/archive/2010/07/30/configuring-sharepoint-2010-and-adfs-v2-end-to-end.aspx.  I have no access to the ADFS server, but I think they followed the steps as outlined.  If I do an iisreset (or just recycle the app pool of the SharePoint site) I can login successfully using the remote credentials.  Also I can under security in SharePoint search for and find users and roles from the remote ADFS server. If I close my browser, open a new browser and go to the site I am prompted to login again (this is fine).  I do, using the same credentials, and the login fails because I am redirected between the SP and ADFS servers until the ADFS server stops the redirecting.  I have been doing some digging and I found this post: http://blogs.technet.com/b/speschka/archive/2010/08/09/setting-the-login-token-expiration-correctly-for-sharepoint-2010-saml-claims-users.aspx, which describes the situation I have in point # 3 at the bottom.  I have tried setting the token time out as low as 1 second but this hasn't helped. I have also, just to see, tried setting all the other lifetime settings to 1 second - but no luck.  Because the initial login works I think the setup is correct, but something is maintaining some state that is causing the loop

How to debug silverlight webpart in sharepoint 2010.?

Can i debug the zap in sharepoint.?

Query crashes in MSAccess 2007 and 2010 on Windows 7 64bit, but works on 32 bit

Hello. I have a prepared a Database that contains 2 tables, and a Query. If you execte the query (Just a very simple join with a few where statments) Windows 7 crashes in 64 bit, but not on a 32 bit platform. Unfortunatly the Database has 300MB and is to big to be uploaded here. So if there is anyone interested at MS to get my Database, please feel free to contact me serge.dornseiffer@sdna.lu

Visual Studio 2010 & IIS7 / ASP 4.0

Hi,I recently upgraded from Visual Studio 2008 to the new 2010, after it had installed I opened a local website to begin working on it, it asked me if I wanted to update the web.config file to the new ASP version 4.0 - I clicked yes.After this I receive a server error'd regarding the ASP version 4.0 - any ideas?Thanks.

2010 Metadata Publishing not works as expected

When enabling Metadata Publishing in library settings, used terms that come from managed metadata or enterprise keyword columns should also be published as social tags and used tags should be available on mysite, e.g. in activity list. But that is not the case in my installations. If I link to a used tag, e.g. /tagprofile.aspx?termid=27a8997d-4459-4bae-ad76-bdb2e249fced the tag is found on the tag profile and displayed with name and source (e.g. some taxonomy). But the list of marked items, that used the tag in last days, remains empty. Also the search for all items that are tagged with this term delivers no results. I know that there is security trimming, but I'm the owner of these documents, so this should not be the reason. How to display these taged documents on mysite automatically? For pure social tagging (e.g. by using tags & notes neear like it) it works, but not in case of metadata publishing. Any ideas? Any documentation? That would be great. Thanks in advance, SharePointFrank http://www.layer2.de/en/products/pages/knowledge-management-suite-sharepoint-2010.aspx  

Reg: Does Custom site definition created in SharePoint 2007 works in Sharepoint 2010



If one has created a custom site definition in sharepoint 2007, Once the whole site is migrated to sharePoint 2010 will that "custom site definition" created in 2007 will work without breaking in SharePoint 2010?

If No, what has to be done to make it work on 2010.






Remote Debug an XBAP application in VS 2010



I have an XBAP application that I created in VS 2010.  On my local machine I browse to the XBAP on the hosting server, via the folder structure [UNC] and run it.  The application does load and start.  I then go to "Attach to Process" in VS 2010 and browse to the server [which has msvsmon.exe running], but I cannot see the process to attach to.  I can debug ASP.NET applications remotely with no issues.  What am I doing wrong?

Thanks in advance

VB Express 2010 missing Debug files


When I save all, some of the files in Debug are not being built.  .exe, .pdb, vs.host.exe, xml.   Because of this when I

launch the program, it will not Debug.  Help?



Upload Multiple: Works on some machines, not others. An Office 2010 thing? No? What's up?



We've received some feedback that Upload Multiple Files only works on some machines, for some people, and not on/for others. Tracking down this challenge, it seems that machines with Office 2010 have components that allow the Upload Multiple functionality to work, as machines with Office 2007 and prior are not working with Upload Multiple.

EDIT:  Multiple Upload works SOMETIMES on Non-Office 2010 machines with the following interface: http://img100.imageshack.us/i/muv2.jpg/  and ALWAYS on Office 2010-equipped machines with this interface: http://img819.imageshack.us/i/muv1.jpg/

This thread: http://social.technet.microsoft.com/Forums/en-US/sharepoint2010setup/thread/2decb33d-9e66-408c-b010-701b2fb4269f  may confirm my suspicion, but the relevant post is vaguely worded (doesn't specify office versions) and so it's hard to tell for sure.

Can someone please confirm, or suggest what else might potentially be going wrong?



Can VS2008 application works on machine only having vs 2010


Hi friends,

Can VS2008 developed application works on machine only having vs 2010?


Nagarajan Govindarajan.

Why is the VS 2010 debugger popping up when I'm trying to debug a VS 2008 app?


I'm trying to debug an ASP.NET 3.5 app, which I've recently migrated from VS 2005.  (This uses Crystal Reports 11 R 2, but I don't know if that comes into what's causing me problems, or not.)  This app uses AD for authentication.  I'll have the app opened in VS 2008, and then press the F5 key to start debugging.  Shortly after that VS 2010's Just-In-Time debugger pops up and asked me if I want to (a) debug w3wp.exe, of (b) cancel debugging.

Huh?  Why is VS 2010 coming up at all?  I don't have it running.  I'm not in it.  I didn't press F5 in VS 2010.  I am in VS 2008 and press Run/Debug there.  What's going on; why is VS 2010 interferring? 

username() function in InfoPath 2010 returns blank when used by FBA authenticated user. works fine f


username() function in InfoPath 2010 returns blank when used by FBA authenticated user. works fine for Windows

What gives?? I *REALLY* do need to get this working!


Code that works in WebDAV does not work when deployed to IIS7



I have been working on a solution that:

1. Connects to a Lotus Domino server to retrieve data from the .nsf file

2. Uses NotesSQL Driver 8.0 (I've tried both System DSN and ConnectionString method)

3. When I view the page using VS 2008 own's WebDAV to test run, it works flawlessly.  Database can be connected and so Data was retrieved successfully. 

However, when I deployed the website to IIS 7, it gives me problem:

Following is the stacktrace from the Event Viewer entry:

Log Name:   Application
Source:    ASP.NET 2.0.50727.0
Date:     02/11/2010 5:04:07 PM
Event ID:   1309
Task Category: Web Event
Level:     Warning
Keywords:   Classic
User:     N/A
Computer:   KITWILLIAM.naim.com
Event code: 3005
Event message: An unhandled exception has occurred.
Event time: 02/11/2010 5:04:07 PM
Event time (UTC): 02/11/2010 9:04:07 AM
Event ID: 0ec2d703a5884f92be87faf06f746c00
Event sequence: 4
Event occurrence: 1
Event detail code: 0
Application information:
  Application domain: /LM/W3SVC/1/ROOT/Resrc-4-129331622441589373
  Trust level: Full
  Application Virtual Path: /Resrc
  Application Path: C:\inetpub\wwwroot\Resrc\
  Machine name: KITWILLIAM
Process information:
  Process ID: 2644
  Process name: w3wp.exe
  Account name: NT AUT

Using CONTAINS predicate with asterisk alone no longer works on SharePoint 2010


This Enterprise Search SQL would work on MOSS 2007

FROM scope()
WHERE ( ("SCOPE" = 'People') )
AND CONTAINS(JobTitle ,'"*"')  // note the asterisk alone

But it fails in SharePoint 2010 with the error "Your query included only common words and / or characters, which were removed. No results are available. Try to add query terms."

I need to be able to retrieve all the rows for JobTitle. What is the workaround please?


How to Debug with VS 2010 32 Bit an SP2010 FeatureReceiver on "Windows 7" 64 bit machine




I'm feel that debugging is basic problem that every developer might be facing when doing SharePoint 2010 Development on Windows 7 (64 bit Env) with Visual Studio 2010 Utilmate.


I'm new to SP2010 Development, following is my configurations

1. Windows 7 64 bit Professional, x64-based PC

2. Visual Studio 2010 Ultimate 

3. My SharePoint project is targeted to .NET 3.5 Framework.

I've created a simple Package which has feature (along with featurereceiver)) when i activate this feature receiver i get an error. I want to debug this but when i attach to W3Wp.exe process, the break point says that No Symbol loaded.

So here is what i tried.

1. Tried uninstalling the dll from GAC, but failed it says "Access Denied" -> check the resolution for it everyone says you need to be logged in as local administrator which i'm already. how to uninstall the dll from GAC in this case.

2. I tried Gacutil for uninstalling but again it doesn't work.
3. Tried installutil /u "assembly"  (Under run as administrator mode) it says that Uninstall complete but when i hook up Assembly folder i see my Dll lying :-( no luck.<
ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend