访问第三方dll功能时将Mvc应用程序重定向到登录页面 [英] Mvc application being redirected to login page when accessing third party dll function

查看:63
本文介绍了访问第三方dll功能时将Mvc应用程序重定向到登录页面的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在MVC3应用程序中使用了第三方dll.在本地主机(我的电脑)上使用dll时,它的工作原理很棒.但是,当我将其上传到Web服务器(共享主机)时,遇到了问题.不使用dll中的功能时,应用程序运行良好.但是,当第三方dll的任何功能被调用时,页面将被重定向到登录页面.

I'm using a third party dll in my MVC3 application. When using the dll at localhost(my PC) it works great. But when I upload it to web server(shared hosting) I encounter a problem. The application works fine when not using the functions in the dll. But when any function of the third party dll is called upon the page is redirected to the login page.

注意::我正在使用表单身份验证.
我已经设置了文件夹属性,并为应用程序设置了< identity impersonate ="true"> 以访问Web服务器中的文件和文件夹.

NOTE: I'm using Forms Authentication.
I had set folder properties and set <identity impersonate="true"> for the application to access files and folder in the web server.

推荐答案

您的部署包应包含asp.net MVC的必要文件.在Visual Studio中执行以下步骤:

Your deployment package should contain necessary files for asp.net MVC. follow this steps in Visual Studio:

  1. 右键单击您的项目
  2. 选择添加可部署的依赖关系..."
  3. 选择Razor和MVC参数
  4. 构建部署包
  5. 开始发布

通过执行以下步骤,即使主机/服务器不支持MVC或Razor,我们也将确保MVC应用程序可以放心地工作.

by doing this steps we'll ensure that MVC application works confidently even if host/server doesn't support MVC or Razor.

这篇关于访问第三方dll功能时将Mvc应用程序重定向到登录页面的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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