IndexOutofRange Exception

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.
7/14/2012 12:19:13 PM
Gravatar
Total Posts 2

IndexOutofRange Exception

Hi i am very new in mojoportal. I have installed the mojoportal deployment version and it is running fine. But when i try to run sourcecode in VS2010, a runtime exception is arise. IndexOutofRange using CreatedByName. Name of file is HtmlRepository.cs and project name is mojoportal business. the contents of code is as follow:

            content.CreatedByName = reader["CreatedByName"].ToString();
           
            content.CreatedByFirstName = reader["CreatedByFirstName"].ToString();
            content.CreatedByLastName = reader["CreatedByLastName"].ToString();
            content.CreatedByEmail = reader["CreatedByEmail"].ToString();

            content.LastModByName = reader["LastModByName"].ToString();
            content.LastModByFirstName = reader["LastModByFirstName"].ToString();
            content.LastModByLastName = reader["LastModByLastName"].ToString();
            content.LastModByEmail = reader["LastModByEmail"].ToString();

I am using it with SQL Server 2008.

I need help ASAP.

I will be very thankful.

7/14/2012 1:13:13 PM
Gravatar
Total Posts 18439

Re: IndexOutofRange Exception

First you need to rebuild the entire solution. Then you need to visit the /Setup/Default.aspx page to run all the database scripts.

If you are running it in the debugger it will break on all errors and errors are expected until it runs all the setup scripts, if you keep clicking continue on the errors it will eventually redirect to the setup page by itself.

But instead of running in the debugger, its easier and faster to just rebuild the solution, right click the /Default.aspx file in the root of Web and choose view in browser. This will launch it in the VS web server without loading it in the debugger so it won't stop on every error it will just redirect to the setup page after it detects that it needs to run scripts.

Hope that helps,

Joe

7/14/2012 1:33:04 PM
Gravatar
Total Posts 2

Re: IndexOutofRange Exception

Thanks joe,

It works now.

Thanks Thanks

 

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