Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
151 views
in Technique[技术] by (71.8m points)

asp.net mvc 3 - My Working Application MVC3 Razor Unexplainably stopped working :-( IIS 7

I have the following projects within my solution.

  • MyWebApplication.Data --> Here i interact with my Data Repository
  • MyWebApplication.Services --> Here i interact with the Data Layer
  • MyWebApplication.Web --> The UI which relies on the Service Layer
  • MyWebApplication.Tests --> Unit testing project

For MONTHS i have had NO problems with IIS in my local dev environment. Ready for a long weekend of programming but all day i have been getting 500 Server Errors when simply trying to resolve the Home page. Before I went to bed all was well, the entire day thereafter i could NOT even load the home/index view.

After looking at the logs it says continually MyWebApplication.Data.System (which is a class i created called System()) does not include Web. But no where in code is this true. Then i get another error of mismatching files in the Temp Directory.

Steps I have taken:

  1. Deleted all temp files
  2. Created a new repository in IIS and pointed URL there, No luck
  3. Cleaned solution
  4. Deleted all bin folders to have regenerated... No Luck

PLEASE HELP!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

Without the details of the error messages, one strategy may be to create a new MVC project and copy/paste the files over to it. A few other common causes:

  • Are you referencing any 64-bit libraries but compiling the project as 32-bit (or vice-versa)? Try changing the "bitness" of your application.
  • If your application is 32-bit and is running on a 64-bit server, you need to enable running 32-bit apps in IIS. See http://exhibita.com/blog/post/2010/03/30/IIS-75-on-x64-with-32bit-applications.aspx
  • If all else fails, please post the exact error messages. If all it says is "HTTP 500: Internal Server Error", you should enable debug output or run your app from the server itself (actually using a web browser on the server), which will tell IIS it's "safe" to display full debug information. The debugging messages have actually been pretty useful in my experience.

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...