Build a solution
Why do server errors occur on running a solution, even if the solution is building successfully?
Compile time versus run-time errors. See this stackoverflow thread for the difference between these two.
From wikipedia:
Thus, for example, a "run-time error" is detected only during the execution of the program, whereas a "compile-time error" is detected by the compiler before the program is started.
It's impossible for the compiler to catch all errors beforehand: see the 'halting problem'.
There are several possibilities:
- Difference in run-time vs. compile-time environments (version of .NET, version of IIS, system-level web.config or machine.config or applicationHost.config, etc)
- Run-time errors vs. compile-time errors
- Different security environment / permissions
- Different database connection string requirements
- Using IIS vs. Cassini
If you have dynamic references (eg. if you're using NHibernate, for example), it's possible that there are references to an assembly that's not present. These kind of references cannot be picked up by the compiler. It's only one of many possible situations where you'll get a run-time error that's not logic related.
As Q8-coder said, what is the error? Impossible to give solutions without knowing what the error is.
精彩评论