3

I'm Totally new in ASP.net and currently working on a CRM application. This project uses .mdb files as backend but I am getting the following runtime error:

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.Data.OleDb.OleDbException: Unspecified error Stack Trace:

[OleDbException (0x80004005): Unspecified error]
EmployeeManager.isUser(String strUID, String strPswd) in d:\hosting\nitindia\App_Code\EmployeeManager.vb:481 Employees.BtnSubmit_Click(Object sender, EventArgs e) in d:\hosting\nitindia\Employees.aspx.vb:35 System.Web.UI.WebControls.Button.OnClick(EventArgs e) +111
System.Web.UI.WebControls.Button.RaisePostBackEvent(String eventArgument) +110
System.Web.UI.WebControls.Button.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String eventArgument) +10
System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument) +13 System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData) +36
System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +1565

The above error occurs only when we upload these pages & test online. When running on localhost the error is not being raised.

What is the cause of this issue, and solution?

Grant Thomas
  • 44,454
  • 10
  • 85
  • 129
Amol K
  • 31
  • 1
  • 1
  • 2

3 Answers3

3

System.Data.OleDb.OleDbException: Unspecified error

This error mostly belongs to permission error, for this error we have mutiple solutions as per situation

  1. Put the impersonate=false in web.config file.

  2. If you want to put the impersonate = true in that case you need to provide the read/write permission to impersonate user on "C:\Documents and Settings\server name\ASPNET" folder or through process monitor utility you can check which file don't have sufficient permission.

  3. If you have windows server 2008 then you will not found the ASPNET folder and still want impersonate=true then you need to change the configuration in IIS 7.5/7.0.

Go to IIS -> select your application pool -> Advanced Setting -> Process Model ->Identity=ApplicationPoolIdentity

Go to IIS -> select your application pool -> Advanced Setting -> Load User Profile = False

See here for more details.

Scott
  • 21,211
  • 8
  • 65
  • 72
1

Both of these conditions may cause this (rather unhelpfully named) error to occur:

  • The ASPNET account not having permissions to open the file.

  • The database file is locked by another user.

J. Polfer
  • 12,251
  • 10
  • 54
  • 83
DaveRead
  • 3,371
  • 1
  • 21
  • 24
0

for answer finders :

try to look into https://learn.microsoft.com/en-us/iis/application-frameworks/running-classic-asp-applications-on-iis-7-and-iis-8/using-classic-asp-with-microsoft-access-databases-on-iis#using-process-monitor-to-gather-more-information and set Permissions on the Temporary Folders

PS in my case it was impersonate user who does not have access to current user temp folder C:\Users\`Username`\AppData\Local\Temp\

  • Welcome to Stack Overflow! While links are great way of sharing knowledge, they won't really answer the question if they get broken in the future. Add to your answer the essential content of the link which answers the question. In case the content is too complex or too big to fit here, describe the general idea of the proposed solution. Remember to always keep a link reference to the original solution's website. See: [How do I write a good answer?](https://stackoverflow.com/help/how-to-answer) – sɐunıɔןɐqɐp Jul 26 '18 at 07:11