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.

Deploy Application in ASP.NET + Windows 7

More
20 Jul 2012 10:05 #947 by support
Hello,
thanks for letting me know, I am glad that it works now.
It is true that we need to access the Temp directory and create and execute the assembly file you mentioned (the actual file name may differ). Normally, Windows provides a Temp directory for the process that is actually accessible. But that doesn't seem to be always the case when run under IIS. We will have further look at it, and either automate the process better, or provide sufficient documentation to it.
Best regards

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

More
19 Jul 2012 12:45 #938 by jeancg
Hi

Happy news, I managed to solve the problem is working now. The problem was related to the security permissions of the windows, I was performing all procedures and settings for an account with administrator permissions, but do not know why the windows continued to block the DCOM permissions on my User.

I enabled the Administrator account of the windows and did all the procedures you mentioned in previous e-mail, follow the procedures for configuring DCOM permissions again and gave access to the account of the ISS inside deploy folder.

A curious thing was the windows to block access to a file in the Windows Temp folder "amd64_OpcLabs.EasyOpcClassicRaw_5.12.1312.1.dll" assigns the IIS account access to the Windows Temp folder and now is working.

Thank you for the support provided, I had this problem for nearly a week and were very worried about my deadlines of this system.

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

More
19 Jul 2012 09:31 #931 by support
Hello,
thank you for the detailed information and responses.
I think that all clues point to the DCOM configuration problem. In the IIS scenario, you should first figure out under which user account is your application running. This means determining the AppPool the Web application is assigned to, and the Identity it is configured to run under. You can then either do a test, and configure the AppPool to run under account that is known to work (e.g. your own, if the non-IIS demos work well), or - the final aim - configure DCOM so that the account of the AppPool identity has the permission it needs.
To do the later, repeat your DCOM configuration steps, but this time make sure that you specifically include the AppPool identity account in all permissions.
In addition, even if all DCOM configuration is right and the DCOM eventually gets to launching the OPC server, it needs to have access to the physical location of its executable file. You therefore also need to make sure that the account the AppPool is using is allowed to read and execute the .EXE of the OPC server, and any related files - using Windows Explorer and checking the (NTFS) permissions on the files themselves.
Best regards

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

More
17 Jul 2012 21:10 #921 by jeancg
I will detail our scenario and procedures already made​​.
I am using this code into a DLL to make requests for reading and writing in my OPC items.
using OpcLabs.EasyOpc;
using OpcLabs.EasyOpc.DataAccess;

namespace Supervisorio_V1_06_12
{
public class FuncoesOPC
{

public string Read(string itemId)
{
var leitura = new EasyDAClient();
string valor;
try
{
valor = leitura.ReadItemValue("", "CoDeSys.OPC.02", itemId).ToString();

}
catch (OpcException ex)
{
valor = "" + ex.GetBaseException().Message;
}
return valor;
}

public void Write(string itemId, string valor)
{
var escrita = new EasyDAClient();
try
{
escrita.WriteItemValue("", "CoDeSys.OPC.02", itemId, valor);

}
catch (OpcException ex)
{
valor = "" + ex.GetBaseException().Message;
}
}
}
}

code of my web pages: code of my web pages is not complete just to illustrate how I am calling the methods of reading and writing in asp.net using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

namespace Supervisorio_V1_06_12.Paginas.M1
{

public partial class Comando : System.Web.UI.Page
{

protected void Page_Load(object sender, EventArgs e)
{
if (Read("xI_TBN_ValvBorbFechada") == "True")
{
Fundo_BorboletaAberta.Visible = false;
Fundo_BorboletaAbrindo.Visible = false;
Fundo_BorboletaFechada.Visible = true;
}
}

//FUNÇÕES ***********************************************************
public string Read(string Item)
{
var Leitura = new FuncoesOPC();
return Leitura.Read("PLC1:." + Item);
}

public void Write(string Item, string Valor)
{
var Escrita = new FuncoesOPC();
Escrita.Write("PLC1:." + Item, Valor);
}

}
}

Answering your questions:



Did this ever work before, on the same computer or on a different computer, or is it the first time you are attempting?
R: I am developing the system on the same computer that will be the server, did it to take some doubts whether it could have a problem with different development environments, I was developing on a computer with Windows XP 32bit, and our server is a Windows 7 64bit. It's my first project using QuickOPC.NET

Is the OPC server on the same computer as your application, or is it remote on the network?
R: The OPC server is on the same computer.

Does the CLSID mentioned in the error log correspond to the OPC server you are trying to connect to?
R: Yes, I checked the CLSID of the server error log, I used the Demo Application (. NET) to check the connection to the OPC and its objects.

Are you using a CodeSys OPC Server?
R: Yes I am using a CoDeSys OPC Server installed on your computer, the Gateway Server is configured with IP parameters and Symbol Files, I used the Demo Application (. NET) to test the configuration of the Gateway Server OPC I list my CoDeSys.OPC.02 and items opc correctly.

Have you configured DCOM according to recommendations and procedures for OPC (I can point you towards these instructions if needed)?
R: Before sending my first post was not set because I thought that using the QuickOPC.NET would not be necessary to make DCOM settings on Windows 7, but I started to suspect that the error was related to the security of Windows and DCOM, I made this configuration using a tutorial I found on the internet (www.aggsoft.com/asdl-dcom-opc-config-1.htm) I noticed that now in my system into my textbox is showing an Access Denied message



Can you detail on "I have no response from the OPC"? What does it mean in terms of calling our methods or receiving notifications? Is the code blocked in a certain function, or what are the symptoms?
R: I created a separate dll for my web project and added two methods in this DLL one for reading and one for writing and imported this dll for my web project, I run my VS2010 project works correctly by the methods of reading and writing, is a dll simple within my knowledge in C #.



Our component should return an exception in case there is a problem connecting to the server (or, the event notifications carry an Exception object with them). Are you checking the exception, is it present, and if so, what is its contents?
R: Yes, I did a sophisticated error handling for my project I need to improve it, but running the project within the ISS 7 I noticed two errors occur within my textbox, an unknown error and another access denied. Running Visual Studio 2010 project by the project is running fine.

Attached the error in the event that triggers the error windows 7 I believe the error may be related to IIS, but I can not find a solution.Thank you await a return.

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

More
17 Jul 2012 12:48 #919 by support
Hello.
Running under IIS always requires specific considerations in terms of security and DCOM settings. Among other things, you need to be aware of the process identity used to run the application (this depends on isolation levels and application pools). The corresponding user must have permissions to "reach out" and launch and access the OPC server, and also *vice versa* - the OPC server has to be granted enough permissions to be able to send callbacks to the client.
Can you please clarify following points?

Did this ever work before, on the same computer or on a different computer, or is it the first time you are attempting?
Is the OPC server on the same computer as your application, or is it remote on the network?
Does the CLSID mentioned in the error log correspond to the OPC server you are trying to connect to?
Are you using a CodeSys OPC Server?
Have you configured DCOM according to recommendations and procedures for OPC (I can point you towards these instructions if needed)?
Can you detail on "I have no response from the OPC"? What does it mean in terms of calling our methods or receiving notifications? Is the code blocked in a certain function, or what are the symptoms?
Our component should return an exception in case there is a problem connecting to the server (or, the event notifications carry an Exception object with them). Are you checking the exception, is it present, and if so, what is its contents?

Thank you

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

More
16 Jul 2012 19:15 #918 by jeancg
I did some more tests and using the example provided by QuickOPC.NET own the WebApplication1 used the Build Deployment Package and the VS2010 imported application server machine using the Web Deploy IIS7, but when I start the application in the browser I have another error now.

I'm sending the html to analyze the error.

Thank you.

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

More
16 Jul 2012 12:19 #917 by jeancg
Hi.

I'm trying to deploy an application developed with QuickOPC.NET on a server IIS7 + Windows 7, but when you boot up my application in the browser I have no response from the OPC.

Looking at my log Windows found an error related to COM. I wonder if you have any additional configuration to be done in windows and ISS7 that my system works properly.
Error 07/13/2012 17:55:06 Microsoft-Windows-DistributedCOM 10016 None "default permission settings do not grant permissãoLocal-computer activation for COM Server application with CLSID
{7904C302-AC19-11D4-9E1E-00105A4AB1C6}
and APPID
{7904C302-AC19-11D4-9E1E-00105A4AB1C6}
the usuárioIIS AppPool \ ASP.NET v4.0 SID (S-1-5-82-794271414-2547205055-1060673776-2579641347-304524694) address LocalHost (Using LRPC). This security permission can be modified with the Component Services administrative tool. "

Thanks.

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

Moderators: support
Time to create page: 0.074 seconds