Tengo un gridview y como datasource tiene un objectdatasource, hasta ahí todo bien. El problema es que cuando le doy "play" para ver como va quedando me tira el siguiente error:
Server Error in '/Webconmysql' Application. Object reference not set to an instance of an object. 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.NullReferenceException: Object reference not set to an instance of an object.
Source Error: Cita: Line 849: public override MembershipUser GetUser(object providerUserKey, bool userIsOnline)
Line 850: {
Line 851: MySqlConnection conn = new MySqlConnection(connectionString);
Line 852: MySqlCommand cmd = new MySqlCommand("SELECT PKID, Username, Email, PasswordQuestion," +
Line 853: " Comment, IsApproved, IsLockedOut, CreationDate, LastLoginDate," +
Source File: c:\Documents and Settings\Frehley\Escritorio\Webconmysql\App_Code\M ySQLMembershipProvider.cs Line: 851
Stack Trace: Cita: [NullReferenceException: Object reference not set to an instance of an object.]
MySql.Data.Common.DBConnectionString.ParseKeyValue Pairs(String src) +42
MySql.Data.Common.DBConnectionString.Parse(String newConnectString) +31
MySql.Data.MySqlClient.MySqlConnection.set_Connect ionString(String value) +25
MySql.Data.MySqlClient.MySqlConnection..ctor(Strin g connectionString) +70
Andri.Web.MySqlMembershipProvider.GetUser(Object providerUserKey, Boolean userIsOnline) in c:\Documents and Settings\Frehley\Escritorio\Webconmysql\App_Code\M ySQLMembershipProvider.cs:851
[TargetInvocationException: Exception has been thrown by the target of an invocation.]
System.RuntimeMethodHandle._InvokeMethodFast(Objec t target, Object[] arguments, SignatureStruct& sig, MethodAttributes methodAttributes, RuntimeTypeHandle typeOwner) +0
System.RuntimeMethodHandle.InvokeMethodFast(Object target, Object[] arguments, Signature sig, MethodAttributes methodAttributes, RuntimeTypeHandle typeOwner) +72
System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture, Boolean skipVisibilityChecks) +358
System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture) +29
System.Web.UI.WebControls.ObjectDataSourceView.Inv okeMethod(ObjectDataSourceMethod method, Boolean disposeInstance, Object& instance) +484
System.Web.UI.WebControls.ObjectDataSourceView.Exe cuteSelect(DataSourceSelectArguments arguments) +1868
System.Web.UI.DataSourceView.Select(DataSourceSele ctArguments arguments, DataSourceViewSelectCallback callback) +13
System.Web.UI.WebControls.DataBoundControl.Perform Select() +140
System.Web.UI.WebControls.BaseDataBoundControl.Dat aBind() +68
System.Web.UI.WebControls.DetailsView.DataBind() +4
System.Web.UI.WebControls.BaseDataBoundControl.Ens ureDataBound() +61
System.Web.UI.WebControls.DetailsView.EnsureDataBo und() +154
System.Web.UI.WebControls.CompositeDataBoundContro l.CreateChildControls() +67
System.Web.UI.Control.EnsureChildControls() +97
System.Web.UI.Control.PreRenderRecursiveInternal() +50
System.Web.UI.Control.PreRenderRecursiveInternal() +171
System.Web.UI.Control.PreRenderRecursiveInternal() +171
System.Web.UI.Control.PreRenderRecursiveInternal() +171
System.Web.UI.Control.PreRenderRecursiveInternal() +171
System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +5731
Version Information: Microsoft .NET Framework Version:2.0.50727.42; ASP.NET Version:2.0.50727.42
Si en lugar de poner
Cita: Line 851: MySqlConnection conn = new MySqlConnection(connectionString);
Pusiera la cadena de conección (data source, user, password...etc), no me tira ese error.
Espero que alguien me pueda dar una mano.
Salu2!