Posted by (JavaScript must be enabled to view this email address) on Fri 27 Mar 2009

image

To put a total at the end of the SSRS report, add a textbox to the DataSet Region and set the visibility property of the text-box to an expression - set the the expression to:

  1. =iif(RowNumber("List1") = Count(Fields!.Value),true,false)

Then a just set the expression on the text box to:

  1. ="Total between " & Parameters!.Value & " and " &_
  2. Parameters!.Value + ": " & RowNumber("List1")

and this is what it looks like rendered:

image

Enjoy!



Posted by (JavaScript must be enabled to view this email address) on Wed 18 Mar 2009

On deploying a site for a customer we were presented with all sorts of ASP.Net errors.  First I was told that the database was the incorrect type (i.e. the app thought it was SQL Express edition instead of the SQL Standard Edition).

provider: SQL Network Interfaces, error: 26 - Error Locating Server/Instance Specified”

A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessible. Verify that the instance name is correct and that SQL Server is configured to allow remote connections. (provider: SQL Network Interfaces, error: 26 - Error Locating Server/Instance Specified)
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.Data.SqlClient.SqlException: A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessible. Verify that the instance name is correct and that SQL Server is configured to allow remote connections. (provider: SQL Network Interfaces, error: 26 - Error Locating Server/Instance Specified)

Source Error:

An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.

Stack Trace:


[SqlException (0x80131904): A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessible. Verify that the instance name is correct and that SQL Server is configured to allow remote connections. (provider: SQL Network Interfaces, error: 26 - Error Locating Server/Instance Specified)]
System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection) +4844759
System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj) +194
System.Data.SqlClient.TdsParser.Connect(ServerInfo serverInfo, SqlInternalConnectionTds connHandler, Boolean ignoreSniOpenTimeout, Int64 timerExpire, Boolean encrypt, Boolean trustServerCert, Boolean integratedSecurity, SqlConnection owningObject) +4858065
System.Data.SqlClient.SqlInternalConnectionTds.AttemptOneLogin(ServerInfo serverInfo, String newPassword, Boolean ignoreSniOpenTimeout, Int64 timerExpire, SqlConnection owningObject) +90
System.Data.SqlClient.SqlInternalConnectionTds.LoginNoFailover(String host, String newPassword, Boolean redirectedUserInstance, SqlConnection owningObject, SqlConnectionString connectionOptions, Int64 timerStart) +376
System.Data.SqlClient.SqlInternalConnectionTds.OpenLoginEnlist(SqlConnection owningObject, SqlConnectionString connectionOptions, String newPassword, Boolean redirectedUserInstance) +221
System.Data.SqlClient.SqlInternalConnectionTds..ctor(DbConnectionPoolIdentity identity, SqlConnectionString connectionOptions, Object providerInfo, String newPassword, SqlConnection owningObject, Boolean redirectedUserInstance) +189
System.Data.SqlClient.SqlConnectionFactory.CreateConnection(DbConnectionOptions options, Object poolGroupProviderInfo, DbConnectionPool pool, DbConnection owningConnection) +4859187
System.Data.ProviderBase.DbConnectionFactory.CreatePooledConnection(DbConnection owningConnection, DbConnectionPool pool, DbConnectionOptions options) +31
System.Data.ProviderBase.DbConnectionPool.CreateObject(DbConnection owningObject) +433
System.Data.ProviderBase.DbConnectionPool.UserCreateRequest(DbConnection owningObject) +66
System.Data.ProviderBase.DbConnectionPool.GetConnection(DbConnection owningObject) +499
System.Data.ProviderBase.DbConnectionFactory.GetConnection(DbConnection owningConnection) +65
System.Data.ProviderBase.DbConnectionClosed.OpenConnection(DbConnection outerConnection, DbConnectionFactory connectionFactory) +117
System.Data.SqlClient.SqlConnection.Open() +122
System.Web.DataAccess.SqlConnectionHolder.Open(HttpContext context, Boolean revertImpersonate) +87
System.Web.DataAccess.SqlConnectionHelper.GetConnection(String connectionString, Boolean revertImpersonation) +221
System.Web.Security.SqlRoleProvider.GetRolesForUser(String username) +760
System.Web.Security.RolePrincipal.IsInRole(String role) +164
System.Web.SiteMapProvider.IsAccessibleToUser(HttpContext context, SiteMapNode node) +202
System.Web.SiteMapNode.IsAccessibleToUser(HttpContext context) +17
System.Web.StaticSiteMapProvider.GetChildNodes(SiteMapNode node) +356
System.Web.SiteMapNode.get_ChildNodes() +27
System.Web.SiteMapNode.get_HasChildNodes() +7
System.Web.SiteMapNode.System.Web.UI.IHierarchyData.get_HasChildren() +7
System.Web.UI.WebControls.Menu.DataBindRecursive(MenuItem node, IHierarchicalEnumerable enumerable) +3042
System.Web.UI.WebControls.Menu.DataBindItem(MenuItem item) +231
System.Web.UI.WebControls.Menu.PerformDataBinding() +50
System.Web.UI.WebControls.HierarchicalDataBoundControl.PerformSelect() +85
System.Web.UI.WebControls.BaseDataBoundControl.DataBind() +73
System.Web.UI.WebControls.Menu.DataBind() +4
System.Web.UI.WebControls.BaseDataBoundControl.EnsureDataBound() +82
System.Web.UI.WebControls.Menu.EnsureDataBound() +40
System.Web.UI.WebControls.Menu.CreateChildControls() +107
System.Web.UI.Control.EnsureChildControls() +87
System.Web.UI.Control.PreRenderRecursiveInternal() +44
System.Web.UI.Control.PreRenderRecursiveInternal() +171
System.Web.UI.Control.PreRenderRecursiveInternal() +171
System.Web.UI.Control.PreRenderRecursiveInternal() +171
System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +842

To resolve the issue I started looking at my database; you’d think that was the obvious place or not? I restored my database, that didnt work, I attached my MDF files, that didnt work, finally I even tried to build the database entirely using SQL Scripts; but still the app was telling me that the database was a SQL Express Schema.

In desperation, I searched my code for any references to .MDF which I may have had…nothing; I searched for connection strings - no luck there either! What was going on?

Eventually - for no reason other than to try attaching the .MDF file again; I did a file search on my dev machine and found that there was an ASPNET.MDF file present in the app_data folder.  Now, this shouldn’t be there, I was using my own database for roles based authentication.  So I deleted it.  Redeployed my site; and again was told there was no database…

I gave up on the host; clearly they were going to be no help so I set about replicating the environment on our own servers.  I set up the site; configured role memberships and disabled custom errors…on browsing the site; I was able to find out that the ASPNET user was trying to create a database in the App_Data folder; I have no idea why; so yet again I searched through all my source for any reference to App_Data that was there.  Nothing.  Absolutely no references.  So I deleted the Folder.

As soon as I hit CTRL-F5 the site worked…could this have been the error? All my problems seemed to have been caused by the ASPNET worker process trying to create a database in the App_Data folder even though it was never used.

I have yet to fathom out why ASP.Net decides to create a database in the APP_Data folder; but if its causing you problems you simply need to delete the folder (as long as you arent using it).

 



Posted by (JavaScript must be enabled to view this email address) on Wed 11 Mar 2009

On our Windows 2008 infrastructure we had a major issue trying to get CRM and SharePoint 2007 to work as we expected.  The main issue was down to the Kerberos double hop issue which is ever present in Windows 2008 (Microsoft love to make things difficult for us); after some errorlog tracing we were able to find that there were several duplicate SPN’s:

1.    0x29 KRB_AP_ERR_MODIFIED
2.    0x19 KDC_ERR_PREAUTH_REQUIRED
3.    0xd KDC_ERR_BADOPTION

I started by deleting the duplicate SPNs using the following commands

setspn -d http/AD-SRV.domain.com domain\crmadmin
setspn -d http/AD-SRV.domain.com domain\svcmosscontent
setspn -d http/AD-SRV.domain.com domain\svcmossssp
setspn -d http/CRM-SRV.domain.com domain\crmadmin
setspn -d http/MOSS-SRV.domain.com domain\svcmossssp

Next we found that some of the machine accounts weren’t functioning correctly for kerberos, it appeared that the SPNs for these had gone AWOL too, so I recreated them with the following commands:

setspn -R CRM-SRV
setspn -R MOSS-SRV

MOSS and CRM still werent working but we were getting much more useful errors now, which led me to re-create the correct SPNs:

setspn -A http/CRM-SRV domain\crmadmin
setspn -A http/CRM-SRV.domain.com domain\crmadmin
setspn -A http/MOSS-SRV domain\svcmossssp
setspn -A http/MOSS-SRV.domain.com domain\svcmossssp
setspn -A MSSQLSvc/AD-SRV.domain.com:1433 domain\crmadmin
setspn -A MSSQLSvc/AD-SRV.domain.com:1433 domain\CRM-SRV$
setspn -A MSSQLSvc/AD-SRV.domain.com:1433 domain\MOSS-SRV$
setspn -A MSSQLSvc/CRM-SRV.domain.com:1433 domain\crmadmin
setspn -A MSSQLSvc/MOSS-SRV.domain.com:1433 domain\svcmossssp
setspn -A MSSQLSvc/MOSS-SRV:1433 domain\svcmossssp

A quick server reset later and we were ready to go!  MOSS and CRM functioning as they should be!



Page 5 of 9 pages « First  <  3 4 5 6 7 >  Last »

About our Blog

Brantas Limited specialise in Dynamics CRM, SharePoint and System Integration using the Microsoft Platform. We are all experienced developers in various fields with our own specialities complementing those of our team.

We have been working with SharePoint since 2003, including Installation and Administration, Migration, Development and Support.

RSS Feed