robconery / mvc3 Goto Github PK
View Code? Open in Web Editor NEWCode and Resources for Real-World ASP.NET MVC3
Home Page: http://tekpub.com/productions/mvc3
Code and Resources for Real-World ASP.NET MVC3
Home Page: http://tekpub.com/productions/mvc3
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 '[email protected]' 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 '[email protected]' 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 '[email protected]' 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__AnonymousType6
1 , 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, IDictionary
2 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, IList
1 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__DisplayClass8
1.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
Why don't the unit tests from github use the SqlCE database? I can't get my connection to work as I'm following along, so I pulled the project from github and it's not using the SqlCE instance.
Hello -
Downloaded code and trying to follow along... when I run app and browse to /productions/edit/1 - I get the below error. Thoughts?
Kevin
Multiple types were found that match the controller named 'productions'. This can happen if the route that services this request ('{controller}/{action}/{id}') does not specify namespaces to search for a controller that matches the request. If this is the case, register this route by calling an overload of the 'MapRoute' method that takes a 'namespaces' parameter.
This is because the default MVC ValidateAntiForgeryToken only works with POST requests and backbone uses PUT and DELETE.
There is a workaround at http://www.codethinked.com/asp.net-mvc-ajax-csrf-protection-with-jquery-1.5 but it is a pain to do and now it supports validation for ajax-only.
too much friction...
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.