English 中文(简体)
答复。 转至COM+ 目 录
原标题:Response.Redirect in a COM+ Object Called from Classic ASP Page

基本上,我们从国际交易日志第5号移至国际交易日志第7号,我正试图更新我们的一些旧物体。 NET在C#中重写。 迄今为止,我所看到的是被称为COM+物体的古典协会网页,然后我试图在COM+物体内进行简单的转导(这只是为了测试目的,它不是最终目标)。

我的问题/问题是,为什么间接呼吁没有适当发挥作用? 我做一些错误,或你不能在COM+物体内转移? 所有这些都是一片空白的白页,如果我检查国际太阳系的标志,我看不到任何错误。

Here is my code so far:
In Classic ASP (the call to COM+)

Set oBankReg = CreateObject("BVSRegistration.SignIn")  
oBankReg.GetBankId(bankid)

C# COM 反对:

using System;  
using System.Web;  
using System.Text;  
using System.EnterpriseServices;  
using System.Collections.Generic;  
using System.Runtime.InteropServices;  

[assembly: ApplicationName("BVSRegistration")]  
[assembly: Description("COM+ upgrade of the BVSRegistration VB6 SignIn.cls.")]  
[assembly: ApplicationActivation(ActivationOption.Server)]  
[assembly: ApplicationAccessControl(false, AccessChecksLevel = AccessChecksLevelOption.ApplicationComponent)]  

namespace BVSRegistration  
{   
    public class SignIn : ServicedComponent       
    {    
        public void GetBankId(string bankid)  
        {  
            HttpContext.Current.Response.Redirect("http://www.google.com");  
        }  
    }  
}  

任何想法? 增 编

最佳回答

HttpContext将只放在伙伴关系的范围内。 NET设置。 由于你是传统协会的召唤,它获得了实际要求/反应权。

你们应该做的是,是否要从您的COM+目标中转而去,并称传统的伙伴关系相当于再方向。

问题回答

ASP. 伙伴关系网<代码>Response.Redirect。 基础设施建设网页上没有使用的蚊帐。

你们要么要放弃伙伴关系,要么打电话给ASPResponse。 Redirect





相关问题
Anyone feel like passing it forward?

I m the only developer in my company, and am getting along well as an autodidact, but I know I m missing out on the education one gets from working with and having code reviewed by more senior devs. ...

NSArray s, Primitive types and Boxing Oh My!

I m pretty new to the Objective-C world and I have a long history with .net/C# so naturally I m inclined to use my C# wits. Now here s the question: I feel really inclined to create some type of ...

C# Marshal / Pinvoke CBitmap?

I cannot figure out how to marshal a C++ CBitmap to a C# Bitmap or Image class. My import looks like this: [DllImport(@"test.dll", CharSet = CharSet.Unicode)] public static extern IntPtr ...

How to Use Ghostscript DLL to convert PDF to PDF/A

How to user GhostScript DLL to convert PDF to PDF/A. I know I kind of have to call the exported function of gsdll32.dll whose name is gsapi_init_with_args, but how do i pass the right arguments? BTW, ...

Linqy no matchy

Maybe it s something I m doing wrong. I m just learning Linq because I m bored. And so far so good. I made a little program and it basically just outputs all matches (foreach) into a label control. ...

热门标签