.CFM的文件或.CFM重定向Asp.net处理.aspx页面中? [英] Asp.net processing of .CFM files or Redirects from .cfm to .aspx page?

查看:241
本文介绍了.CFM的文件或.CFM重定向Asp.net处理.aspx页面中?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个用来处理表格数据(从远程服务器)和发送基于表单数据的用户电子邮件遗留.CFM(ColdFusion的)页面。现在,我不再用ColdFusion和托管反而是在GoDaddy.com的'自由'ASP.NET(3.5)。我不知道我是多么的控制有超过这一点。但我在想,如果我能有,所有的请求(实际上,形式职位)要去.CFM页面重定向到一个aspx页面,我可以做必要处理Global.asax文件。
这怎么能在GoDaddys的限制呢?我知道我可以在IIS中创建一个虚拟目录。可能是GoDaddy的有一些内置的机制来重定向流量。例如,www.xyz.com/processform.cfm可以被定向到www.xyz.com/processform.aspx~~V?
谢谢!

I have a legacy .cfm (ColdFusion) page which used to process form data (from remote servers) and send users emails based on form data. Now I no longer use ColdFusion and instead hosting is at the 'free' ASP.NET (3.5) at GoDaddy.com. I am not sure how much control I have over that. But I was thinking if I can have a global.asax file where all requests (actually, form posts) going to the .cfm page get redirected to an aspx page where I can do the needed processing. How can this be done within GoDaddys limitations? I know I can create a Virtual Directory in IIS. May be GoDaddy has some built-in mechanism to redirect traffic. For example, www.xyz.com/processform.cfm can be directed to www.xyz.com/processform.aspx? Thanks!

推荐答案

Koby Mizrahy接近我的帮助。我的问题是,我正在运行博客引擎.NET 2.0作为我的GoDaddy的IIS经典模式网站的主要应用。所以.CFM分机没有被ASP.NET引擎,从而要么Web.Config中或Global.asax中没有变化帮助处理。我不得不改变,以集成模式。这里是我做过什么来解决:

Koby Mizrahy was close to helping me. My problem was that I was running Blog Engine .NET 2.0 as the main application of my website in GoDaddy's IIS Classic Mode. So the .cfm extension were not processed by the ASP.NET engine and hence no changes to either Web.Config or Global.asax were helping. I had to change to Integrated mode. Here is what I did to fix:

在Web.Config中,在处理程序节点,以确保表单提交到.CFM将处理该加,否则我得到了一些405错误。

In Web.Config, added this in the 'Handlers' node to make sure Form Posts to .cfm would be processed, otherwise I got some 405 error.

 <add name="ColdFusion" path="*.cfm" verb="*" type="System.Web.StaticFileHandler" resourceType="Unspecified" preCondition="integratedMode" />

然后在Global.asax中,我在的Application_BeginRequest处理过这样的

Then in global.asax, I had this in the Application_beginrequest handler

if (Request.Url.ToString().Contains("TourEmail-act.cfm"))// 
    {
   Server.Transfer("/360Flash/TourEmail-act.aspx");
   }
 }

问题解决了!非常感谢您Mizrahy!

Problem solved! Thank you very much Mizrahy!

这篇关于.CFM的文件或.CFM重定向Asp.net处理.aspx页面中?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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