Tuesday, May 11, 2010

How to access an SQL server database on a different Subnet?

For example the Sql server you are trying to access is on a different subnet to the subnet of the machine you are trying to access it from. i.e. SQL Server A: 192.168.1.2 and SQL Server B: 192.168.2.2. To access SQL Server B from SQL Server A the connection string will be TCP:192.168.2.2,1433

Thursday, March 25, 2010

Kerberos Authentication issue on IIS7

Problem

I have been pulling my hair out trying to resolve get Kerberos and MOSS to work on IIS7. The problem that I have been having is that every time is I configure SPN's correctly i seem to be getting a Security audit log Error that says the below:


Failure Information:
Failure Reason: Unknown user name or bad password.
Status: 0xc000006d
Sub Status: 0xc000006a

The problem here is that one of the security changes in IIS 7.0 is that Windows Authentication is performed by default in the kernel. Because HTTP.sys is handling the authentication, it is by default done under the LocalSystem account regardless of the application pool identity. This means that the creation of an SPN is unnecessary because default SPNs are created when the server is joined to the domain. You can of course change the app pool identity without having to register a SPN, and the app pool account doesn't need to be a domain account. However, it trips up SharePoint as even on a single server SharePoint is currently considered a web farm (should use a domain account). Therefore you need to use the application pool identity for authentication. This is what caused the accounts to fail.

Solution
Make changes to the IIS7 applicationHost file which can be found in C:\Windows\System32\inetsrv\config\
and replace the following line
<windowsauthentication enabled="true">
with
<windowsauthentication enabled="true" useapppoolcredentials="true">

The application pool identity will now be used and the Kerberos issues will be fixed.

Content deployment job 'XXX' failed.The remote upload Web request failed.

During a Sharepoint publishing process I got the following error:

Content deployment job 'XXX' failed.The remote upload Web request failed.

The problem that was occuring was that the account that was being used to authenticate against the central administration of the target server in "Content Deployment Settings" from the source did not have permissions in the destination site collection. I gave that account permissions to the site collection and it worked.

Tuesday, October 20, 2009

Sharepoint 2010

Updates to MSDN with more information on Sharepoint 2010 has been made. Click here....

Wednesday, August 5, 2009

Free Sharepoint archiving tool

Free sharepoint Archive tool built by Metalogix


Tuesday, May 19, 2009

Hide Planned work rows in Project server 2007

Found a great blog with some project server hacks. One of which was to hide planned works rows in Project Server

Sunday, May 3, 2009

Microsoft Office Servers Service Pack 2 Released

Microsoft Office Servers Service Pack 2 has been released. Service packs can be downloaded from Microsoft Download center.

Sunday, April 19, 2009

Flushing Expired Session STat Data from SSP Database

To flush expired session' stat Data from SSP Database run the following script:

Use SSP
truncate table ASPStateTempSessions

Monday, April 6, 2009

Infrastructure Planning and Design

A good set of Infrstucture planning and design downloads. Click here....

Monday, February 23, 2009

When we try to install AX 2009 SP1 Reporting Services on a PC running SQL 2008,we get an error saying that MSSQL 2005 SP2 is required.

Thanks to Arjit Basu the following is the instructions on his blog.http://daxguy.blogspot.com/

1. Locate the AX Reporting services dll from the extracted AX 2009 SP1 folder
[\\AX2009SP1\support\axsetupresources\microsoft.dynamics.setup.reportingservices.dll;File Version - 5.0.1000.52]
2. Extract the AX 2009 .iso to a shared folder
3. Copy the microsoft.dynamics.setup.reportingservices.dll into the folder:
\\DynamicsAX\Msi\Components32\Program Files\Microsoft Dynamics AX\50\Setup
\\DynamicsAX\Msi\Components64\Program Files\Microsoft Dynamics AX\50\Setup
4. It will ask to replace the existing dll having File Version - 5.0.593.0. Say Yes and replace.
5. Then Install AX Reporting Services extensions. It works fine and the Reporting Extensions are installed nice.

Monday, November 24, 2008

Unit Testing in Sharepoint

Typemock are offering their new product for unit testing SharePoint called Isolator For SharePoint, for a special introduction price. it is the only tool that allows you to unit test SharePoint without a SharePoint server. To learn more click here.
The first 50 bloggers who blog this text in their blog and tell us about it, will get a Full Isolator license, Free. for rules and info click here.

Tuesday, November 18, 2008

How to get physical path of 12 in code.

//use reference to below
using System.Web;


string strPAthTo12hive =HttpContext.Current.Server.MapPath(@"~\_layouts/1033/PurchaseLinks.js");

Sunday, November 16, 2008

Infopath form closes as soon as you open it in sharepoint workflows.

I had a strange error as soon as a VS 2005 workflow that I wrote for Sharepoint would try open an InfoPath form it would close without giving any errors. The only error was the following in the logs: EventType ulsexception12, P1 w3wp.exe, P2 6.0.3790.1830, P3 42435e74, P4 microsoft.office.infopath.server, P5 12.0.6219.0, P6 4845c8d9, P7 9573, P8 194, P9 fileloadexception, P10 82lz.
To resolve this issue ensure that there are no empty parameter floating around in the ItemMetadata.xml files that the InfoPath form is not using. Once I removed all unwanted parameters the issue was resolved.

ErrHow to resolve Error: ".asmx was not recognized as a known document type."

If you get an error below when trying to add a reference to webservice:
The document at the url http://localhost:81/PWA/_vti_bin/psi/project.asmx was not recognized as a known document type.The error message from each known type may help you fix the problem:- Report from 'DISCO Document' is 'Root element is missing.'.- Report from 'WSDL Document' is 'The document format is not recognized (the content type is 'text/html; charset=utf-8').'.- Report from 'XML Schema' is 'The document format is not recognized (the content type is 'text/html; charset=utf-8').'.- Report from 'http://localhost:81/PWA/_vti_bin/psi/project.asmx' is 'The document format is not recognized (the content type is 'text/html; charset=utf-8').'.
Type ?wsdl after the webservice URl and the error should be resolved or alternativly click on the service description in the summary window and the Error should be resolved. Below is image to describe the process.




Thursday, October 23, 2008

System.InvalidOperationException: The event receiver context for Workflow is invalid.

If the below error come up while creating sharepoint worflow:

System.InvalidOperationException: The event receiver context for Workflow is invalid. at Microsoft.SharePoint.SPEventReceiverDefinition.ValidContext() at Microsoft.SharePoint.SPEventReceiverDefinition.ValidReceiverFields() at Microsoft.SharePoint.SPEventReceiverDefinition.GetSqlCommandToAddEventReceivers(IList`1 erds) at Microsoft.SharePoint.Workflow.SPWinOESubscriptionService.CommitNewSubscriptions(Transaction txn, IList`1 erds)


The cause of this is either you didn't associate properties for TaskID, TaskProperties, or CorrelationToken activity to your createtask token. The other scenario that this comes up is when you don't assign a unique id to your Taskid. If you code looks like below:
public Guid createTaskInitiation_TaskId = default(System.Guid);
to
public Guid createTaskInitiation_TaskId = Guid.Newguid();
This should resolve the error.

Monday, October 13, 2008

How to prevent code from crashing when adding an event handler to a documentlibrary.

I had the follwing issue:

I added an event handler to a document library. Every time i added a new document the eventhandler would run fine but when a user had entered metedata againt a doucument and pressed ok, sharepoint would crash. The reason behind this was, I was tring to update an item when there was already an update in progress. I fixed the issue by running the follwing update code.

DisableEventFiring();
item.SystemUpdate(false);
EnableEventFiring();

Monday, August 18, 2008

Some issue with Title when generating a Excel file from a crystal report.

Two issues I spent some time resolving was:
  1. When an excel file was generated from crystal reports some times the assosciated title for the column does not appear correctly.
  2. Every time I generated an Excel file from crystal reports. The titles in the excel file were never in the same order as I had created them in crystal report.


Fig 1 : This will not work

Resolution to the issues above:
  1. For all the columns that you require to appear in excel they must touch the details section.
  2. For the Titles to be in the same order as in crystal,all fields must have the same height. For some reason the order seems to be based on height.
Below is the corrected crystal report Image.


Fig 2. This will work