Showing posts with label Configuration. Show all posts
Showing posts with label Configuration. Show all posts

Saturday, September 25, 2010

This session has exceeded the amount of allowable resources - Infopath form error

If you are working with infopath forms and your form is really big [I mean, having lot of controls and with so many actions] then you should get this error at some point. Most of the developers did not get it as it will come very rarely.

Error details:
"This session has exceeded the amount of allowable resources."

Event Viewer details:

Event Type:      Error
Event Source:    Office SharePoint Server
Event Category:  Forms Services Runtime
Event ID:        5737
Description:     
Number of form actions 208, has exceeded 200, the maximum allowable value 
per request. This value is configurable and can be changed by the administrator.
So, when we see the log description, it is saying that the form actions is beyond the SharePoint default form actions allowed. SharePoint by default allows 200 form actions per postback of a form. But, here the form I have used is using more than 200. My case it is 208. So, it will not allow to save or submit the form and throw the above error.

Monday, December 28, 2009

IIS 7 – Managed pipeline mode – Global.asax redirect not working

I installed Windows 7 and I really like it. I migrated all my applications from my old machine to new. And my old machine is running WS 2003 [iis 6] and new machine is Windows 7 [IIS 7]. In all applications everything ran successful except one. I implemented exception handling in my application. I have Global.asax page and in the Application_Error event, I log the exception details and redirecting the user to the error page. Whenever there is an exception in my application the page never redirect to the error page, it stays there in the same page with exception details on the screen.

The same code ran very successful on my old server and in Windows 7 it's not. I just started thinking what could be the issue. The analysis went in this way. Code not changed, DB not changed and the only part changed is the IIS. Windows 7 has IIS7. So, The problem would be either the isapi dll or the application pool. So, started researching on those and found interesting points.

In IIS 7, application pool has a separate feature named "Managed pipeline mode". This will tell the pool the pipeline mode. [which is of type sint32 in c# and the possible values for it are 0 and 1.]

  • 0 is managed pipeline runs in integration mode.
  • 1 is managed pipeline runs in classic or ISAPI mode. [IIS 6].

In Classic mode, managed application events are executed by using ISAPI. In Integrated mode, ASP.NET request processing integrates directly into the IIS 7 request-processing pipeline. Integrated mode enables you to configure managed modules for Web sites that are developed with unmanaged code.

So, to work your logic correct, go to your site and see under what application pool your site running. Now, go to that application pool, properties and change the pipeline mode to classic mode. Now, you see everything works fine and the page starts redirecting to error page when any exception in your application.

For more details: http://msdn.microsoft.com/en-us/library/microsoft.web.administration.managedpipelinemode.aspx

Hope this helps and new tip today. Do you like this post?

Wednesday, July 15, 2009

Blocked file types in SharePoint 2007 – Custom web services 2.0 in SharePoint 2007 – Part 3

Please read the post "Steps to implement custom web services in SharePoint" before continue here.

I think, most of the people don't know about blocked file types and where can we set them. SharePoint by default, won't allow all the file extensions because of some security issues.

Why the SharePoint team didn't allow them by default. There is a strong reason behind it. i.e. not other than Security reasons. For example, EXE extension file, script files etc.

How to remove a blocked file type?

  • Open central administration site.
  • Go to Operations tab.
  • Find a section named "Security Configuration".
  • Under this section, you can find a link for "Blocked file types".

    Blocked file types

  • On this page, you can see a text box area which displays all the file extensions one per line, which SharePoint blocked by default.

      image

  • You can edit and delete the extension. Then SharePoint allows user to upload the file or access the file.

So, if you are facing the problem of not able to upload the files of type .asmx, .exe, .chm etc.. This is the place where you set it. Happy SharePointing.

Wednesday, June 10, 2009

How to see actual exceptions or errors in SharePoint instead of Unknown errors message

When I was new to SharePoint programming, I faced plenty of problems to find out what errors or exceptions coming on a SharePoint web page. Because as of my knowledge those days, I thought like there is only one place where we can find the details of the exception or error coming and that is nothing but logs. [Which usually located in 12 hive.] But after got some experience with SharePoint slowly learning new things and found a way to see the exception directly on the screen[browser] instead of going to logs and check there.

When an exception comes in SharePoint environment usually the page we see is Unknown error, nothing else. 

To see the actual exception details follow the steps below.

  • Go to the location where your SharePoint application is present in the file system. It is usually at the location inetpub/wss/virtual directories/[port number].
  • Find the web.config file.
  • Take a backup of it.
  • Open the file in some nice editor like Visual studio and find the tag <SafeMode
  • This is the first child tag under <SharePoint>
  • You can see the tag syntax something similar to this.

     <SafeMode MaxControls="200" CallStack="false" DirectFileDependencies="10" …….

  • One of the attributes for <SafeMode called CallStack, which holds the boolean value which tells to SharePoint framework whether to show the actual exception details or not.
  • Set this value to true in-order to view the actual exception details on screen[browser].
  • Set the CustomErrors section to Off to view complete details as shown below.
  • <customErrors mode="Off" />
  • IISRESET is not compulsory. If you do then that will be good.

Hope this will help to you to make fast development and no such big pains to look into all the log files for errors.

Note: Please use this option only on the development environment to make development fast. On production servers and QA environment, don't make the above changes to the file. If you do this, all your end users will see the actual exception or error details, which is not good.

Monday, May 4, 2009

It is an error to use a section registered as allowDefinition='MachineToApplication' beyond application level

It is an error to use a section registered as allowDefinition='MachineToApplication' beyond application level. This error can be caused by a virtual directory not being configured as an application in IIS.

Go to IIS and check your virtual directory is configured as an application. If it is not converted as an application then create an application.

Not possible to debug and Integrated Authentication mode not enabled on your server

While Debugging VS2005 if error comes like Not possible to debug and Integrated Authentication mode not enabled on your server then
Go to IIS -- default website -- properties -- Directory Security tab -- Authentication and Access Control -- edit -- Enable Integrated Authentication mode.