|
|
Hi , I'm new to mvc . i downloaded your project but i don't know how to trace it . i mean if i want to statr a new one base on your code , what would be the steps of implementing that ? also , when i want to register new member , i get the error of websecurity.createmember() about display name and other stuff.. I tried to change table and make DisplayName unnecessary but that error still exists. can you at first tell me what are the steps ? and then how to fix this registration problem ? i appriciate your help ;)
Hi, Is it normal if i make 2 F5 when i'm loading the home page, i got "There is already an open DataReader associated with this Command which must be closed first." Do you know how i can fix this issue ? Thanks
i just downloaded it and opened it in visual studio 2012 and made a built, got errors regarding automapper and some dll, not being found. Sorry this is equal to one star.
@Html.ActionLink(Model.FirstIt em.ItemContent. Title, "Details", "Home", new {id=Model.First Item.Id}, null) is this an indication that's there is no connection to the database?
@hazz Actually, there is no technical for detect the database null or no connection to database here. This is only a simple sample. We need to develop that feature in advantage sample if needed.
When I add new article, an error i cannot solve is: Server Error in '/' Application. 'System.Web.HttpPostedFileWrap per' does not contain a definition for 'CreateImagePat hFromStream' 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: Microsoft.CShar p.RuntimeBinder .RuntimeBinderE xception: 'System.Web.Htt pPostedFileWrap per' does not contain a definition for 'CreateImagePat hFromStream' Source Error: Line 99: if (vm.SmallImage != null) Line 100: { Line 101: smallImagePath = vm.SmallImage.C reateImagePathF romStream(_item Storage); Line 102: } Line 103: Source File: e:\ASP.NET MVC 4 Sample (Magazine website)\C#\Web \Areas\Admin\Co ntrollers\ItemC ontroller.cs Line: 101 Stack Trace: [RuntimeBinderE xception: 'System.Web.Htt pPostedFileWrap per' does not contain a definition for 'CreateImagePat hFromStream'] CallSite.Target (Closure , CallSite , Object , IMediaItemStora ge ) +248 CIK.News.Web.Ar eas.Admin.Contr ollers.ItemCont roller.CreateOr UpdateItem(Obje ct vm, Boolean isNew) in e:\ASP.NET MVC 4 Sample (Magazine website)\C#\Web \Areas\Admin\Co ntrollers\ItemC ontroller.cs:10 1 CIK.News.Web.Ar eas.Admin.Contr ollers.ItemCont roller.Create(I temCreatingView Model viewModel) in e:\ASP.NET MVC 4 Sample (Magazine website)\C#\Web \Areas\Admin\Co ntrollers\ItemC ontroller.cs:48 lambda_method(C losure , ControllerBase , Object[] ) +127 System.Web.Mvc. ReflectedAction Descriptor.Exec ute(ControllerC ontext controllerConte xt, IDictionary`2 parameters) +261 System.Web.Mvc. ControllerActio nInvoker.Invoke ActionMethod(Co ntrollerContext controllerConte xt, ActionDescripto r actionDescripto r, IDictionary`2 parameters) +39 ...... thangchung and everyone help me please
Sorry, I am new to MVC and Microsoft Visual studio and connecting to or creating databases in general. I don't understand how to complete the first two steps Step 2: Run a database script, the script can be find at C#\1.DatabaseScripts\3.NewsDbS cript.sql Step 3: Host CIK.News.Web to IIS host When I try to run the database script I get a connect to server screen and don't know what to do from there. Any more detailed help on these two steps would be appreciated. Thanks
You can open your SQL server management studio tool to run that script, make sure you have SQL server installed in your machine. Then simple thing you can do is open IIS and create one application and browse to your location that you put this source code. Hope this help.
I am a beginner and having trouble with these steps. Step 2: Run a database script, the script can be find at C#\1.DatabaseScripts\3.NewsDbS cript.sql Step 3: Host CIK.News.Web to IIS host Where do I run the database script? Also it seems as though some .dll are missing from my solution.
I downloaded your version testing it find that an error i cannot solve is 'System.Web.HttpPostedFileWrap per' does not contain a definition for 'CreateImagePat hFromStream' when i look at the CreateImagePath FromStream in HttpPostedFileE xtension the function with 2 params and just got one param when you call. <code1> public static string CreateImagePath FromStream(this HttpPostedFileB ase postedFile, IMediaItemStora ge imageStorage) <code2> if (vm.SmallImage != null) { smallImagePath = vm.SmallImage.C reateImagePathF romStream(_item Storage); } not sure you uploaded the latest full version or not, can you please let me know. Anyway, thank you for your example.
Hi I like very much how did you implement the repository pattern, with this extensions and the functions in the GenericRepository. I get lost when you construct the ContextBuilder, ContextStorage, etc. So is there a blog, or a book where THIS implementation is described? if it's yours, great... why you don't spent/invest some time to describe it. Thanks again.
@JLSF As mention on description of this example, I introduced the DAL from another guys, actually he is my former teamleader. You can reference this at http://huyrua.wordpress.com/20 10/07/13/entity -framework-4-po co-repository-a nd-specificatio n-pattern/