-1

I finally got my ASP.NET MVC application hosted on my local Windows/IIS server. I went to the login page but when I try to log in it says,

Error: An error occurred while processing your request

This is fairly non-descript...

My gut feeling is that when I did the web deploy, I didn't deploy the localdb(?) where the users' credentials are stored. Before I try to re-deploy the entire app, I'd like to see if anyone can offer some guidance. Am I on the right track? Are there other possible causes/solutions I should investigate?

I'm using the default registration/login system that is in the project to start with, and it woks just fine in VS. I did a regular web deploy to my IIS server, and the site works just fine until you go to log in.

trademark
  • 565
  • 4
  • 21
  • 2
    You may want to read on debugging issues in IIS. There are many articles/posts. I.e. http://stackoverflow.com/questions/5385714/deploying-website-500-internal-server-error may be a starting point. In current form post is way too broad/lacking research for SO. – Alexei Levenkov Jan 16 '16 at 03:55
  • Thanks for the link. That's not the error I received but it looks like there may be some useful info there. The post is broad because the error says basically nothing, and I have only found a couple of other cases like this on the web. None of the other issues had clear answers. I am grateful for your help. – trademark Jan 16 '16 at 03:59
  • 1
    You need to disable custom errors in your app so that you can see the detailed error information. My bet is that your connection string is not updated to get data from your production db. – Shyju Jan 16 '16 at 04:05
  • On the error screen you see, does it say anything about custom errors? – mason Jan 16 '16 at 04:25
  • It did not, but I tried loading the site on the server's browser and it shows full errors to localhost. That was a good starting point to get to the conclusion. Thanks again! – trademark Jan 16 '16 at 21:24

1 Answers1

2

Fixed: This issue was caused (as suspected) by the inaccessibility of the LocalDB where all the users' credentials are stored. VS uses this light DB instead of making you install SQL Express or another alternative (much like IIS Express works better for debugging than full IIS). When I push my application to IIS from VS, the database wasn't connecting. I eventually found this other SO question, and the top answer fixed my issue.

How to deploy ASP.NET MVC 4 application using localDB to local IIS on Windows 7?

This will solve the issue, but there is a lot of conflict on the web as to whether or not it is ok to use LocalDB in production, so if you have a lot riding on your project you might want to take a look at that. For my purpose, LocalDB is just fine, so this solved the issue. Thank you to all who responded to my (admittedly) broad question. I'm sure this will be a useful thread for others with the same issue.

Community
  • 1
  • 1
trademark
  • 565
  • 4
  • 21