Showing posts with label Web Config. Show all posts
Showing posts with label Web Config. Show all posts

Thursday, March 17, 2011

Increase Time Before Connection Timeout Between SQL and SharePoint

I have run into an issue with a couple of clients where a Connection Timeout Error occurs on either very large SSRS reports or in some custom web parts pulling data from SQL.   By default, the connection between SharePoint and your SQL servers will timeout after 120 seconds.  My current client just had me create a report that takes about 8.5 minutes to complete rendering...  oops, error!
This is how you fix the timeout issue:
1)  Go to the virtual directory for the site that is timing out.
         C:\inetpub\wwwroot\wss\VirtualDirectories\yourSite
2)  Make a backup of the web.config file.
3)  Edit the web.config file and add an httpRuntime property called "executionTimeout"

In the example below, my connection will now timeout after 5 minutes (300 seconds).

Thursday, February 10, 2011

SharePoint Custom Login Error (401) Page

When dealing with lots of people logging into your SharePoint site, you will spend a lot of time answering phone calls from people with login errors. A nice and easy way to preemptively help deal with login failures is to use a custom error page.

1) Go to your IIS and look up where the custom errors are located for the site.

2) Look at the path location for the location of the error files.

3) Go to the file location,, you will want to edit the 401.htm file.

4) The last step is to modify the web.config for your SharePoint site.  You will need to add (modify) the system.webserver.
Download code here

To add custom error pages in different languages, just add the pages to the appropriate local language folder.  You can find the local language folder information here...  http://msdn.microsoft.com/en-us/library/bb266177.aspx

Friday, February 4, 2011

Cannot Build Data View Web Part Remotely

I was trying to build a Data View Table using SharePoint Designer 2007 remotely.  I could create my Data Source and see all of my columns.  However, when I clicked to view the Data Source Details, I received an error: 
"The server returned a non-specific error when trying to get data from the data source. Check the format and content of your query and try again. If the problem persists, contact the server administrator."

After doing a little research, all I needed to do was modify the SqlDataSource SafeControlAssembly in the web.config file.
SafeControl Assembly="System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" Namespace="System.Web.UI.WebControls" TypeName="SqlDataSource" Safe="true" AllowRemoteDesigner="true" 

I made the change, and now I can build my Data View Web Part from home, over the web, without a VPN!

Wednesday, April 21, 2010

Proxy Server Settings for SharePoint 2007

We do not have any "Content" deployment people at my office so I depend mostly on RSS feeds to keep the sites updated and changing on a constant basis.
One day, our IT department put in a Proxy Server, which killed all of the RSS feeds to SharePoint. I had to update the config file so that the RSS feeds were available once again.

I used the following sites as reference...

http://geekswithblogs.net/hinshelm/archive/2007/10/24/Proxy-server-settings-for-SharePoint-2007.aspx

http://microsoft-sharepoint-services.blogspot.com/2008/12/configuring-proxy-setting-on-sharepoint.html

http://support.microsoft.com/kb/912060

You will need to put the Proxy Setting into each Virtual Directory for every site that you want to be able to access the Internet.

The main reason that I am writing about these settings is that it took me too long to figure out that the last slash in the "proxyaddress" is REQUIRED...

In Server 2008, you will find the required files here...

C:\inetpub\wwwroot\wss\VirtualDirectories\YOUR SITE NAME\web.config

Add the following to the end of the .config file:

<system.net>
  <defaultproxy>
     <proxy usesystemdefault="false" proxyaddress="http://x.x.24.45:3128/" bypassonlocal="true" />
  </defaultproxy>
</system.net>