在IIS上部署时,MVC 3 Web应用程序无法正常工作 [英] MVC 3 web application not working when deployed on IIS

查看:93
本文介绍了在IIS上部署时,MVC 3 Web应用程序无法正常工作的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

您好b $ b

我使用MVC 3 Framework创建了一个Web应用程序。



在Web应用程序中有一个登录表格和主页。

应用程序在开发环境中工作正常。

我已经将它部署在我的本地IIS上,它很好。



我的问题现在就开始了。

我正在尝试在服务器(IIS)上部署这个Web应用程序。

成功部署Web应用程序IIS。

IT在运行时没有出现任何错误。

我在服务器上也安装了.net framework 4.

问题是我不是能够使用在我的本地机器上正常工作的应用程序。

Hi
I have created one web application using MVC 3 Framework.

In web application there is one login form and home page.
The application is working fine in development environment.
I have deployed it on my local IIS , it is wrking fine.

My problem start now.
I am trying to deployed this web application On server(IIS).
Web Application deployed sucessfully on IIS.
ITs not giving any error while running.
I have installed .net framework 4 also on server.
problem is i am not able to lgoin using application which is working fine on my local machine.

推荐答案

听起来像是数据库的问题。这两个应用程序是否指向同一个数据库?如果不是,您应该这样做,这样您就可以使用生产数据库来测试本地代码,以确保生产数据库是最新的。您使用的是MVC4(或更早版本的)附带的简单身份验证数据库吗?如果是这样,数据库是否已创建?是否已创建用户以及您尝试使用的登录角色?如果不是,如果它是你自己的代码,那么有些东西是不同的,但无论哪种方式,如果代码是相同的,数据库就是问题。



你应该添加数据库的一个表,用于记录错误,并编写一个类来记录该表的内容。然后,您可以插入测试代码来记录服务器上发生的事情,找出代码失败的位置等。
Sounds like an issue with your database. Are both applications pointing to the same DB ? If they are not, you should make it so you can use your production DB to test your local code, to make sure that the production DB is up to date. Are you using the simple authentication DB that comes with MVC4 ( or an earlier equivalent ) ? If so, has the DB been created ? Have the users been created and the roles for the logins you're trying to use ? If not, if it's your own code, then something is different, but either way, if the code is the same, the DB is the issue.

You should add a table to your DB for logging errors and write a class to log things to that table. Then you can insert test code to log what is happening on your server, to work out where the code fails, etc.


这篇关于在IIS上部署时,MVC 3 Web应用程序无法正常工作的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆