Professional OPC
Development Tools

logos

Online Forums

Technical support is provided through Support Forums below. Anybody can view them; you need to Register/Login to our site (see links in upper right corner) in order to Post questions. You do not have to be a licensed user of our product.

Please read Rules for forum posts before reporting your issue or asking a question. OPC Labs team is actively monitoring the forums, and replies as soon as possible. Various technical information can also be found in our Knowledge Base. For your convenience, we have also assembled a Frequently Asked Questions page.

Do not use the Contact page for technical issues.

"Access Denied" with .NET 4.0

More
14 Jun 2012 07:11 #889 by support
Hello,
.NET Framework 4 is supported. There may be differences in how the COM security is initialized, which is probably the cause of the problem. You may need to experiment with DCOM settings, and also with following settings in our component:

EasyDAClient.MachineParameters.TurnOf...
EasyDAClient.ClientParameters.TurnOff...

It would be interesting to know whether the problem is only with subscriptions, or whether it also affects ReadItem[Value] and similar methods. There is a substantial difference between the two, because subscriptions also require that the server can access the client (for callbacks).
Also, if you are running from within a debugger (such as Visual Studio), try running without it. There are security differences as well.

Please Log in or Create an account to join the conversation.

More
13 Jun 2012 12:34 #888 by Roshan123














































































































































/* Style Definitions */
table.MsoNormalTable
{mso-style-name:"Table Normal";
mso-tstyle-rowband-size:0;
mso-tstyle-colband-size:0;
mso-style-noshow:yes;
mso-style-priority:99;
mso-style-qformat:yes;
mso-style-parent:"";
mso-padding-alt:0in 5.4pt 0in 5.4pt;
mso-para-margin:0in;
mso-para-margin-bottom:.0001pt;
mso-pagination:widow-orphan;
font-size:11.0pt;
font-family:"Calibri","sans-serif";
mso-ascii-font-family:Calibri;
mso-ascii-theme-font:minor-latin;
mso-fareast-font-family:"Times New Roman";
mso-fareast-theme-font:minor-fareast;
mso-hansi-font-family:Calibri;
mso-hansi-theme-font:minor-latin;
mso-bidi-font-family:"Times New Roman";
mso-bidi-theme-font:minor-bidi;}

<span style="font-size:11.0pt;font-family:"Calibri","sans-serif";
mso-fareast-font-family:Calibri;mso-fareast-theme-font:minor-latin;color:#1F497D;
mso-ansi-language:EN-US;mso-fareast-language:EN-US;mso-bidi-language:AR-SA">We try to create a simple console application using Quick OPC .NET product (Version 5.12). The targeted platform is .NET framework 4, there we got “Access denied” error in ItemChanged event. When we try the same application on .NET framework 3.5 it works without any issue. Is “Quick OPC .NET” product support .NET framework 4 ?
<span style="font-size: 11pt; font-family: "Calibri","sans-serif"; color: rgb(31, 73, 125);">class Program
{
static void Main(string[] args)
{
Console.WriteLine("Subscribing for 30 seconds...");
EasyDAClient.DefaultInstance.ItemChanged += new EventHandler(_client_ItemChanged);
EasyDAClient.DefaultInstance.SubscribeItem("ptp-test", "DotNova.DASample.80", "SimulatedData.Sine", 100);
Thread.Sleep(30 * 1000);
Console.WriteLine("Unsubscribing...");
EasyDAClient.DefaultInstance.UnsubscribeAllItems();
Console.WriteLine("Finished.");
}

static void _client_ItemChanged(object sender, EasyDAItemChangedEventArgs e)
{
try
{
Console.WriteLine(e.Vtq.Value.ToString());
}
catch (Exception ex)
{
Console.WriteLine(e.ErrorMessage);
}
}
}

Please Log in or Create an account to join the conversation.

Moderators: support
Time to create page: 0.059 seconds