Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Registering user : Conversion failed when converting the nvarchar value 'me@email.co.uk' to data type int. #4

Open
GarethElms opened this issue Nov 22, 2011 · 1 comment

Comments

@GarethElms
Copy link

When I try and register I get this problem. The same issue comes up when I execute the test project.


Server Error in '/' Application.

Conversion failed when converting the nvarchar value 'me@email.co.uk' to data type int.

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.SqlClient.SqlException: Conversion failed when converting the nvarchar value 'me@email.co.uk' to data type int.

Source Error:

Line 260: cmd.Connection = conn;
Line 261: cmd.Transaction = tx;
Line 262: result += cmd.ExecuteNonQuery();
Line 263: }
Line 264: tx.Commit();

Source File: E:\Users\Gareth\Documents\Code\dotNet\external\tekpub-mvc3-b6feb8e\Source\VidPub.Web\Infrastructure\Massive.cs Line: 262

Stack Trace:

[SqlException (0x80131904): Conversion failed when converting the nvarchar value 'me@email.co.uk' to data type int.]
System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection) +2084770
System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection) +5084476
System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning() +234
System.Data.SqlClient.TdsParser.Run(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj) +2275
System.Data.SqlClient.SqlCommand.FinishExecuteReader(SqlDataReader ds, RunBehavior runBehavior, String resetOptionsString) +215
System.Data.SqlClient.SqlCommand.RunExecuteReaderTds(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, Boolean async) +987
System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method, DbAsyncResult result) +162
System.Data.SqlClient.SqlCommand.InternalExecuteNonQuery(DbAsyncResult result, String methodName, Boolean sendToPipe) +178
System.Data.SqlClient.SqlCommand.ExecuteNonQuery() +137
Massive.DynamicModel.Execute(IEnumerable1 commands) in E:\Users\Gareth\Documents\Code\dotNet\external\tekpub-mvc3-b6feb8e\Source\VidPub.Web\Infrastructure\Massive.cs:262 Massive.DynamicModel.Execute(DbCommand command) in E:\Users\Gareth\Documents\Code\dotNet\external\tekpub-mvc3-b6feb8e\Source\VidPub.Web\Infrastructure\Massive.cs:246 Massive.DynamicModel.Update(Object o, Object key) in E:\Users\Gareth\Documents\Code\dotNet\external\tekpub-mvc3-b6feb8e\Source\VidPub.Web\Infrastructure\Massive.cs:481 CallSite.Target(Closure , CallSite , Users , <>f__AnonymousType61 , Object ) +272
VidPub.Web.Model.Users.SetToken(String token, Object id) in E:\Users\Gareth\Documents\Code\dotNet\external\tekpub-mvc3-b6feb8e\Source\VidPub.Web\Model\Users.cs:38
CallSite.Target(Closure , CallSite , Users , String , Object ) +271
VidPub.Web.Controllers.AccountController.SetToken(Object userID) in E:\Users\Gareth\Documents\Code\dotNet\external\tekpub-mvc3-b6feb8e\Source\VidPub.Web\Controllers\AccountController.cs:77
CallSite.Target(Closure , CallSite , AccountController , Object ) +259
VidPub.Web.Controllers.AccountController.Register(String Email, String Password, String Confirm) in E:\Users\Gareth\Documents\Code\dotNet\external\tekpub-mvc3-b6feb8e\Source\VidPub.Web\Controllers\AccountController.cs:67
lambda_method(Closure , ControllerBase , Object[] ) +293
System.Web.Mvc.ActionMethodDispatcher.Execute(ControllerBase controller, Object[] parameters) +17
System.Web.Mvc.ReflectedActionDescriptor.Execute(ControllerContext controllerContext, IDictionary2 parameters) +208 System.Web.Mvc.ControllerActionInvoker.InvokeActionMethod(ControllerContext controllerContext, ActionDescriptor actionDescriptor, IDictionary2 parameters) +27
System.Web.Mvc.<>c__DisplayClass15.b__12() +55
System.Web.Mvc.ControllerActionInvoker.InvokeActionMethodFilter(IActionFilter filter, ActionExecutingContext preContext, Func1 continuation) +263 System.Web.Mvc.<>c__DisplayClass17.<InvokeActionMethodWithFilters>b__14() +19 System.Web.Mvc.ControllerActionInvoker.InvokeActionMethodWithFilters(ControllerContext controllerContext, IList1 filters, ActionDescriptor actionDescriptor, IDictionary2 parameters) +191 System.Web.Mvc.ControllerActionInvoker.InvokeAction(ControllerContext controllerContext, String actionName) +343 System.Web.Mvc.Controller.ExecuteCore() +116 System.Web.Mvc.ControllerBase.Execute(RequestContext requestContext) +97 System.Web.Mvc.ControllerBase.System.Web.Mvc.IController.Execute(RequestContext requestContext) +10 System.Web.Mvc.<>c__DisplayClassb.<BeginProcessRequest>b__5() +37 System.Web.Mvc.Async.<>c__DisplayClass1.<MakeVoidDelegate>b__0() +21 System.Web.Mvc.Async.<>c__DisplayClass81.b__7(IAsyncResult _) +12
System.Web.Mvc.Async.WrappedAsyncResult`1.End() +62
System.Web.Mvc.<>c__DisplayClasse.b__d() +50
System.Web.Mvc.SecurityUtil.b__0(Action f) +7
System.Web.Mvc.SecurityUtil.ProcessInApplicationTrust(Action action) +22
System.Web.Mvc.MvcHandler.EndProcessRequest(IAsyncResult asyncResult) +60
System.Web.Mvc.MvcHandler.System.Web.IHttpAsyncHandler.EndProcessRequest(IAsyncResult result) +9
System.Web.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +8964029
System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +184

@ghost
Copy link

ghost commented Dec 5, 2011

Same issue here when using the downloaded code and when implementing the token based security into my own app. Fails with same error in same place. Per an email from Rob, he will be working on it this week.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant