Monday, August 2, 2010

SQlServer StreamInsight , Unable to Create Application Microsoft.ComplexEventProcessing.ConnectionException: Access is denied

StreamInside is the Microsoft version of CEP (Complex Event Processing) solution. Even it’s called Server server 2008 R2 StreamInside, It has nothing to do with the SQLServer 2008 R2. but in term of licensing. So you don’t need to install SQl server 2008 r2 in order to run the CEP.

after finished installing the StreamInside and setup one instance called StreamInside. time to write a hello world application.

System.ServiceModel.WSHttpBinding binding = new System.ServiceModel.WSHttpBinding(System.ServiceModel.SecurityMode.Message);
System.ServiceModel.EndpointAddress ea=new System.ServiceModel.EndpointAddress("http://localhost/StreamInsight/StreamInsght");

using (Server server = Server.Connect(ea,binding  ))
{

try
{
// Create application in the server. The application will serve
// as a container for actual CEP objects and queries.
Console.WriteLine("Creating CEP Application");
Application application = server.CreateApplication("TrafficJoinSample");

Then click and run, get the following error, access is denied.

c2

How comes ? then I run a cordbg and attach to the Host Server. Get the error stack trace.  It requires the user to be the Group of StreamInsightUser$[instanceName]
  image
 

Can I override to just remove the security enforcement. the short answer is No. It hardcoded the roles Check.
image

image

what’s the principalpermission?

image

image

even you override the .config and change the binding security mode to None. it still need this role check.

 

What' you have to do is make sure you are in the named group. It looks for me that I have to restart the PC to get refreshed on the group ownership.

you can use the following C# code to query all the groups you have.

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading;
using System.Security.Principal;

namespace ConsoleApplication2
{
    class Program
    {
        static void Main(string[] args)
        {

            System.Security.Principal.WindowsIdentity.GetCurrent().Groups.ToList().ForEach

                (e => Console.WriteLine(((System.Security.Principal.NTAccount)e.Translate(typeof(System.Security.Principal.NTAccount)))));

        }
    }
}

More troubleshooting entries.

2 comments:

Anonymous said...

It's called StreamInsight, not StreamInside.

androidyou said...

thanks, corrected. my typo, sorry.

 
Locations of visitors to this page