[x]
Posted via EE Mobile

Search, ask, and monitor your questions on the go with EE Mobile. Visit Experts Exchange from your mobile device and never be out of touch again.

10/07/2009 at 08:32AM PDT, ID: 24792702
[x]
Attachment Details
[x]
The Solution Rating System

With so many solutions, how can you tell which solutions are most likely to help you and which ones are not? To provide you with a tool to use, we rate our solutions based on various elements that most accurately determine if a solution is a quality solution. To explain what factors affect the solution rating, here are the elements we take into consideration when formulating our solution rating.

  • The Grade of the Solution
  • The Zone Rank of the Expert Providing the Solution
  • The Number of Author and Expert Comments
  • The Number of Experts Contributing
  • The Feedback of the Community

Your Input Matters
Because of the way the system is set up, the most important variable in this equation is you. As a member of Experts Exchange, you are able to cast your vote on the quality of the solutions in regard to how complete, accurate, helpful and easy to understand each solution is. When you provide your feedback, each rating is adjusted accordingly. So, if you see a solution that has a poor rating that you think is a good solution, let us know by rating it. As you do, the rating will be adjusted and will become more accurate for other members of our site.

If you have any suggestions that you would like to make for our rating system, please ask a question in the Suggestions Zone of Community Support.

Thank you!

6.2

Acces Permissions for DCOM dll in ASP.NET IIS

Asked by bcolladay in DCOM, .NET Framework 2.x, Microsoft IIS Web Server

Tags: IIS DCOM Permissions

I am working on a website that uses DCOM for access to a proprietary database.  This is .NET 2.0.  I added it to the project through the add reference using the COM tab I selected the .exe file for the program as they suggest.  This works and I have a dll in my bin folder for my site.  I was able to make everything work in the Visual Studio environment on my local machine.  

I tried to implement the website on our web server and am getting permission errors:
Retrieving the COM class factory for component with CLSID {92A04261-BE5C-11D1-99CC-00C04FD3695E} failed due to the following error: 80070005.

I have added everyone I can think of into the Component Services-Security tab for the specified DCOM object:
IUSR_{LOCALMACHINE}
IWAM_{LOCALMACHINE}
{LOCALMACHINE}\ASPNET (ASP.NET Machine account)
NETWORK
NETWORK SERVICE
INTERACTIVE
Administrator
Internet Guest Account
SYSTEM

I even tried - Everyone

I have tried to change the Identity tab to use my credential but still  no joy.

Between each change I am restarting IIS Admin Service

I added the .exe file to the isapi section in my local IIS, This is the same exe I used to add the reference in Visual Studio.

I have registered the dll in the bin folder with regsvr32 just in case.

When I get the error, this is the error in the system event viewer:
The machine-default permission settings do not grant Local Activation permission for the COM Server application with CLSID
{92A04261-BE5C-11D1-99CC-00C04FD3695E}
 to the user {LOCALMACHINE}\ASPNET SID (S-1-5-21-1177600299-2965752541-197591168-1012).  This security permission can be modified using the Component Services administrative tool.

I tried to add the user it said was being denied but it would only accept the ASPNET part not the SID or the number following.

In IIS IUSR_{LOCALMACHINE} is the username for the Authentication Method with Anonymous access checked and Allow IIS to control password.  Nothing else on that form is checked.

And to reiterate, this works in my Visual Studio Development Server on the same machine.

So my question is:
What is going on behind the scenes in visual studio that allows this to work, and how can I duplicate it.

Disclaimer:
I am testing this out on my XP IIS, but will be going live with 2003 server once I figure it out.  I originally tried all of this on the 2003 server but it was to inconvenient to restart IIS when I made a change.  There are many public websites on that server.  I was getting the same errors on 2003 server.

I attached a picture of the Solution explorer for the functioning Visual Studio Environment.

The code seems irrelevantbut here it is:
it is throwing the exception on this line:
 FormOA.CommenceDB CommenceData = new FormOA.CommenceDB();
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
19:
20:
21:
22:
23:
24:
25:
26:
27:
28:
29:
30:
31:
32:
33:
34:
35:
36:
37:
38:
39:
40:
41:
42:
43:
44:
45:
46:
47:
48:
49:
50:
51:
52:
53:
54:
55:
56:
57:
58:
59:
60:
61:
62:
63:
64:
65:
66:
67:
68:
69:
70:
71:
72:
73:
74:
75:
76:
77:
78:
79:
80:
81:
82:
83:
84:
85:
86:
87:
88:
89:
90:
91:
92:
93:
using System;
using System.Configuration;
using System.Data;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using FormOA;
 
public partial class _Default : System.Web.UI.Page 
{
    string ViewType = "";
    protected void Page_Load(object sender, EventArgs e)
    {
        
        try
        {
            if (Request.QueryString["n"].Length > 0)
            {
                ViewType = Request.QueryString["n"].ToString();
                GetTickets();
            }
        }
        catch
        {
 
        }
    }
    private void GetTickets()
    {
 
        string orgid = "XXX";
        FormOA.CommenceDB CommenceData = new FormOA.CommenceDB();
        int mode = 0;
        int flags = 0;
        string search = "Closed";
        string search2 = "Not Equal to";
        string CMview = "Ticket";
        string BuildTheTickets = "";
        if (ViewType == "Closed")
        {
            search = "Closed";
            search2 = "Equal to";
        }
        if (ViewType == "Open")
        {
            search = "Closed";
            search2 = "Not Equal to";
        }
        if (ViewType == "All")
        {
            search = "Pending RMA";
            search2 = "Not Equal to";
        }
 
        FormOA.ICommenceCursor MyCommenceCursor;
        try
        {
            MyCommenceCursor = CommenceData.GetCursor(mode, CMview, flags);
            MyCommenceCursor.SetFilter("[ViewFilter(1,F,,Status, " + search2 + ", " + search + ")]", 0);
            string s2 = @"[ViewFilter(2,CTCF,, Relates to, Account, accountKey, Contains, """ + orgid + @""",)]";
            MyCommenceCursor.SetFilter(s2, 0);
            //MyCommenceCursor.SetFilter("[ViewFilter(2,CTCF,, Relates To, Account, accountKey, Equal To, " + orgid + ",)]", 0);
            MyCommenceCursor.SetSort("[ViewSort(Refers To Applications, ascending)]", 0);
            MyCommenceCursor.SetRelatedColumn(0, "Relates To", "Account", "Ticker", 0);
            MyCommenceCursor.SetColumn(1, "ticketKey", 0);
            MyCommenceCursor.SetColumn(2, "dateNew", 0);
            MyCommenceCursor.SetColumn(3, "Problem", 0);
            MyCommenceCursor.SetRelatedColumn(4, "Relates To", "Account", "accountKey", 0);
            MyCommenceCursor.SetColumn(5, "Status", 0);
            MyCommenceCursor.SetColumn(6, "Source", 0);
            MyCommenceCursor.SetRelatedColumn(7, "Relates To", "Employee", "properName", 0);
            MyCommenceCursor.SetRelatedColumn(8, "Relates To", "Contact", "properName", 0);
            MyCommenceCursor.SetColumn(9, "Resolution", 0);
            MyCommenceCursor.SetColumn(10, "Refers To Applications", 0);
 
            int RowCount = MyCommenceCursor.RowCount;
            FormOA.ICommenceQueryRowSet ars = MyCommenceCursor.GetQueryRowSet(RowCount, 0);                
}
                
            }
            ars = null;
            MyCommenceCursor = null;
            CommenceData = null;
        }
        catch (Exception Ex)
        {
 
        }
    }
}
Attachments:
 
Solution explorer for the functioning Visual Studio Environment
Solution explorer for the functioning Visual Studio Environment
 
[+][-]10/08/09 07:53 PM, ID: 25532052

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]10/09/09 12:23 PM, ID: 25538021

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]10/11/09 05:19 PM, ID: 25547993

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]10/12/09 05:59 AM, ID: 25550812

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]10/12/09 04:14 PM, ID: 25555868

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]10/13/09 06:07 AM, ID: 25559414

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]10/13/09 04:50 PM, ID: 25565993

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]10/13/09 04:55 PM, ID: 25566032

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]10/14/09 06:20 AM, ID: 25570105

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]10/14/09 05:31 PM, ID: 25576403

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]10/15/09 06:15 AM, ID: 25580145

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]10/15/09 05:09 PM, ID: 25586029

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]10/16/09 07:17 AM, ID: 25589779

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]10/16/09 10:45 AM, ID: 25591628

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]10/22/09 12:54 PM, ID: 25638281

View this solution now by starting your 30-day free trial. Setting up your free trial is quick, easy, and secure. We will return you to this solution, unlocked, when you're done.

 

About this solution

Zones: DCOM, .NET Framework 2.x, Microsoft IIS Web Server
Tags: IIS DCOM Permissions
Sign Up Now!
Solution Provided By: bcolladay
Participating Experts: 1
Solution Grade: A
 
 
[+][-]10/22/09 04:44 PM, ID: 25640136

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
 
Loading Advertisement...
20091111-EE-VQP-91 - Hierarchy / EE_QW_3_20080625