Tuesday, February 14, 2012 | Register | Login 
Minimize
 Module Support Forums
 
 Forum Forum metaPost Forums metaPost Forums Providers - Tex... Providers - Tex... Exceptions thrown on update Exceptions thrown on update
Previous Previous
 
Next Next
New Post
 11/10/2009 9:29 AM
anth13
5 posts
No Ranking


Exceptions thrown on update
 
Hi,
After an update using LiveWriter, I'm getting 3 exceptions appearing in the EventViewer for the site. The update works fine by the way..
The log states:

*AssemblyVersion: 04.09.05
PortalID: 0
PortalName: OriginalLives
UserID: -1
UserName:
ActiveTabID: 38
ActiveTabName: Home
RawURL: /metapost.ashx?key=text/html&sid=368
AbsoluteURL: /metapost.ashx
AbsoluteURLReferrer:
UserAgent: Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 5.1; Windows Live Writer 1.0)
DefaultDataProvider: DotNetNuke.Data.SqlDataProvider, DotNetNuke.SqlDataProvider
ExceptionGUID: 9f865aac-74f6-469e-89a9-567ff0cb4c34
InnerException: Object cannot be cast from DBNull to other types.
FileName:
FileLineNumber: 0
FileColumnNumber: 0
Method: System.DBNull.System.IConvertible.ToInt32
StackTrace:
Message: System.InvalidCastException: Object cannot be cast from DBNull to other types. at System.DBNull.System.IConvertible.ToInt32(IFormatProvider provider) at System.Convert.ToInt32(Object value) at ITCrossing.metaPost3.GetPortalIDFromAlias(String portalAlias)
Source:
Server Name: WEB20

There is only 1 portal (0).
Any ideas?
Thanks for any help.
 
New Post
 11/11/2009 5:41 AM
Don Worthley
332 posts
8th Level Poster


Re: Exceptions thrown on update
 
Hi,

Are the other two exceptions related to WLW?  I think I've narrowed this exception down to a call to one of the baseline stored procedures.  Do you know if your site uses either a different databaseOwner or objectQualifier name?  If so, that's the cause of the problem.  I've updated our code to handle this scenario and the fix will be available in the next release.

Thanks,

Don
 
New Post
 11/11/2009 8:34 AM
anth13
5 posts
No Ranking


Re: Exceptions thrown on update
 
Hi,

Thanks for the reply.
In fact the other 2 errors are exactly the same as the one I posted, all from the 1 update.
The database hasn't had any changes re databaseOwner or object qualifier, its a standard DNN 4.9.5 installation.
Thanks for the help.
Anthony
 
New Post
 11/12/2009 11:27 AM
Don Worthley
332 posts
8th Level Poster


Re: Exceptions thrown on update
 
Hi Anthony,

I just tested on a new instance of DNN 04.09.05 and wasn't able to reproduct this issue.  I'm happy to test from my end. I would just need a host level account to a site where this issue can be reproduced.  Feel free to send credentials to don along with oldtownit.com.

Thanks,

Don
 
New Post
 11/13/2009 9:09 AM
Don Worthley
332 posts
8th Level Poster


Re: Exceptions thrown on update
 

This is just a quick followup regarding the resolution to this issue.  I've included the text of an email I sent to Anthony in case this issue is experienced by other metaPost users.  I replaced the actual domain name with orgname since this was in response to a private email from Anthony.  Thanks Anthony!
______________________________________

Having host level access to the site helped me identify what the issue was.  The portalalias for this portal is orgname.com, which means that the posting URL used in WLW needs to be in this format:

 

http://orgname.com/metapost.ashx?key=text/html&sid=368

 

rather than this

 

http://www.orgname.com/metapost.ashx?key=text/html&sid=368

 

I wrote code to handle this situation, but the routine which does the actual lookup to retrieve the PortalId from the alias was logging the errors as it attempted the first URL entered.  I’ve updated metaPost so that the errors won’t be logged. 

 

Sorry about this confusion.  Until the next release is out, you can prevent the errors from filling your event log by deleting any old WLW accounts that were configured to use www in the URL and re-creating them.  Deleting and re-creating a WLW account has no effect on the content in the site, so this is a safe operation.

 

Thanks for your patience while we worked to solve this issue and for taking the time to set up a test account!

 

Don

 
Previous Previous
 
Next Next
 Forum Forum metaPost Forums metaPost Forums Providers - Tex... Providers - Tex... Exceptions thrown on update Exceptions thrown on update