Response.Redirect in a COM+ Object Called from Classic ASP Page
- by ajdams
Basically we moved from IIS 5 to IIS 7 and I am trying to update some of our old COM objects to .NET by rewriting them in C#. What I am have so far is a Classic ASP page calling the COM+ object and then I am trying to do a simple redirect within the COM+ object (this is just for testing purposes, it's not what the object will do eventually).
My problem/question is, why does the redirect call not work properly? Am I doing something wrong or can you not redirect within a COM+ object? All that happens is a blank white page comes up and if I check the IIS logs, I see no errors.
Here is my code so far:
In Classic ASP (the call to COM+)
Set oBankReg = CreateObject("BVSRegistration.SignIn")
oBankReg.GetBankId(bankid)
Code in C# COM object:
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");
}
}
}
Any ideas? Thanks