PDA

View Full Version : خطای Argumnet Exception was unhandled by user code



bitcob589
پنج شنبه 20 بهمن 1390, 09:14 صبح
با سلام
خطای زیر به چه علت می تواند باشد

Argumnet Exception was unhandled by user code
Unable to find the requested.Net Framework Data Provider.It may not be installed

و در خط سوم کد زیر خطا رخ می دهد

string dataProviderName = BalloonShopConfiguration.DbProviderName;
string conntionstring = BalloonShopConfiguration.DbConntionstring;
[DbProviderFactory factory = DbProviderFactories.GetFactory(dataProviderName);
DbConnection conn = factory.CreateConnection();
conn.ConnectionString = conntionstring;
DbCommand comm = conn.CreateCommand();
comm.CommandType = CommandType.StoredProcedure;
return comm;