When you run into an issue or have a question about ASP.NET MVC the best place for it is the MVC Forum. When you write your question, there are a few simple things that you can do to make it easier for the ‘experts’ to answer (and hence to get an answer quicker!).
1. Try to isolate the issue
If an issue you see in a complex scenario can also be seen in a simpler scenario, it is always better to report it on the simpler scenario. It makes the question shorter and easier to read, as it keeps it focused on the essential. You will get your question answered much quicker if you can reproduce the problem with the simplest possible code. More likely than not, you'll figure out the problem when you make the simple repro.
2. What MVC release are you using
The official release of MVC is version 3. There are also various preview bits and samples that you can download from Codeplex. Just mention exactly what you are using. If you’re using some preview bits, you can include a link to them to them to remove any ambiguity.
- Mention which version of the .NET Framework you’re using, e.g. 3.5, 3.5 SP1, 4.0, 4.5
3. Mention what environment you’re running in
What web server are you using
Most likely, you are using either “Cassini” (the test web server built in Visual Studio), IIS Express, IIS6 (XP), or IIS7 (on Vista) IIS 7.5 ( Windows 7 or Windows Server 2008). In many cases it makes a relevant difference, so it’s good to mention it.
3. Search for your specific error
Take a quick look at the MVC FAQ and search before asking. Replace zWidget with your search word in http://forums.asp.net/search/SearchResults.aspx?q=zWidget+AND+sectionid%3a1146&o=DateDescending You might try searching stackOverflow
5. Include complete stack traces
If you’re getting an error in the browser, make sure you include the full stack trace that you see in there, and not just the text of the error. Looking through a stack trace can reveal some important clues about the issue. If you don't get a stack trace, make sure you disable Step Into Just My Code. A stack trace is shown below.
Server Error in '/' Application.
Attempted to divide by zero.
Exception Details: System.DivideByZeroException: Attempted to divide by zero.
Source File: s:\rm\MvcStackTrace\MvcStackTrace\Controllers\HomeController.cs Line: 18
Version Information: Microsoft .NET Framework Version:2.0.50727.4200; ASP.NET Version:2.0.50727.4016
4. If it’s a DB problem, report using a standard DB (AdventureWorksLT or Northwind).
Obviously, we don’t expect you to use Northwind or Adventure Works Light in your real project. But when you run into an issue with your custom schema, you should always check whether you are able to see the same thing with the standard DBs. Those DBs have schemas which contain many of the common patterns that you may be using. e.g. For One to Many relationship, you Northwind’s Product/Category, and for Many To Many, use Employees/Territories.
There are a few reasons why doing this is preferred. First, most readers are familiar with those schemas, so they can make sense of the situation quicker without having to analyze a custom schema. It also makes it a lot easier for people to try to reproduce the issue you’re seeing, since everyone has those sample databases. And finally, if the issue calls for a sample that demonstrates a workaround, using the standard DB, makes it much more useful to everyone else who runs into it.
Clearly, there are some situation where your custom schema is just different and using the standard DBs will not work. In those cases, just try to precisely describe your schema. Including a diagram or the SQL DDL can help too. In a nutshell, make sure that a reader not familiar with your database will understand enough of it to make sense of your question.
if you’re getting an error in the browser, make sure you include the full stack trace that you see in there, and not just the text of the error. Looking through a stack trace can reveal some