בעיה עם WebService
יש לי פונקציה ב webSerivce שמנסה להתחבר למסד נתונים ע"י שימוש בקוד הבא:
יש לי פונקציה ב webSerivce שמנסה להתחבר למסד נתונים ע"י שימוש בקוד הבא:
OleDbConnection con = new OleDbConnection("Provider=Microsoft.Jet.OLEDB.4.0;Data Source="+Server.MapPath("scheduler.mdb").ToString());
אבל כשאני מנסה להריץ את הפונקציה אני מקבל את השגיאה:An unhandled exception of type 'System.InvalidOperationException' occurred in system.web.services.dll Additional information: HttpContext is not available. This class can only be used in the context of an ASP.NET request.
למישהו יש רעיונות למה אפשר לעשות??