简体   繁体   中英

Can't log into ASP.NET MVC site once on IIS

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.

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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM