Server Error in '/' Application.

An OLE DB Provider was not specified in the ConnectionString.  An example would be, 'Provider=SQLOLEDB;'.

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.ArgumentException: An OLE DB Provider was not specified in the ConnectionString.  An example would be, 'Provider=SQLOLEDB;'.

Source Error:


Line 17:     public AppliedStudentsGallery()
Line 18:     {
Line 19:          con = new OleDbConnection(ConfigurationManager.ConnectionStrings["mydsn"].ConnectionString);
Line 20:       //  con.Open();
Line 21:     }

Source File: d:\inetpub\vhosts\srgcmzn.com\httpdocs\BFA\AppliedStudentsGallery.aspx.cs    Line: 19

Stack Trace:


[ArgumentException: An OLE DB Provider was not specified in the ConnectionString.  An example would be, 'Provider=SQLOLEDB;'.]
   System.Data.OleDb.OleDbConnectionString.ValidateProvider(String progid) +1195779
   System.Data.OleDb.OleDbConnectionString.ValidateConnectionString(String connectionString) +300
   System.Data.OleDb.OleDbConnectionString..ctor(String connectionString, Boolean validate) +464
   System.Data.OleDb.OleDbConnectionFactory.CreateConnectionOptions(String connectionString, DbConnectionOptions previous) +39
   System.Data.ProviderBase.DbConnectionFactory.GetConnectionPoolGroup(DbConnectionPoolKey key, DbConnectionPoolGroupOptions poolOptions, DbConnectionOptions& userConnectionOptions) +167
   System.Data.OleDb.OleDbConnection.ConnectionString_Set(DbConnectionPoolKey key) +59
   System.Data.OleDb.OleDbConnection.set_ConnectionString(String value) +35
   System.Data.OleDb.OleDbConnection..ctor(String connectionString) +26
   AppliedStudentsGallery..ctor() in d:\inetpub\vhosts\srgcmzn.com\httpdocs\BFA\AppliedStudentsGallery.aspx.cs:19
   ASP.bfa_appliedstudentsgallery_aspx..ctor() in d:\inetpub\vhosts\srgcmzn.com\tmp\root\92f4caf8\410b99ec\App_Web_a3ld3apd.44.cs:0
   __ASP.FastObjectFactory_app_web_a3ld3apd.Create_ASP_bfa_appliedstudentsgallery_aspx() in d:\inetpub\vhosts\srgcmzn.com\tmp\root\92f4caf8\410b99ec\App_Web_a3ld3apd.48.cs:0
   System.Web.Compilation.BuildResultCompiledType.CreateInstance() +31
   System.Web.Compilation.BuildManager.CreateInstanceFromVirtualPath(VirtualPath virtualPath, Type requiredBaseType, HttpContext context, Boolean allowCrossApp) +100
   System.Web.UI.PageHandlerFactory.GetHandlerHelper(HttpContext context, String requestType, VirtualPath virtualPath, String physicalPath) +31
   System.Web.UI.PageHandlerFactory.GetHandler(HttpContext context, String requestType, String virtualPath, String path) +37
   System.Web.MaterializeHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +339
   System.Web.HttpApplication.ExecuteStepImpl(IExecutionStep step) +48
   System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +159


Version Information: Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.7.4087.0