Microsoft Content Management Server - Custom Property Extensions

This is Interesting: Free IT Magazines  
Home > Archive > Microsoft Content Management Server > October 2005 > Custom Property Extensions





You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

Author Custom Property Extensions
satish

2005-10-24, 10:39 am

Hi,

I am trying to use the CustomPropertyExtender (CustomPropertyDbEx) in my
application. I am doing implementation as per the guidelines by adding
references and implementing as below.

CustomPropertyDbEx cp;

try
{
cp = new CustomPropertyDbEx(objCurChannel);
cp.AssetType = CustomPropertyDbExAssetType.Channel;
cp.AssetGuid = new Guid(objCurChannel.Guid);
cp.Key = "test";
cp.Value = "satish";
cp.Commit();
}
catch(Exception ex)
{
Response.Write(ex.Message);
Response.Write(ex.Source);
Response.End();
}

But i am getting the following exception:
System.NullReferenceException: Object reference not set to an instance of an
object.

with the stacktrace as below:

ContentManagement.Extensions.DataHandler.InitConnectionString(String
connectionString) +39
ContentManagement.Extensions.Searches.GetByKey(String value) +46


Can anybody help me how to findout the reason for this exception?

Satish.
Stefan [MSFT]

2005-10-24, 10:39 am

Hi Satish,

seems you did not setup the connection string to your external DB which
should hold the custom properties correct.

Cheers,
Stefan

--
This posting is provided "AS IS" with no warranties, and confers no rights

New to MCMS?
Check out this book: Building Websites Using MCMS: http://tinyurl.com/6zj44
----------------------


"satish" <satish@discussions.microsoft.com> wrote in message
news:2ED81BA0-D211-43A8-8C2B-F68731202194@microsoft.com...
> Hi,
>
> I am trying to use the CustomPropertyExtender (CustomPropertyDbEx) in my
> application. I am doing implementation as per the guidelines by adding
> references and implementing as below.
>
> CustomPropertyDbEx cp;
>
> try
> {
> cp = new CustomPropertyDbEx(objCurChannel);
> cp.AssetType = CustomPropertyDbExAssetType.Channel;
> cp.AssetGuid = new Guid(objCurChannel.Guid);
> cp.Key = "test";
> cp.Value = "satish";
> cp.Commit();
> }
> catch(Exception ex)
> {
> Response.Write(ex.Message);
> Response.Write(ex.Source);
> Response.End();
> }
>
> But i am getting the following exception:
> System.NullReferenceException: Object reference not set to an instance of
> an
> object.
>
> with the stacktrace as below:
>
> ContentManagement.Extensions.DataHandler.InitConnectionString(String
> connectionString) +39
> ContentManagement.Extensions.Searches.GetByKey(String value) +46
>
>
> Can anybody help me how to findout the reason for this exception?
>
> Satish.



satish

2005-10-24, 10:39 am

Hi Stefan,

I setup the connection to the external db and also able to connect
successfully. but still unable to resolve this issue. still getting the same
exception.

satish.

"Stefan [MSFT]" wrote:

> Hi Satish,
>
> seems you did not setup the connection string to your external DB which
> should hold the custom properties correct.
>
> Cheers,
> Stefan
>
> --
> This posting is provided "AS IS" with no warranties, and confers no rights
>
> New to MCMS?
> Check out this book: Building Websites Using MCMS: http://tinyurl.com/6zj44
> ----------------------
>
>
> "satish" <satish@discussions.microsoft.com> wrote in message
> news:2ED81BA0-D211-43A8-8C2B-F68731202194@microsoft.com...
>
>
>

Stefan [MSFT]

2005-10-24, 10:39 am

Hi Satish,

then you should post this to an ASP.NET related newsgroup as this is not
really a MCMS related question.

Cheers,
Stefan

--
This posting is provided "AS IS" with no warranties, and confers no rights

New to MCMS?
Check out this book: Building Websites Using MCMS: http://tinyurl.com/6zj44
----------------------


"satish" <satish@discussions.microsoft.com> wrote in message
news:3C57A689-8BD5-41AB-B0A8-79C3D0D8D4F5@microsoft.com...[vbcol=seagreen]
> Hi Stefan,
>
> I setup the connection to the external db and also able to connect
> successfully. but still unable to resolve this issue. still getting the
> same
> exception.
>
> satish.
>
> "Stefan [MSFT]" wrote:
>


Sponsored Links






Free braindumps | Software forum | Database administration forum

Copyright 2003 - 2008 webservertalk.com