NewUrl error!

This forum is only for questions or discussions about working with the mojoPortal source code in Visual Studio, obtaining the source code from the repository, developing custom features, etc. If your question is not along these lines this is not the right forum. Please try to post your question in the appropriate forum.

Please do not post questions about design, CSS, or skinning here. Use the Help With Skins Forum for those questions.

This forum is for discussing mojoPortal development

This forum is only for questions or discussions about working with the mojoPortal source code in Visual Studio, obtaining the source code from the repository, developing custom features, etc. If your question is not along these lines this is not the right forum. Please try to post your question in the appropriate forum.

You can monitor commits to the repository from this page. We also recommend developers to subscribe to email notifications in the developer forum as occasionally important things are announced.

Before posting questions here you might want to review the developer documentation.

Do not post questions about design, CSS, or skinning here. Use the Help With Skins Forum for those questions.
This thread is closed to new posts. You must sign in to post in the forums.
10/20/2011 1:27:53 AM
Gravatar
Total Posts 192

NewUrl error!

Hi.

one of my websites is facing a random error, which is:

Server Error in '/' Application.
NewUrl
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.IndexOutOfRangeException: NewUrl

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:

[IndexOutOfRangeException: NewUrl] mojoPortal.Web.UrlRewriter.UrlRewriter_BeginRequest(Object sender, EventArgs e) +881 System.Web.SyncEventExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +68 System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +75

also:

UrlID
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.IndexOutOfRangeException: UrlID

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:

[IndexOutOfRangeException: UrlID] mojoPortal.Web.UrlRewriter.UrlRewriter_BeginRequest(Object sender, EventArgs e) +881 System.Web.SyncEventExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +68 System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +75

I have no idea what this is!

10/22/2011 3:52:34 AM
Gravatar
Total Posts 192

Re: NewUrl error!

Joe! please help me.

I have no idea what is causing this error and the client want his site back up running!

any guess, anything that could help me debug this...

10/22/2011 4:08:14 AM
Gravatar
Total Posts 192

Re: NewUrl error!

Touching web.config fixes it, but I don't know what causes the error once again.

I guess when the application is restarted the error goes away.

a web monitor shows that the site has come up and down several times in the previous two days.

10/22/2011 7:43:33 AM
Gravatar
Total Posts 18439

Re: NewUrl error!

Only thing I can guess is something to do with 301 redirects or the stored proecedurte that looks them up.

You can disable 301 redirects like this:

<add key="Disable301Redirector" value="true" />

I can only guess the error is happening in this method:

private static string GetRedirectUrl(string targetUrl)
{
//lookup if this url is to be redirected, if found return the new url
string newUrl = string.Empty;

SiteSettings siteSettings = CacheHelper.GetCurrentSiteSettings();
using (IDataReader reader = RedirectInfo.GetBySiteAndUrl(siteSettings.SiteId, targetUrl))
{
if (reader.Read())
{
newUrl = reader["NewUrl"].ToString();
}
}

return newUrl;
}

So I would trace it from there to your database and see why NewUrl is not returned. The error seems to indicsate that field does not exist in the reader.

Hope that helps,

Joe

You must sign in to post in the forums. This thread is closed to new posts.