Raghu's SharePoint Corner: November 2009

My blog has moved!

You will be automatically redirected to the new address. If that does not occur, visit
http://www.sharepointcolumn.com
and update your bookmarks.

November 17, 2009

SharePoint WebPart Socket Exception

Recently when I was working on a web part which hosts a user control was throwing socket exception. I got stuck with this exception for almost 6hrs and finally figured out the main cause for this exception. It was a simple user control which was making a web request to a website and returning some data. The user control worked perfectly fine when I deploy it in an ASP.Net Application, but when I hosted this user control in SharePoint it started throwing Socket Exception “System.Net.Sockets.SocketException: No connection could be made because the target machine actively refused it”.






Initially I thought this may be due to Firewall and have to open up port for that web application but the windows firewall was completely turned off (Not a good way of doing that, you should always open port instead of turning off the firewall). So the next thing I did is tried to access the web request URL from my browser for my surprise the URL worked perfectly fine and returned XML data.

For one instance I was thinking this might be something related to web.config settings for sharepoint web application. So went through various settings of web.Config file. Made the proxy settings entry in the System.Net Section of the web.config file and it worked like charm. Given below are the entires that i made in web.config file.

<system.net>
     <defaultProxy useDefaultCredentials="true">
      <proxy usesystemdefault="False" proxyaddress="ServerName:portNo" bypassonlocal="False" />
    </defaultProxy>
  </system.net>
I was little bit confused at that instance because I had also specified proxy server settings in IE it didn’t work. Will look out for the correct reason why sharepoint was throwing this exception even after the proxy settings had been made in the browser and will update the post accordingly as of now it solved my issue and thought of posting it here.

November 16, 2009

Download SharePoint 2010 Beta Version

Hi Friends

The much awaited SharePoint 2010 beta version is now available for download publicly. You can download the beta version from the below link here. You need to sign in to download.

SharePoint Designer 2010 and Office SharePoint Foundation Server 2010 Beta are also available for download.

http://technet.microsoft.com/hi-in/evalcenter/ee388573.aspx




Have updated the Sharepoint 2010 download link recently.

SharePoint Server Publishing Infrastructure Access Denied

Recently we had a new server setup for SharePoint with Windows server 2008. I needed a publishing site for my new application, so I went to the Site Settings -> Site Collection Feature -> and clicked on activate Office SharePoint Server Publishing Infrastructure Feature. For a surprise I got an Access Denied Exception for the first time (Completely Shocked Since I never faced this before). I was curious to find out what were the exception details in the event viewer. The Event viewer showed the following exception details “Failed to provision the scheduling job definitions. Page scheduling will not succeed.”



The fix for this exception is to change the Application Pool Temporarily. Open IIS, Navigate to your website. Click on Advance Settings, by default the application pool will be your website app pool, change it to Central Admin from the drop down list shown below and click Ok. Go to your Site Features and activate the Office SharePoint Server Publishing feature. Once the feature is activated reset the Application Pool of the website to its original state and perform an IISRESET.



I don’t know if there is any alternate approach for the same. If any please leave a comment.