在服务器上的 ASP.NET MVC2 项目上创建用户时出现错误
我已将从 MS 模板创建的 ASP.NET MVC2 上传到远程服务器。除非我想注册新用户,否则它可以工作;验证后我收到此错误消息:
抱歉,发生错误 正在处理您的请求。
我应该怎么办 ?
I have uploaded the ASP.NET MVC2 created from MS Template to Remote server. It works except when I want to register a new user; after validation I got this error message:
Sorry, an error occurred while
processing your request.
What should I do ?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
我怀疑数据库位置不可写,但正如 Remus 所说,确定你需要获取以某种方式从服务器返回的错误/异常。
I would suspect that the database location is not writeable but as Remus said to know for sure you'll need to get the error/exception back from the server somehow.
您需要允许您的应用程序配置为在 IIS 下运行的帐户对
~/App_Data
目录进行写访问。当您第一次尝试注册用户时,应用程序需要创建.mdb
数据库文件。另外,如果您不使用 SQL Express 并且安装了 SQL Server,请不要忘记修改 web.config 中的连接字符串以匹配真实服务器的属性。You need to allow write access to the
~/App_Data
directory to the account your application is configured to run under IIS. When you try to register a user for the first time the application need to create the.mdb
database file. Also if you are not using SQL Express and have a SQL Server installed don't forget to modify the connection string in your web.config to match the properties of your real server.