XDASrv Reference Manual
Getting Started
Send comments on this topic.

Glossary Item Box

Following is a step-by-step description of the server development process.
See the corresponding chapter for a more detailed description.

 

Step Description
 
Create Application Project using the Wizard

A1.1 Start Visual Studio .Net 2005
Note: If VS was open during XDASrv setup then you may need to restart VS for the newly installed project templates to be recognized.

A1.2 Select File - New - Project - Compiler ( VB or C# )

A1.3 Select the XDASrv or XDASrvWCF Template in the Advosol Folder 
A1.4 Enter Project Name and Location and click OK
A1.5 On the wizard dialog select the project characteristics and settings.
A1.6 Click Finish
The Visual Studio Solution is created according the selections.


  Create the Application Project from a Sample Application
B1.1 Copy the sample application directory and create the copied directory as a web application.
B1.2 Open the solution in Visual Studio and open the file ServerAdapt.cs respectively ServerAdapt.vb.
You may change the Solution and Project name but don't change the Assembly Name (NSPlugin.dll).
B1.3 Search the method GetServerRegistryDef and modify the registration definition.
Each server needs a unique CLSID (Def.ClsidServer) and AppID (Def.ClsidApp). Use the Visual Studio Tool Create GUID and paste the created unique GUID into the code, replacing the existing GUID.
B1.4 Compile the project.
The XML DA server can no be accessed under the URL of the web application assigned to the project directory.


Customize and Compile

2.1

 

Edit the generated source files:
- AssemblyInfo.cs resp. AssemblyInfo.vb
- ServerAdapt.cs resp. ServerAdapt.vb
- the appSettings section in web.config
    for WCF services edit the service settings with the WCF configuration tool

and add files with additional classes as required for the project specific device handling.
Build the application project and correct all compile errors.

2.2

Build the project.

2.3

To debug the service attach the Visual Studio debugger to the IIS worker process asp_net.exe respectively w3wp.exe in Vista.

2.4

 

Start an XML DA client and check the item address space and the item values.





 

  Deployment
3.1 Compile the Solution With Release configuration selected.

3.2

 

Copy the files 
   - OpcXmlDaServer.asmx
   - OpcXmlDaServer.svc     (for WCF servers only)
   - PrecompiledApp.config
   - web.config
and all files from the Release Output directory to 
   - bin\


 

3.3

 

Create a web application assigned to the target directory.

IIS and the .NET Framework must be installed on the target machine.
If the .NET Framework is installed on a system that has IIS already installed, IIS is automatically configured to handle requests to ASP.NET pages, and to redirect the execution to the ASP.NET runtime. However, it may happen that the .NET Framework was installed on a system where IIS was not already present, and IIS was added later. In this case IIS is configured to handle web services and does not know the asmx file extension. 
Registering ASP.NET on IIS is not just a matter of associating the various .aspx, .asmx, .axd, .ashx and the other ASP.NET extensions to the aspnet_isapi.dll ISAPI. More has to be done to create the ASP.NET account and to set it for ASP.NET requests, register the ISAPI itself and other stuff. Doing all this manually is a difficult operation, and requires a good understanding of many details. Fortunately there is a utility, shipped with the .NET Framework but not documented, that can take care of these configuration chores for you.
The utility is aspnet_regiis.exe, it is located under WindowsDir\Microsoft.NET\Framework\vx.y.zzzz\ and you should call it with the -i parameter: aspnet_regiis.exe –i



Copyright © 2002-2011 Advosol Inc. All Rights Reserved.