Exception: System.UnauthorizedAccessException

Post here for help with installing or upgrading mojoPortal pre-compiled release packages. When posting in this forum, please provide all relevant details. You may also want to review the installation or upgrading documentation.

If you have questions about using the source code or working with mojoPortal in Visual Studio, please post in the Developer forum.

Post here for help with installation of mojoPortal pre-compiled release packages

When posting in this forum, please try to provide as many relevant details as possible. Particularly the following:

  • What operating system were you running when the bug appeared?
  • What database platform is your site using?
  • What version of mojoPortal are you running?
  • What version of .NET do you use?
  • What steps are necessary to reproduce the issue? Compare expected results vs actual results.

You may also want to review the installation or upgrading documentation.

If you have questions about using the source code or working with mojoPortal in Visual Studio, please post in the Developer forum.

This thread is closed to new posts. You must sign in to post in the forums.
8/26/2011 7:30:47 AM
Gravatar
Total Posts 51

Exception: System.UnauthorizedAccessException

Hi Joe,

mojoPortal version 2.3.6.5 SqlCe
Operating System Microsoft Windows NT 6.0.6002 Service Pack 2
ASP.NET Info v4.0.30319 Running in Full Trust
Server Time Zone GTB Daylight Time
Server Local Time (GMT 3) 8/26/2011 3:08:04 PM
Greenwich Mean Time (GMT/UTC) 8/26/2011 12:08:04 PM

Under Windows Logs/application in Server I see following error. It happens many times daily. It's very strange because this is the path in my computer not in the server. Perhaps I do something wrong by installation?.

Thanks for your help,
Erhan

 

An unhandled exception occurred and the process was terminated.

Application ID: /LM/W3SVC/5681/ROOT

Process ID: 4132

Exception: System.UnauthorizedAccessException

Message: Access to the path 'C:\Users\Erhan\Documents\Visual Studio 2010\WebSites\xxxx\Data\Sites\1\index\' is denied.

StackTrace:    at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
   at System.IO.Directory.InternalCreateDirectory(String fullPath, String path, Object dirSecurityObj)
   at System.IO.Directory.CreateDirectory(String path)
   at mojoPortal.Business.WebHelpers.IndexWriterTask.ProcessIndexingQueue()
   at mojoPortal.Business.WebHelpers.IndexWriterTask.RunTask()
   at mojoPortal.Business.WebHelpers.IndexWriterTask.RunTaskOnNewThread(Object oTask)
   at System.Threading.QueueUserWorkItemCallback.WaitCallback_Context(Object state)
   at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean ignoreSyncCtx)
   at System.Threading.QueueUserWorkItemCallback.System.Threading.IThreadPoolWorkItem.ExecuteWorkItem()
   at System.Threading.ThreadPoolWorkQueue.Dispatch()

8/26/2011 7:48:23 AM
Gravatar
Total Posts 18439

Re: Exception: System.UnauthorizedAccessException

Hi Erhan,

The way the indexing works is that items to be indexed are serialized first into the database in the mp_IndexingQueue table and the index path is stored there as part of the data. Then a task runs on a background thread to process the rows and update the index. So if you moved a site when it had rows in the table then it would be incorrect. Rebuilding the index should clear out the table and re-index from scratch, if all else fails you could run a query and delete all rows from that table and the mp_TaskQueue table.

Hope that helps,

Joe

8/26/2011 8:45:50 AM
Gravatar
Total Posts 51

Re: Exception: System.UnauthorizedAccessException

Hi Joe,

Rebuilding search index did I before. It didn't solve problem.

It's very interesting. I used SQL Query Tool and didn't see any data in the tables mp_IndexingQueue and mp_TaskQueue. These tables are empty, there is no row.

Thanks,

Erhan

 

8/26/2011 8:54:45 AM
Gravatar
Total Posts 18439

Re: Exception: System.UnauthorizedAccessException

Hi Erhan,

Do you have more than one installation? The windows log would show it from any installation whereas the mojoportal log will only show errors of the current installation. So I think the error in your windows log is not from the site you are working on but another copy running in a different place on the machine?

Hope that helps,

Joe

8/26/2011 10:57:41 AM
Gravatar
Total Posts 51

Re: Exception: System.UnauthorizedAccessException

Yes, I have more than one installation. The tables mp_IndexingQueue and mp_TaskQueue in another copy have data. I deleted these rows. I think this will solve my problem.

Many many thanks,

Erhan

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