Hi,
I've written a custom web application utilising the Umbraco dlls so that a user can signup as a member of a website, upload images, and create pages without having access to the umbraco admin gui. The appliation works well on my development environments (win xp, iis5).
I then deployed the umbraco website and my application onto the staging server (win2k3, iis6) and the application doesn;t work at all. Both versions use the same database server - so that can be ruled out.
The error is:
Object reference not set to an instance of an object.
NullReferenceException: Object reference not set to an instance of an object.]
companyname.projectname.website.agencies.profile.Page_Load(Object sender, EventArgs e)
System.Web.UI.Control.OnLoad(EventArgs e) +67
System.Web.UI.Control.LoadRecursive() +35
System.Web.UI.Page.ProcessRequestMain() +739
after some debugging the error seems to occur when I try and access the properties of a member:
Code:
Dim m As Member = Member.GetCurrentMember() - FINE
If Not m Is Nothing Then - FINE
Me.txtName.Text = m.getProperty("agency_name").Value.ToString - ERROR
End If
I digged a little further byt looping through all the properties for the member object:
Code:
For Each item As umbraco.cms.businesslogic.property.Property In m.getProperties() - FINE - RETURNS 16 properties
response.write(item.Id) - ERROR
Next
So it seems like the properties aren't being initalised correctly.
Has anyone got any idea?? Weird how I have it working fine on two development machines, but not on the staging server. What differences in w2k3 would cause this error?
Thanks,
Jonathan